@swirls/cli 0.0.23 → 0.1.1
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/README.md +8 -0
- package/launcher/README.md +17 -0
- package/launcher/cli.js +45 -0
- package/launcher/platforms.js +10 -0
- package/package.json +15 -13
- package/dist/cli-shim.js +0 -2
- package/dist/cli.js +0 -410
package/dist/cli.js
DELETED
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from 'node:module';
|
|
3
|
-
const require = createRequire(import.meta.url);
|
|
4
|
-
var u2=Object.create;var uh=Object.defineProperty;var d2=Object.getOwnPropertyDescriptor;var p2=Object.getOwnPropertyNames;var f2=Object.getPrototypeOf,h2=Object.prototype.hasOwnProperty;var z=(e,t)=>()=>(e&&(t=e(e=0)),t);var $t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),It=(e,t)=>{for(var n in t)uh(e,n,{get:t[n],enumerable:!0})},m2=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p2(t))!h2.call(e,r)&&r!==n&&uh(e,r,{get:()=>t[r],enumerable:!(i=d2(t,r))||i.enumerable});return e};var Ln=(e,t,n)=>(n=e!=null?u2(f2(e)):{},m2(t||!e||!e.__esModule?uh(n,"default",{value:e,enumerable:!0}):n,e));import C9 from"path";import{fileURLToPath as U9}from"url";var g=z(()=>{"use strict"});function rU(e){return e instanceof Error?e:new Error("Something went wrong")}async function Ae(e,t,n){try{return{data:await e()}}catch(i){let r=n?.onException?.(i)??rU(i);return{failure:t(r)}}}var rr=z(()=>{"use strict";g()});var bh=$t((H9,yh)=>{"use strict";g();var uu=process||{},_k=uu.argv||[],lu=uu.env||{},nU=!(lu.NO_COLOR||_k.includes("--no-color"))&&(!!lu.FORCE_COLOR||_k.includes("--color")||uu.platform==="win32"||(uu.stdout||{}).isTTY&&lu.TERM!=="dumb"||!!lu.CI),iU=(e,t,n=e)=>i=>{let r=""+i,s=r.indexOf(t,e.length);return~s?e+oU(r,t,n,s)+t:e+r+t},oU=(e,t,n,i)=>{let r="",s=0;do r+=e.substring(s,i)+n,s=i+t.length,i=e.indexOf(t,s);while(~i);return r+e.substring(s)},vk=(e=nU)=>{let t=e?iU:()=>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")}};yh.exports=vk();yh.exports.createColors=vk});var wh=$t((Y9,yk)=>{"use strict";g();var xh={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let n="";return e<0?n+=`\x1B[${-e}D`:e>0&&(n+=`\x1B[${e}C`),t<0?n+=`\x1B[${-t}A`:t>0&&(n+=`\x1B[${t}B`),n},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"},sU={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},aU={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 n=0;n<e;n++)t+=this.line+(n<e-1?xh.up():"");return e&&(t+=xh.left),t}};yk.exports={cursor:xh,scroll:sU,erase:aU,beep:"\x07"}});import{stdout as Eh,stdin as Sk}from"process";import*as _i from"readline";import cU from"readline";import{ReadStream as bk}from"tty";function Ih(e,t,n){return String(e).normalize().replaceAll(`\r
|
|
5
|
-
`,`
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(i=>bU(i,t,n)).join(`
|
|
8
|
-
`)}function Ch(e,t){if(typeof e=="string")return an.aliases.get(e)===t;for(let n of e)if(n!==void 0&&Ch(n,t))return!0;return!1}function wU(e,t){if(e===t)return;let n=e.split(`
|
|
9
|
-
`),i=t.split(`
|
|
10
|
-
`),r=Math.max(n.length,i.length),s=[];for(let c=0;c<r;c++)n[c]!==i[c]&&s.push(c);return{lines:s,numLinesBefore:n.length,numLinesAfter:i.length,numLines:r}}function qr(e){return e===Th}function hu(e,t){let n=e;n.isTTY&&n.setRawMode(t)}function Pk({input:e=Sk,output:t=Eh,overwrite:n=!0,hideCursor:i=!0}={}){let r=_i.createInterface({input:e,output:t,prompt:"",tabSize:1});_i.emitKeypressEvents(e,r),e instanceof bk&&e.isTTY&&e.setRawMode(!0);let s=(c,{name:u,sequence:p})=>{let f=String(c);if(Ch([f,u,p],"cancel")){i&&t.write(sr.cursor.show),process.exit(0);return}if(!n)return;_i.moveCursor(t,u==="return"?0:-1,u==="return"?-1:0,()=>{_i.clearLine(t,1,()=>{e.once("keypress",s)})})};return i&&t.write(sr.cursor.hide),e.once("keypress",s),()=>{e.off("keypress",s),i&&t.write(sr.cursor.show),e instanceof bk&&e.isTTY&&!kU&&e.setRawMode(!1),r.terminal=!1,r.close()}}function bu(e,t,n,i=n){let r=Oa(e??Eh);return Ih(t,r-n.length,{hard:!0,trim:!1}).split(`
|
|
11
|
-
`).map((s,c)=>`${c===0?i:n}${s}`).join(`
|
|
12
|
-
`)}function mu(e,t,n){let i=e+t,r=Math.max(n.length-1,0),s=i<0?r:i>r?0:i;return n[s].disabled?mu(s,t<0?-1:1,n):s}var $k,sr,lU,uU,dU,kh,du,pu,$h,fu,pU,fU,Ik,hU,Pa,yu,Tk,mU,Ah,Ek,gU,Ak,Ph,xk,_U,wk,kk,vU,Sh,yU,bU,xU,an,kU,Th,Oa,Oh,Ca,gu,_u,vu,Uh=z(()=>{"use strict";g();$k=Ln(bh(),1),sr=Ln(wh(),1),lU=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,uU=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,dU=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,kh=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,du=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,pu=/\t{1,1000}/y,$h=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),fu=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,pU=new RegExp("\\p{M}+","gu"),fU={limit:1/0,ellipsis:""},Ik=(e,t={},n={})=>{let i=t.limit??1/0,r=t.ellipsis??"",s=t?.ellipsisWidth??(r?Ik(r,fU,n).width:0),c=n.ansiWidth??0,u=n.controlWidth??0,p=n.tabWidth??8,f=n.ambiguousWidth??1,v=n.emojiWidth??2,y=n.fullWidthWidth??2,k=n.regularWidth??1,I=n.wideWidth??2,$=0,O=0,F=e.length,Z=0,M=!1,H=F,W=Math.max(0,i-s),ee=0,fe=0,Y=0,X=0;e:for(;;){if(fe>ee||O>=F&&O>$){let Ke=e.slice(ee,fe)||e.slice($,O);Z=0;for(let lt of Ke.replaceAll(pU,"")){let Ye=lt.codePointAt(0)||0;if(uU(Ye)?X=y:dU(Ye)?X=I:f!==k&&lU(Ye)?X=f:X=k,Y+X>W&&(H=Math.min(H,Math.max(ee,$)+Z)),Y+X>i){M=!0;break e}Z+=lt.length,Y+=X}ee=fe=0}if(O>=F)break;if(fu.lastIndex=O,fu.test(e)){if(Z=fu.lastIndex-O,X=Z*k,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/k))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=fu.lastIndex;continue}if(kh.lastIndex=O,kh.test(e)){if(Y+c>W&&(H=Math.min(H,O)),Y+c>i){M=!0;break}Y+=c,ee=$,fe=O,O=$=kh.lastIndex;continue}if(du.lastIndex=O,du.test(e)){if(Z=du.lastIndex-O,X=Z*u,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/u))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=du.lastIndex;continue}if(pu.lastIndex=O,pu.test(e)){if(Z=pu.lastIndex-O,X=Z*p,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/p))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=pu.lastIndex;continue}if($h.lastIndex=O,$h.test(e)){if(Y+v>W&&(H=Math.min(H,O)),Y+v>i){M=!0;break}Y+=v,ee=$,fe=O,O=$=$h.lastIndex;continue}O+=1}return{width:M?W:Y,index:M?H:F,truncated:M,ellipsed:M&&i>=s}},hU={limit:1/0,ellipsis:"",ellipsisWidth:0},Pa=(e,t={})=>Ik(e,hU,t).width,yu="\x1B",Tk="\x9B",mU=39,Ah="\x07",Ek="[",gU="]",Ak="m",Ph=`${gU}8;;`,xk=new RegExp(`(?:\\${Ek}(?<code>\\d+)m|\\${Ph}(?<uri>.*)${Ah})`,"y"),_U=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},wk=e=>`${yu}${Ek}${e}${Ak}`,kk=e=>`${yu}${Ph}${e}${Ah}`,vU=e=>e.map(t=>Pa(t)),Sh=(e,t,n)=>{let i=t[Symbol.iterator](),r=!1,s=!1,c=e.at(-1),u=c===void 0?0:Pa(c),p=i.next(),f=i.next(),v=0;for(;!p.done;){let y=p.value,k=Pa(y);u+k<=n?e[e.length-1]+=y:(e.push(y),u=0),(y===yu||y===Tk)&&(r=!0,s=t.startsWith(Ph,v+1)),r?s?y===Ah&&(r=!1,s=!1):y===Ak&&(r=!1):(u+=k,u===n&&!f.done&&(e.push(""),u=0)),p=f,f=i.next(),v+=y.length}c=e.at(-1),!u&&c!==void 0&&c.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},yU=e=>{let t=e.split(" "),n=t.length;for(;n>0&&!(Pa(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")},bU=(e,t,n={})=>{if(n.trim!==!1&&e.trim()==="")return"";let i="",r,s,c=e.split(" "),u=vU(c),p=[""];for(let[$,O]of c.entries()){n.trim!==!1&&(p[p.length-1]=(p.at(-1)??"").trimStart());let F=Pa(p.at(-1)??"");if($!==0&&(F>=t&&(n.wordWrap===!1||n.trim===!1)&&(p.push(""),F=0),(F>0||n.trim===!1)&&(p[p.length-1]+=" ",F++)),n.hard&&u[$]>t){let Z=t-F,M=1+Math.floor((u[$]-Z-1)/t);Math.floor((u[$]-1)/t)<M&&p.push(""),Sh(p,O,t);continue}if(F+u[$]>t&&F>0&&u[$]>0){if(n.wordWrap===!1&&F<t){Sh(p,O,t);continue}p.push("")}if(F+u[$]>t&&n.wordWrap===!1){Sh(p,O,t);continue}p[p.length-1]+=O}n.trim!==!1&&(p=p.map($=>yU($)));let f=p.join(`
|
|
13
|
-
`),v=f[Symbol.iterator](),y=v.next(),k=v.next(),I=0;for(;!y.done;){let $=y.value,O=k.value;if(i+=$,$===yu||$===Tk){xk.lastIndex=I+1;let Z=xk.exec(f)?.groups;if(Z?.code!==void 0){let M=Number.parseFloat(Z.code);r=M===mU?void 0:M}else Z?.uri!==void 0&&(s=Z.uri.length===0?void 0:Z.uri)}let F=r?_U(r):void 0;O===`
|
|
14
|
-
`?(s&&(i+=kk("")),r&&F&&(i+=wk(F))):$===`
|
|
15
|
-
`&&(r&&F&&(i+=wk(r)),s&&(i+=kk(s))),I+=$.length,y=k,k=v.next()}return i};xU=["up","down","left","right","space","enter","cancel"],an={actions:new Set(xU),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0};kU=globalThis.process.platform.startsWith("win"),Th=Symbol("clack:cancel");Oa=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,Oh=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;Ca=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(t,n=!0){let{input:i=Sk,output:r=Eh,render:s,signal:c,...u}=t;this.opts=u,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=n,this._abortSignal=c,this.input=i,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(t,n){let i=this._subscribers.get(t)??[];i.push(n),this._subscribers.set(t,i)}on(t,n){this.setSubscriber(t,{cb:n})}once(t,n){this.setSubscriber(t,{cb:n,once:!0})}emit(t,...n){let i=this._subscribers.get(t)??[],r=[];for(let s of i)s.cb(...n),s.once&&r.push(()=>i.splice(i.indexOf(s),1));for(let s of r)s()}prompt(){return new Promise(t=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(Th);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=cU.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),hu(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(sr.cursor.show),this.output.off("resize",this.render),hu(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(sr.cursor.show),this.output.off("resize",this.render),hu(this.input,!1),t(Th)})})}_isActionKey(t,n){return t===" "}_setValue(t){this.value=t,this.emit("value",this.value)}_setUserInput(t,n){this.userInput=t??"",this.emit("userInput",this.userInput),n&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(t,n){if(this._track&&n.name!=="return"&&(n.name&&this._isActionKey(t,n)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),n?.name&&(!this._track&&an.aliases.has(n.name)&&this.emit("cursor",an.aliases.get(n.name)),an.actions.has(n.name)&&this.emit("cursor",n.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),this.emit("key",t?.toLowerCase(),n),n?.name==="return"){if(this.opts.validate){let i=this.opts.validate(this.value);i&&(this.error=i instanceof Error?i.message:i,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}Ch([t,n?.name,n?.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(`
|
|
16
|
-
`),hu(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=Ih(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
17
|
-
`).length-1;this.output.write(sr.cursor.move(-999,t*-1))}render(){let t=Ih(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(sr.cursor.hide);else{let n=wU(this._prevFrame,t),i=Oh(this.output);if(this.restoreCursor(),n){let r=Math.max(0,n.numLinesAfter-i),s=Math.max(0,n.numLinesBefore-i),c=n.lines.find(u=>u>=r);if(c===void 0){this._prevFrame=t;return}if(n.lines.length===1){this.output.write(sr.cursor.move(0,c-s)),this.output.write(sr.erase.lines(1));let u=t.split(`
|
|
18
|
-
`);this.output.write(u[c]),this._prevFrame=t,this.output.write(sr.cursor.move(0,u.length-c-1));return}else if(n.lines.length>1){if(r<s)c=r;else{let p=c-s;p>0&&this.output.write(sr.cursor.move(0,p))}this.output.write(sr.erase.down());let u=t.split(`
|
|
19
|
-
`).slice(c);this.output.write(u.join(`
|
|
20
|
-
`)),this._prevFrame=t;return}}this.output.write(sr.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},gu=class extends Ca{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",n=>{this.output.write(sr.cursor.move(0,-1)),this.value=n,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};_u=class extends Ca{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;let n=this.options.findIndex(({value:r})=>r===t.initialValue),i=n===-1?0:n;this.cursor=this.options[i].disabled?mu(i,1,this.options):i,this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=mu(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=mu(this.cursor,1,this.options);break}this.changeValue()})}},vu=class extends Ca{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let n=t.slice(0,this.cursor),[i,...r]=t.slice(this.cursor);return`${n}${$k.default.inverse(i)}${r.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",n=>{this._setValue(n)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}}});import Jr from"process";import{readdirSync as hM,existsSync as mM,lstatSync as gM}from"fs";import{dirname as vM,join as yM}from"path";import{stripVTControlCharacters as xM}from"util";function $U(){return Jr.platform!=="win32"?Jr.env.TERM!=="linux":!!Jr.env.CI||!!Jr.env.WT_SESSION||!!Jr.env.TERMINUS_SUBLIME||Jr.env.ConEmuTask==="{cmd::Cmder}"||Jr.env.TERM_PROGRAM==="Terminus-Sublime"||Jr.env.TERM_PROGRAM==="vscode"||Jr.env.TERM==="xterm-256color"||Jr.env.TERM==="alacritty"||Jr.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function za(e,t,n){return String(e).normalize().replaceAll(`\r
|
|
21
|
-
`,`
|
|
22
|
-
`).split(`
|
|
23
|
-
`).map(i=>JU(i,t,n)).join(`
|
|
24
|
-
`)}var le,Ua,Dh,SU,ot,IU,Nk,Rk,Tu,wM,ht,Su,kM,$M,jh,Iu,SM,IM,TM,EM,Ck,TU,EU,AU,PU,AM,CU,OU,UU,zU,Lh,NU,RU,DU,jU,zh,xu,wu,Nh,ku,LU,FU,Dk,MU,Sn,Eu,jk,BU,Fh,Lk,ZU,Fk,Mh,Ok,WU,Uk,zk,VU,Rh,qU,JU,KU,GU,Mk,Xt,HU,XU,Au,YU,mt,PM,$u,Na,CM,Yo,Yt=z(()=>{"use strict";g();Uh();Uh();le=Ln(bh(),1),Ua=Ln(wh(),1);Dh=$U(),SU=()=>process.env.CI==="true",ot=(e,t)=>Dh?e:t,IU=ot("\u25C6","*"),Nk=ot("\u25A0","x"),Rk=ot("\u25B2","x"),Tu=ot("\u25C7","o"),wM=ot("\u250C","T"),ht=ot("\u2502","|"),Su=ot("\u2514","\u2014"),kM=ot("\u2510","T"),$M=ot("\u2518","\u2014"),jh=ot("\u25CF",">"),Iu=ot("\u25CB"," "),SM=ot("\u25FB","[\u2022]"),IM=ot("\u25FC","[+]"),TM=ot("\u25FB","[ ]"),EM=ot("\u25AA","\u2022"),Ck=ot("\u2500","-"),TU=ot("\u256E","+"),EU=ot("\u251C","+"),AU=ot("\u256F","+"),PU=ot("\u2570","+"),AM=ot("\u256D","+"),CU=ot("\u25CF","\u2022"),OU=ot("\u25C6","*"),UU=ot("\u25B2","!"),zU=ot("\u25A0","x"),Lh=e=>{switch(e){case"initial":case"active":return le.default.cyan(IU);case"cancel":return le.default.red(Nk);case"error":return le.default.yellow(Rk);case"submit":return le.default.green(Tu)}},NU=e=>{switch(e){case"initial":case"active":return le.default.cyan(ht);case"cancel":return le.default.red(ht);case"error":return le.default.yellow(ht);case"submit":return le.default.green(ht)}},RU=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,DU=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,jU=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,zh=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,xu=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,wu=/\t{1,1000}/y,Nh=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),ku=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,LU=new RegExp("\\p{M}+","gu"),FU={limit:1/0,ellipsis:""},Dk=(e,t={},n={})=>{let i=t.limit??1/0,r=t.ellipsis??"",s=t?.ellipsisWidth??(r?Dk(r,FU,n).width:0),c=n.ansiWidth??0,u=n.controlWidth??0,p=n.tabWidth??8,f=n.ambiguousWidth??1,v=n.emojiWidth??2,y=n.fullWidthWidth??2,k=n.regularWidth??1,I=n.wideWidth??2,$=0,O=0,F=e.length,Z=0,M=!1,H=F,W=Math.max(0,i-s),ee=0,fe=0,Y=0,X=0;e:for(;;){if(fe>ee||O>=F&&O>$){let Ke=e.slice(ee,fe)||e.slice($,O);Z=0;for(let lt of Ke.replaceAll(LU,"")){let Ye=lt.codePointAt(0)||0;if(DU(Ye)?X=y:jU(Ye)?X=I:f!==k&&RU(Ye)?X=f:X=k,Y+X>W&&(H=Math.min(H,Math.max(ee,$)+Z)),Y+X>i){M=!0;break e}Z+=lt.length,Y+=X}ee=fe=0}if(O>=F)break;if(ku.lastIndex=O,ku.test(e)){if(Z=ku.lastIndex-O,X=Z*k,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/k))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=ku.lastIndex;continue}if(zh.lastIndex=O,zh.test(e)){if(Y+c>W&&(H=Math.min(H,O)),Y+c>i){M=!0;break}Y+=c,ee=$,fe=O,O=$=zh.lastIndex;continue}if(xu.lastIndex=O,xu.test(e)){if(Z=xu.lastIndex-O,X=Z*u,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/u))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=xu.lastIndex;continue}if(wu.lastIndex=O,wu.test(e)){if(Z=wu.lastIndex-O,X=Z*p,Y+X>W&&(H=Math.min(H,O+Math.floor((W-Y)/p))),Y+X>i){M=!0;break}Y+=X,ee=$,fe=O,O=$=wu.lastIndex;continue}if(Nh.lastIndex=O,Nh.test(e)){if(Y+v>W&&(H=Math.min(H,O)),Y+v>i){M=!0;break}Y+=v,ee=$,fe=O,O=$=Nh.lastIndex;continue}O+=1}return{width:M?W:Y,index:M?H:F,truncated:M,ellipsed:M&&i>=s}},MU={limit:1/0,ellipsis:"",ellipsisWidth:0},Sn=(e,t={})=>Dk(e,MU,t).width,Eu="\x1B",jk="\x9B",BU=39,Fh="\x07",Lk="[",ZU="]",Fk="m",Mh=`${ZU}8;;`,Ok=new RegExp(`(?:\\${Lk}(?<code>\\d+)m|\\${Mh}(?<uri>.*)${Fh})`,"y"),WU=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Uk=e=>`${Eu}${Lk}${e}${Fk}`,zk=e=>`${Eu}${Mh}${e}${Fh}`,VU=e=>e.map(t=>Sn(t)),Rh=(e,t,n)=>{let i=t[Symbol.iterator](),r=!1,s=!1,c=e.at(-1),u=c===void 0?0:Sn(c),p=i.next(),f=i.next(),v=0;for(;!p.done;){let y=p.value,k=Sn(y);u+k<=n?e[e.length-1]+=y:(e.push(y),u=0),(y===Eu||y===jk)&&(r=!0,s=t.startsWith(Mh,v+1)),r?s?y===Fh&&(r=!1,s=!1):y===Fk&&(r=!1):(u+=k,u===n&&!f.done&&(e.push(""),u=0)),p=f,f=i.next(),v+=y.length}c=e.at(-1),!u&&c!==void 0&&c.length>0&&e.length>1&&(e[e.length-2]+=e.pop())},qU=e=>{let t=e.split(" "),n=t.length;for(;n>0&&!(Sn(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(" ")+t.slice(n).join("")},JU=(e,t,n={})=>{if(n.trim!==!1&&e.trim()==="")return"";let i="",r,s,c=e.split(" "),u=VU(c),p=[""];for(let[$,O]of c.entries()){n.trim!==!1&&(p[p.length-1]=(p.at(-1)??"").trimStart());let F=Sn(p.at(-1)??"");if($!==0&&(F>=t&&(n.wordWrap===!1||n.trim===!1)&&(p.push(""),F=0),(F>0||n.trim===!1)&&(p[p.length-1]+=" ",F++)),n.hard&&u[$]>t){let Z=t-F,M=1+Math.floor((u[$]-Z-1)/t);Math.floor((u[$]-1)/t)<M&&p.push(""),Rh(p,O,t);continue}if(F+u[$]>t&&F>0&&u[$]>0){if(n.wordWrap===!1&&F<t){Rh(p,O,t);continue}p.push("")}if(F+u[$]>t&&n.wordWrap===!1){Rh(p,O,t);continue}p[p.length-1]+=O}n.trim!==!1&&(p=p.map($=>qU($)));let f=p.join(`
|
|
25
|
-
`),v=f[Symbol.iterator](),y=v.next(),k=v.next(),I=0;for(;!y.done;){let $=y.value,O=k.value;if(i+=$,$===Eu||$===jk){Ok.lastIndex=I+1;let Z=Ok.exec(f)?.groups;if(Z?.code!==void 0){let M=Number.parseFloat(Z.code);r=M===BU?void 0:M}else Z?.uri!==void 0&&(s=Z.uri.length===0?void 0:Z.uri)}let F=r?WU(r):void 0;O===`
|
|
26
|
-
`?(s&&(i+=zk("")),r&&F&&(i+=Uk(F))):$===`
|
|
27
|
-
`&&(r&&F&&(i+=Uk(r)),s&&(i+=zk(s))),I+=$.length,y=k,k=v.next()}return i};KU=(e,t,n,i,r)=>{let s=t,c=0;for(let u=n;u<i;u++){let p=e[u];if(s=s-p.length,c++,s<=r)break}return{lineCount:s,removals:c}},GU=e=>{let{cursor:t,options:n,style:i}=e,r=e.output??process.stdout,s=Oa(r),c=e.columnPadding??0,u=e.rowPadding??4,p=s-c,f=Oh(r),v=le.default.dim("..."),y=e.maxItems??Number.POSITIVE_INFINITY,k=Math.max(f-u,0),I=Math.max(Math.min(y,k),5),$=0;t>=I-3&&($=Math.max(Math.min(t-I+3,n.length-I),0));let O=I<n.length&&$>0,F=I<n.length&&$+I<n.length,Z=Math.min($+I,n.length),M=[],H=0;O&&H++,F&&H++;let W=$+(O?1:0),ee=Z-(F?1:0);for(let Y=W;Y<ee;Y++){let X=za(i(n[Y],Y===t),p,{hard:!0,trim:!1}).split(`
|
|
28
|
-
`);M.push(X),H+=X.length}if(H>k){let Y=0,X=0,Ke=H,lt=t-W,Ye=(Tt,Re)=>KU(M,Ke,Tt,Re,k);O?({lineCount:Ke,removals:Y}=Ye(0,lt),Ke>k&&({lineCount:Ke,removals:X}=Ye(lt+1,M.length))):({lineCount:Ke,removals:X}=Ye(lt+1,M.length),Ke>k&&({lineCount:Ke,removals:Y}=Ye(0,lt))),Y>0&&(O=!0,M.splice(0,Y)),X>0&&(F=!0,M.splice(M.length-X,X))}let fe=[];O&&fe.push(v);for(let Y of M)for(let X of Y)fe.push(X);return F&&fe.push(v),fe},Mk=e=>{let t=e.active??"Yes",n=e.inactive??"No";return new gu({active:t,inactive:n,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let i=`${le.default.gray(ht)}
|
|
29
|
-
${Lh(this.state)} ${e.message}
|
|
30
|
-
`,r=this.value?t:n;switch(this.state){case"submit":return`${i}${le.default.gray(ht)} ${le.default.dim(r)}`;case"cancel":return`${i}${le.default.gray(ht)} ${le.default.strikethrough(le.default.dim(r))}
|
|
31
|
-
${le.default.gray(ht)}`;default:return`${i}${le.default.cyan(ht)} ${this.value?`${le.default.green(jh)} ${t}`:`${le.default.dim(Iu)} ${le.default.dim(t)}`} ${le.default.dim("/")} ${this.value?`${le.default.dim(Iu)} ${le.default.dim(n)}`:`${le.default.green(jh)} ${n}`}
|
|
32
|
-
${le.default.cyan(Su)}
|
|
33
|
-
`}}}).prompt()},Xt={message:(e=[],{symbol:t=le.default.gray(ht),secondarySymbol:n=le.default.gray(ht),output:i=process.stdout,spacing:r=1,withGuide:s}={})=>{let c=[],u=(s??an.withGuide)!==!1,p=u?n:"",f=u?`${t} `:"",v=u?`${n} `:"";for(let k=0;k<r;k++)c.push(p);let y=Array.isArray(e)?e:e.split(`
|
|
34
|
-
`);if(y.length>0){let[k,...I]=y;k.length>0?c.push(`${f}${k}`):c.push(u?t:"");for(let $ of I)$.length>0?c.push(`${v}${$}`):c.push(u?n:"")}i.write(`${c.join(`
|
|
35
|
-
`)}
|
|
36
|
-
`)},info:(e,t)=>{Xt.message(e,{...t,symbol:le.default.blue(CU)})},success:(e,t)=>{Xt.message(e,{...t,symbol:le.default.green(OU)})},step:(e,t)=>{Xt.message(e,{...t,symbol:le.default.green(Tu)})},warn:(e,t)=>{Xt.message(e,{...t,symbol:le.default.yellow(UU)})},warning:(e,t)=>{Xt.warn(e,t)},error:(e,t)=>{Xt.message(e,{...t,symbol:le.default.red(zU)})}},HU=e=>le.default.dim(e),XU=(e,t,n)=>{let i={hard:!0,trim:!1},r=za(e,t,i).split(`
|
|
37
|
-
`),s=r.reduce((p,f)=>Math.max(Sn(f),p),0),c=r.map(n).reduce((p,f)=>Math.max(Sn(f),p),0),u=t-(c-s);return za(e,u,i)},Au=(e="",t="",n)=>{let i=n?.output??Jr.stdout,r=(n?.withGuide??an.withGuide)!==!1,s=n?.format??HU,c=["",...XU(e,Oa(i)-6,s).split(`
|
|
38
|
-
`).map(s),""],u=Sn(t),p=Math.max(c.reduce((k,I)=>{let $=Sn(I);return $>k?$:k},0),u)+2,f=c.map(k=>`${le.default.gray(ht)} ${k}${" ".repeat(p-Sn(k))}${le.default.gray(ht)}`).join(`
|
|
39
|
-
`),v=r?`${le.default.gray(ht)}
|
|
40
|
-
`:"",y=r?EU:PU;i.write(`${v}${le.default.green(Tu)} ${le.default.reset(t)} ${le.default.gray(Ck.repeat(Math.max(p-u-1,1))+TU)}
|
|
41
|
-
${f}
|
|
42
|
-
${le.default.gray(y+Ck.repeat(p+2)+AU)}
|
|
43
|
-
`)},YU=le.default.magenta,mt=({indicator:e="dots",onCancel:t,output:n=process.stdout,cancelMessage:i,errorMessage:r,frames:s=Dh?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:c=Dh?80:120,signal:u,...p}={})=>{let f=SU(),v,y,k=!1,I=!1,$="",O,F=performance.now(),Z=Oa(n),M=p?.styleFrame??YU,H=Re=>{let pt=Re>1?r??an.messages.error:i??an.messages.cancel;I=Re===1,k&&(Tt(pt,Re),I&&typeof t=="function"&&t())},W=()=>H(2),ee=()=>H(1),fe=()=>{process.on("uncaughtExceptionMonitor",W),process.on("unhandledRejection",W),process.on("SIGINT",ee),process.on("SIGTERM",ee),process.on("exit",H),u&&u.addEventListener("abort",ee)},Y=()=>{process.removeListener("uncaughtExceptionMonitor",W),process.removeListener("unhandledRejection",W),process.removeListener("SIGINT",ee),process.removeListener("SIGTERM",ee),process.removeListener("exit",H),u&&u.removeEventListener("abort",ee)},X=()=>{if(O===void 0)return;f&&n.write(`
|
|
44
|
-
`);let Re=za(O,Z,{hard:!0,trim:!1}).split(`
|
|
45
|
-
`);Re.length>1&&n.write(Ua.cursor.up(Re.length-1)),n.write(Ua.cursor.to(0)),n.write(Ua.erase.down())},Ke=Re=>Re.replace(/\.+$/,""),lt=Re=>{let pt=(performance.now()-Re)/1e3,ye=Math.floor(pt/60),Et=Math.floor(pt%60);return ye>0?`[${ye}m ${Et}s]`:`[${Et}s]`},Ye=(Re="")=>{k=!0,v=Pk({output:n}),$=Ke(Re),F=performance.now(),n.write(`${le.default.gray(ht)}
|
|
46
|
-
`);let pt=0,ye=0;fe(),y=setInterval(()=>{if(f&&$===O)return;X(),O=$;let Et=M(s[pt]),tt;if(f)tt=`${Et} ${$}...`;else if(e==="timer")tt=`${Et} ${$} ${lt(F)}`;else{let ce=".".repeat(Math.floor(ye)).slice(0,3);tt=`${Et} ${$}${ce}`}let oe=za(tt,Z,{hard:!0,trim:!1});n.write(oe),pt=pt+1<s.length?pt+1:0,ye=ye<4?ye+.125:0},c)},Tt=(Re="",pt=0,ye=!1)=>{if(!k)return;k=!1,clearInterval(y),X();let Et=pt===0?le.default.green(Tu):pt===1?le.default.red(Nk):le.default.red(Rk);$=Re??$,ye||(e==="timer"?n.write(`${Et} ${$} ${lt(F)}
|
|
47
|
-
`):n.write(`${Et} ${$}
|
|
48
|
-
`)),Y(),v()};return{start:Ye,stop:(Re="")=>Tt(Re,0),message:(Re="")=>{$=Ke(Re??$)},cancel:(Re="")=>Tt(Re,1),error:(Re="")=>Tt(Re,2),clear:()=>Tt("",0,!0),get isCancelled(){return I}}},PM={light:ot("\u2500","-"),heavy:ot("\u2501","="),block:ot("\u2588","#")},$u=(e,t)=>e.includes(`
|
|
49
|
-
`)?e.split(`
|
|
50
|
-
`).map(n=>t(n)).join(`
|
|
51
|
-
`):t(e),Na=e=>{let t=(n,i)=>{let r=n.label??String(n.value);switch(i){case"disabled":return`${le.default.gray(Iu)} ${$u(r,le.default.gray)}${n.hint?` ${le.default.dim(`(${n.hint??"disabled"})`)}`:""}`;case"selected":return`${$u(r,le.default.dim)}`;case"active":return`${le.default.green(jh)} ${r}${n.hint?` ${le.default.dim(`(${n.hint})`)}`:""}`;case"cancelled":return`${$u(r,s=>le.default.strikethrough(le.default.dim(s)))}`;default:return`${le.default.dim(Iu)} ${$u(r,le.default.dim)}`}};return new _u({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let n=`${Lh(this.state)} `,i=`${NU(this.state)} `,r=bu(e.output,e.message,i,n),s=`${le.default.gray(ht)}
|
|
52
|
-
${r}
|
|
53
|
-
`;switch(this.state){case"submit":{let c=`${le.default.gray(ht)} `,u=bu(e.output,t(this.options[this.cursor],"selected"),c);return`${s}${u}`}case"cancel":{let c=`${le.default.gray(ht)} `,u=bu(e.output,t(this.options[this.cursor],"cancelled"),c);return`${s}${u}
|
|
54
|
-
${le.default.gray(ht)}`}default:{let c=`${le.default.cyan(ht)} `,u=s.split(`
|
|
55
|
-
`).length;return`${s}${c}${GU({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:c.length,rowPadding:u+2,style:(p,f)=>t(p,p.disabled?"disabled":f?"active":"inactive")}).join(`
|
|
56
|
-
${c}`)}
|
|
57
|
-
${le.default.cyan(Su)}
|
|
58
|
-
`}}}}).prompt()},CM=`${le.default.gray(ht)} `,Yo=e=>new vu({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=(e?.withGuide??an.withGuide)!==!1,n=`${`${t?`${le.default.gray(ht)}
|
|
59
|
-
`:""}${Lh(this.state)} `}${e.message}
|
|
60
|
-
`,i=e.placeholder?le.default.inverse(e.placeholder[0])+le.default.dim(e.placeholder.slice(1)):le.default.inverse(le.default.hidden("_")),r=this.userInput?this.userInputWithCursor:i,s=this.value??"";switch(this.state){case"error":{let c=this.error?` ${le.default.yellow(this.error)}`:"",u=t?`${le.default.yellow(ht)} `:"",p=t?le.default.yellow(Su):"";return`${n.trim()}
|
|
61
|
-
${u}${r}
|
|
62
|
-
${p}${c}
|
|
63
|
-
`}case"submit":{let c=s?` ${le.default.dim(s)}`:"",u=t?le.default.gray(ht):"";return`${n}${u}${c}`}case"cancel":{let c=s?` ${le.default.strikethrough(le.default.dim(s))}`:"",u=t?le.default.gray(ht):"";return`${n}${u}${c}${s.trim()?`
|
|
64
|
-
${u}`:""}`}default:{let c=t?`${le.default.cyan(ht)} `:"",u=t?le.default.cyan(Su):"";return`${n}${c}${r}
|
|
65
|
-
${u}
|
|
66
|
-
`}}}}).prompt()});function R(e,t,n){function i(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let f=c.prototype,v=Object.keys(f);for(let y=0;y<v.length;y++){let k=v[y];k in u||(u[k]=f[k].bind(u))}}let r=n?.Parent??Object;class s extends r{}Object.defineProperty(s,"name",{value:e});function c(u){var p;let f=n?.Parent?new s:this;i(f,u),(p=f._zod).deferred??(p.deferred=[]);for(let v of f._zod.deferred)v();return f}return Object.defineProperty(c,"init",{value:i}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}function Pt(e){return e&&Object.assign(Ra,e),Ra}var Bh,Pu,cn,vi,Ra,Qo=z(()=>{"use strict";g();Bh=Object.freeze({status:"aborted"});Pu=Symbol("zod_brand"),cn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},vi=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Ra={}});var ne={};It(ne,{BIGINT_FORMAT_RANGES:()=>Yh,Class:()=>Wh,NUMBER_FORMAT_RANGES:()=>Xh,aborted:()=>wi,allowsEval:()=>Jh,assert:()=>nz,assertEqual:()=>QU,assertIs:()=>tz,assertNever:()=>rz,assertNotEqual:()=>ez,assignProp:()=>bi,base64ToUint8Array:()=>Zk,base64urlToUint8Array:()=>bz,cached:()=>ts,captureStackTrace:()=>Ou,cleanEnum:()=>yz,cleanRegex:()=>La,clone:()=>hr,cloneDef:()=>oz,createTransparentProxy:()=>dz,defineLazy:()=>Ne,esc:()=>Cu,escapeRegex:()=>Kr,extend:()=>hz,finalizeIssue:()=>kr,floatSafeRemainder:()=>Vh,getElementAtPath:()=>sz,getEnumValues:()=>ja,getLengthableOrigin:()=>Ba,getParsedType:()=>uz,getSizableOrigin:()=>Ma,hexToUint8Array:()=>wz,isObject:()=>Yi,isPlainObject:()=>xi,issue:()=>rs,joinValues:()=>L,jsonStringifyReplacer:()=>es,merge:()=>gz,mergeDefs:()=>Bn,normalizeParams:()=>se,nullish:()=>yi,numKeys:()=>lz,objectClone:()=>iz,omit:()=>fz,optionalKeys:()=>Hh,parsedType:()=>re,partial:()=>_z,pick:()=>pz,prefixIssues:()=>zr,primitiveTypes:()=>Gh,promiseAllObject:()=>az,propertyKeyTypes:()=>Fa,randomString:()=>cz,required:()=>vz,safeExtend:()=>mz,shallowClone:()=>Kh,slugify:()=>qh,stringifyPrimitive:()=>te,uint8ArrayToBase64:()=>Wk,uint8ArrayToBase64url:()=>xz,uint8ArrayToHex:()=>kz,unwrapMessage:()=>Da});function QU(e){return e}function ez(e){return e}function tz(e){}function rz(e){throw new Error("Unexpected value in exhaustive check")}function nz(e){}function ja(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function L(e,t="|"){return e.map(n=>te(n)).join(t)}function es(e,t){return typeof t=="bigint"?t.toString():t}function ts(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function yi(e){return e==null}function La(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Vh(e,t){let n=(e.toString().split(".")[1]||"").length,i=t.toString(),r=(i.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(i)){let p=i.match(/\d?e-(\d?)/);p?.[1]&&(r=Number.parseInt(p[1]))}let s=n>r?n:r,c=Number.parseInt(e.toFixed(s).replace(".","")),u=Number.parseInt(t.toFixed(s).replace(".",""));return c%u/10**s}function Ne(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Bk)return i===void 0&&(i=Bk,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function iz(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function bi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Bn(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function oz(e){return Bn(e._zod.def)}function sz(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function az(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let s=0;s<t.length;s++)r[t[s]]=i[s];return r})}function cz(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Cu(e){return JSON.stringify(e)}function qh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Yi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xi(e){if(Yi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Yi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Kh(e){return xi(e)?{...e}:Array.isArray(e)?[...e]:e}function lz(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Kr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hr(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function se(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 dz(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,s){return t??(t=e()),Reflect.set(t,i,r,s)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function te(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Hh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function pz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let s=Bn(e._zod.def,{get shape(){let c={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=n.shape[u])}return bi(this,"shape",c),c},checks:[]});return hr(e,s)}function fz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let s=Bn(e._zod.def,{get shape(){let c={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return bi(this,"shape",c),c},checks:[]});return hr(e,s)}function hz(e,t){if(!xi(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let s=e._zod.def.shape;for(let c in t)if(Object.getOwnPropertyDescriptor(s,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Bn(e._zod.def,{get shape(){let s={...e._zod.def.shape,...t};return bi(this,"shape",s),s}});return hr(e,r)}function mz(e,t){if(!xi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Bn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return bi(this,"shape",i),i}});return hr(e,n)}function gz(e,t){let n=Bn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return bi(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return hr(e,n)}function _z(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let c=Bn(t._zod.def,{get shape(){let u=t._zod.def.shape,p={...u};if(n)for(let f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(p[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(let f in u)p[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return bi(this,"shape",p),p},checks:[]});return hr(t,c)}function vz(e,t,n){let i=Bn(t._zod.def,{get shape(){let r=t._zod.def.shape,s={...r};if(n)for(let c in n){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(s[c]=new e({type:"nonoptional",innerType:r[c]}))}else for(let c in r)s[c]=new e({type:"nonoptional",innerType:r[c]});return bi(this,"shape",s),s}});return hr(t,i)}function wi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function zr(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Da(e){return typeof e=="string"?e:e?.message}function kr(e,t,n){let i={...e,path:e.path??[]};if(!e.message){let r=Da(e.inst?._zod.def?.error?.(e))??Da(t?.error?.(e))??Da(n.customError?.(e))??Da(n.localeError?.(e))??"Invalid input";i.message=r}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ma(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ba(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function re(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function rs(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function yz(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Zk(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Wk(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Zk(t+n)}function xz(e){return Wk(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function wz(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function kz(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Bk,Ou,Jh,uz,Fa,Gh,Xh,Yh,Wh,be=z(()=>{"use strict";g();Bk=Symbol("evaluating");Ou="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Jh=ts(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});uz=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}`)}},Fa=new Set(["string","number","symbol"]),Gh=new Set(["string","number","bigint","boolean","symbol","undefined"]);Xh={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]},Yh={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Wh=class{constructor(...t){}}});function Wa(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Va(e,t=n=>n.message){let n={_errors:[]},i=r=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c}));else if(s.code==="invalid_key")i({issues:s.issues});else if(s.code==="invalid_element")i({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let c=n,u=0;for(;u<s.path.length;){let p=s.path[u];u===s.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(s))):c[p]=c[p]||{_errors:[]},c=c[p],u++}}};return i(e),n}function Qh(e,t=n=>n.message){let n={errors:[]},i=(r,s=[])=>{var c,u;for(let p of r.issues)if(p.code==="invalid_union"&&p.errors.length)p.errors.map(f=>i({issues:f},p.path));else if(p.code==="invalid_key")i({issues:p.issues},p.path);else if(p.code==="invalid_element")i({issues:p.issues},p.path);else{let f=[...s,...p.path];if(f.length===0){n.errors.push(t(p));continue}let v=n,y=0;for(;y<f.length;){let k=f[y],I=y===f.length-1;typeof k=="string"?(v.properties??(v.properties={}),(c=v.properties)[k]??(c[k]={errors:[]}),v=v.properties[k]):(v.items??(v.items=[]),(u=v.items)[k]??(u[k]={errors:[]}),v=v.items[k]),I&&v.errors.push(t(p)),y++}}};return i(e),n}function qk(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function em(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${qk(i.path)}`);return t.join(`
|
|
67
|
-
`)}var Vk,Za,$r,tm=z(()=>{"use strict";g();Qo();be();Vk=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Za=R("$ZodError",Vk),$r=R("$ZodError",Vk,{Parent:Error})});var ns,Uu,is,zu,os,rm,ss,nm,Nu,Sz,Ru,Iz,Du,Tz,ju,Ez,Lu,Az,Fu,Pz,Mu,Cz,Bu,Oz,im=z(()=>{"use strict";g();Qo();tm();be();ns=e=>(t,n,i,r)=>{let s=i?Object.assign(i,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise)throw new cn;if(c.issues.length){let u=new(r?.Err??e)(c.issues.map(p=>kr(p,s,Pt())));throw Ou(u,r?.callee),u}return c.value},Uu=ns($r),is=e=>async(t,n,i,r)=>{let s=i?Object.assign(i,{async:!0}):{async:!0},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let u=new(r?.Err??e)(c.issues.map(p=>kr(p,s,Pt())));throw Ou(u,r?.callee),u}return c.value},zu=is($r),os=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},r);if(s instanceof Promise)throw new cn;return s.issues.length?{success:!1,error:new(e??Za)(s.issues.map(c=>kr(c,r,Pt())))}:{success:!0,data:s.value}},rm=os($r),ss=e=>async(t,n,i)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:n,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(c=>kr(c,r,Pt())))}:{success:!0,data:s.value}},nm=ss($r),Nu=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ns(e)(t,n,r)},Sz=Nu($r),Ru=e=>(t,n,i)=>ns(e)(t,n,i),Iz=Ru($r),Du=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return is(e)(t,n,r)},Tz=Du($r),ju=e=>async(t,n,i)=>is(e)(t,n,i),Ez=ju($r),Lu=e=>(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return os(e)(t,n,r)},Az=Lu($r),Fu=e=>(t,n,i)=>os(e)(t,n,i),Pz=Fu($r),Mu=e=>async(t,n,i)=>{let r=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ss(e)(t,n,r)},Cz=Mu($r),Bu=e=>async(t,n,i)=>ss(e)(t,n,i),Oz=Bu($r)});var Gr={};It(Gr,{base64:()=>bm,base64url:()=>Zu,bigint:()=>Im,boolean:()=>Em,browserEmail:()=>Fz,cidrv4:()=>vm,cidrv6:()=>ym,cuid:()=>om,cuid2:()=>sm,date:()=>wm,datetime:()=>$m,domain:()=>Zz,duration:()=>dm,e164:()=>xm,email:()=>fm,emoji:()=>hm,extendedDuration:()=>Uz,guid:()=>pm,hex:()=>Wz,hostname:()=>Bz,html5Email:()=>Dz,idnEmail:()=>Lz,integer:()=>Tm,ipv4:()=>mm,ipv6:()=>gm,ksuid:()=>lm,lowercase:()=>Cm,mac:()=>_m,md5_base64:()=>qz,md5_base64url:()=>Jz,md5_hex:()=>Vz,nanoid:()=>um,null:()=>Am,number:()=>Wu,rfc5322Email:()=>jz,sha1_base64:()=>Gz,sha1_base64url:()=>Hz,sha1_hex:()=>Kz,sha256_base64:()=>Yz,sha256_base64url:()=>Qz,sha256_hex:()=>Xz,sha384_base64:()=>tN,sha384_base64url:()=>rN,sha384_hex:()=>eN,sha512_base64:()=>iN,sha512_base64url:()=>oN,sha512_hex:()=>nN,string:()=>Sm,time:()=>km,ulid:()=>am,undefined:()=>Pm,unicodeEmail:()=>Jk,uppercase:()=>Om,uuid:()=>Qi,uuid4:()=>zz,uuid6:()=>Nz,uuid7:()=>Rz,xid:()=>cm});function hm(){return new RegExp(Mz,"u")}function Gk(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 km(e){return new RegExp(`^${Gk(e)}$`)}function $m(e){let t=Gk({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Kk}T(?:${i})$`)}function qa(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ja(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var om,sm,am,cm,lm,um,dm,Uz,pm,Qi,zz,Nz,Rz,fm,Dz,jz,Jk,Lz,Fz,Mz,mm,gm,_m,vm,ym,bm,Zu,Bz,Zz,xm,Kk,wm,Sm,Im,Tm,Wu,Em,Am,Pm,Cm,Om,Wz,Vz,qz,Jz,Kz,Gz,Hz,Xz,Yz,Qz,eN,tN,rN,nN,iN,oN,Vu=z(()=>{"use strict";g();be();om=/^[cC][^\s-]{8,}$/,sm=/^[0-9a-z]+$/,am=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,cm=/^[0-9a-vA-V]{20}$/,lm=/^[A-Za-z0-9]{27}$/,um=/^[a-zA-Z0-9_-]{21}$/,dm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Uz=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pm=/^([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})$/,Qi=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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zz=Qi(4),Nz=Qi(6),Rz=Qi(7),fm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,jz=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Jk=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lz=Jk,Fz=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Mz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";mm=/^(?:(?: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])$/,gm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_m=e=>{let t=Kr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},vm=/^((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])$/,ym=/^(([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])$/,bm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Zu=/^[A-Za-z0-9_-]*$/,Bz=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Zz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,xm=/^\+[1-9]\d{6,14}$/,Kk="(?:(?:\\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])))",wm=new RegExp(`^${Kk}$`);Sm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Im=/^-?\d+n?$/,Tm=/^-?\d+$/,Wu=/^-?\d+(?:\.\d+)?$/,Em=/^(?:true|false)$/i,Am=/^null$/i,Pm=/^undefined$/i,Cm=/^[^A-Z]*$/,Om=/^[^a-z]*$/,Wz=/^[0-9a-fA-F]*$/;Vz=/^[0-9a-fA-F]{32}$/,qz=qa(22,"=="),Jz=Ja(22),Kz=/^[0-9a-fA-F]{40}$/,Gz=qa(27,"="),Hz=Ja(27),Xz=/^[0-9a-fA-F]{64}$/,Yz=qa(43,"="),Qz=Ja(43),eN=/^[0-9a-fA-F]{96}$/,tN=qa(64,""),rN=Ja(64),nN=/^[0-9a-fA-F]{128}$/,iN=qa(86,"=="),oN=Ja(86)});function Hk(e,t,n){e.issues.length&&t.issues.push(...zr(n,e.issues))}var ut,Xk,qu,Ju,Um,zm,Nm,Rm,Dm,jm,Lm,Fm,Mm,as,Bm,Zm,Wm,Vm,qm,Jm,Km,Gm,Hm,Ku=z(()=>{"use strict";g();Qo();Vu();be();ut=R("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Xk={number:"number",bigint:"bigint",object:"date"},qu=R("$ZodCheckLessThan",(e,t)=>{ut.init(e,t);let n=Xk[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ju=R("$ZodCheckGreaterThan",(e,t)=>{ut.init(e,t);let n=Xk[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Um=R("$ZodCheckMultipleOf",(e,t)=>{ut.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Vh(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),zm=R("$ZodCheckNumberFormat",(e,t)=>{ut.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,s]=Xh[t.format];e._zod.onattach.push(c=>{let u=c._zod.bag;u.format=t.format,u.minimum=r,u.maximum=s,n&&(u.pattern=Tm)}),e._zod.check=c=>{let u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}u<r&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>s&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Nm=R("$ZodCheckBigIntFormat",(e,t)=>{ut.init(e,t);let[n,i]=Yh[t.format];e._zod.onattach.push(r=>{let s=r._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i}),e._zod.check=r=>{let s=r.value;s<n&&r.issues.push({origin:"bigint",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&r.issues.push({origin:"bigint",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Rm=R("$ZodCheckMaxSize",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:Ma(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Dm=R("$ZodCheckMinSize",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:Ma(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jm=R("$ZodCheckSizeEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,s=r.size;if(s===t.size)return;let c=s>t.size;i.issues.push({origin:Ma(r),...c?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Lm=R("$ZodCheckMaxLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let c=Ba(r);i.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fm=R("$ZodCheckMinLength",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let c=Ba(r);i.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mm=R("$ZodCheckLengthEquals",(e,t)=>{var n;ut.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!yi(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,s=r.length;if(s===t.length)return;let c=Ba(r),u=s>t.length;i.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),as=R("$ZodCheckStringFormat",(e,t)=>{var n,i;ut.init(e,t),e._zod.onattach.push(r=>{let s=r._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Bm=R("$ZodCheckRegex",(e,t)=>{as.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Zm=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cm),as.init(e,t)}),Wm=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Om),as.init(e,t)}),Vm=R("$ZodCheckIncludes",(e,t)=>{ut.init(e,t);let n=Kr(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),qm=R("$ZodCheckStartsWith",(e,t)=>{ut.init(e,t);let n=new RegExp(`^${Kr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Jm=R("$ZodCheckEndsWith",(e,t)=>{ut.init(e,t);let n=new RegExp(`.*${Kr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});Km=R("$ZodCheckProperty",(e,t)=>{ut.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Hk(r,n,t.property));Hk(i,n,t.property)}}),Gm=R("$ZodCheckMimeType",(e,t)=>{ut.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Hm=R("$ZodCheckOverwrite",(e,t)=>{ut.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var Ka,Xm=z(()=>{"use strict";g();Ka=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 i=t.split(`
|
|
68
|
-
`).filter(c=>c),r=Math.min(...i.map(c=>c.length-c.trimStart().length)),s=i.map(c=>c.slice(r)).map(c=>" ".repeat(this.indent*2)+c);for(let c of s)this.content.push(c)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,r.join(`
|
|
69
|
-
`))}}});var Ym,Qm=z(()=>{"use strict";g();Ym={major:4,minor:3,patch:5}});function x1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function u0(e){if(!Zu.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return x1(n)}function d0(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}function Qk(e,t,n){e.issues.length&&t.issues.push(...zr(n,e.issues)),t.value[n]=e.value}function Qu(e,t,n,i,r){if(e.issues.length){if(r&&!(n in i))return;t.issues.push(...zr(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function p0(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Hh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function f0(e,t,n,i,r,s){let c=[],u=r.keySet,p=r.catchall._zod,f=p.def.type,v=p.optout==="optional";for(let y in t){if(u.has(y))continue;if(f==="never"){c.push(y);continue}let k=p.run({value:t[y],issues:[]},i);k instanceof Promise?e.push(k.then(I=>Qu(I,n,y,t,v))):Qu(k,n,y,t,v)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}function e0(e,t,n,i){for(let s of e)if(s.issues.length===0)return t.value=s.value,t;let r=e.filter(s=>!wi(s));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(c=>kr(c,i,Pt())))}),t)}function t0(e,t,n,i){let r=e.filter(s=>s.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(s=>s.issues.map(c=>kr(c,i,Pt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}function e1(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(xi(e)&&xi(t)){let n=Object.keys(t),i=Object.keys(e).filter(s=>n.indexOf(s)!==-1),r={...e,...t};for(let s of i){let c=e1(e[s],t[s]);if(!c.valid)return{valid:!1,mergeErrorPath:[s,...c.mergeErrorPath]};r[s]=c.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],s=t[i],c=e1(r,s);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function r0(e,t,n){let i=new Map,r;for(let u of t.issues)if(u.code==="unrecognized_keys"){r??(r=u);for(let p of u.keys)i.has(p)||i.set(p,{}),i.get(p).l=!0}else e.issues.push(u);for(let u of n.issues)if(u.code==="unrecognized_keys")for(let p of u.keys)i.has(p)||i.set(p,{}),i.get(p).r=!0;else e.issues.push(u);let s=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(s.length&&r&&e.issues.push({...r,keys:s}),wi(e))return e;let c=e1(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}function Gu(e,t,n){e.issues.length&&t.issues.push(...zr(n,e.issues)),t.value[n]=e.value}function n0(e,t,n,i,r,s,c){e.issues.length&&(Fa.has(typeof i)?n.issues.push(...zr(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:s,issues:e.issues.map(u=>kr(u,c,Pt()))})),t.issues.length&&(Fa.has(typeof i)?n.issues.push(...zr(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:s,key:i,issues:t.issues.map(u=>kr(u,c,Pt()))})),n.value.set(e.value,t.value)}function i0(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function o0(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}function s0(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function a0(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Hu(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function Xu(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(s=>Yu(e,s,t.out,n)):Yu(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(s=>Yu(e,s,t.in,n)):Yu(e,r,t.in,n)}}function Yu(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}function c0(e){return e.value=Object.freeze(e.value),e}function l0(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(rs(r))}}var Pe,eo,st,t1,r1,n1,i1,o1,s1,a1,c1,l1,u1,d1,p1,f1,h1,m1,g1,_1,v1,y1,b1,w1,k1,$1,S1,I1,ed,T1,Ga,td,E1,A1,P1,C1,O1,U1,z1,N1,R1,D1,h0,j1,Ha,L1,F1,M1,rd,B1,Z1,W1,V1,q1,J1,K1,nd,G1,H1,X1,Y1,Q1,eg,tg,rg,ng,Xa,ig,og,sg,ag,cg,lg,ug=z(()=>{"use strict";g();Ku();Qo();Xm();im();Vu();be();Qm();be();Pe=R("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ym;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let s of r._zod.onattach)s(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(c,u,p)=>{let f=wi(c),v;for(let y of u){if(y._zod.def.when){if(!y._zod.def.when(c))continue}else if(f)continue;let k=c.issues.length,I=y._zod.check(c);if(I instanceof Promise&&p?.async===!1)throw new cn;if(v||I instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await I,c.issues.length!==k&&(f||(f=wi(c,k)))});else{if(c.issues.length===k)continue;f||(f=wi(c,k))}}return v?v.then(()=>c):c},s=(c,u,p)=>{if(wi(c))return c.aborted=!0,c;let f=r(u,i,p);if(f instanceof Promise){if(p.async===!1)throw new cn;return f.then(v=>e._zod.parse(v,p))}return e._zod.parse(f,p)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){let f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(v=>s(v,c,u)):s(f,c,u)}let p=e._zod.parse(c,u);if(p instanceof Promise){if(u.async===!1)throw new cn;return p.then(f=>r(f,i,u))}return r(p,i,u)}}Ne(e,"~standard",()=>({validate:r=>{try{let s=rm(e,r);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return nm(e,r).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),eo=R("$ZodString",(e,t)=>{Pe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sm(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),st=R("$ZodStringFormat",(e,t)=>{as.init(e,t),eo.init(e,t)}),t1=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=pm),st.init(e,t)}),r1=R("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Qi(i))}else t.pattern??(t.pattern=Qi());st.init(e,t)}),n1=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=fm),st.init(e,t)}),i1=R("$ZodURL",(e,t)=>{st.init(e,t),e._zod.check=n=>{try{let i=n.value.trim(),r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),o1=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hm()),st.init(e,t)}),s1=R("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=um),st.init(e,t)}),a1=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=om),st.init(e,t)}),c1=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=sm),st.init(e,t)}),l1=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=am),st.init(e,t)}),u1=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=cm),st.init(e,t)}),d1=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lm),st.init(e,t)}),p1=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$m(t)),st.init(e,t)}),f1=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wm),st.init(e,t)}),h1=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=km(t)),st.init(e,t)}),m1=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=dm),st.init(e,t)}),g1=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mm),st.init(e,t),e._zod.bag.format="ipv4"}),_1=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=gm),st.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),v1=R("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=_m(t.delimiter)),st.init(e,t),e._zod.bag.format="mac"}),y1=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=vm),st.init(e,t)}),b1=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=ym),st.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,s]=i;if(!s)throw new Error;let c=Number(s);if(`${c}`!==s)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});w1=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bm),st.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{x1(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});k1=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Zu),st.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{u0(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),$1=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=xm),st.init(e,t)});S1=R("$ZodJWT",(e,t)=>{st.init(e,t),e._zod.check=n=>{d0(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),I1=R("$ZodCustomStringFormat",(e,t)=>{st.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),ed=R("$ZodNumber",(e,t)=>{Pe.init(e,t),e._zod.pattern=e._zod.bag.pattern??Wu,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let s=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...s?{received:s}:{}}),n}}),T1=R("$ZodNumberFormat",(e,t)=>{zm.init(e,t),ed.init(e,t)}),Ga=R("$ZodBoolean",(e,t)=>{Pe.init(e,t),e._zod.pattern=Em,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),td=R("$ZodBigInt",(e,t)=>{Pe.init(e,t),e._zod.pattern=Im,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),E1=R("$ZodBigIntFormat",(e,t)=>{Nm.init(e,t),td.init(e,t)}),A1=R("$ZodSymbol",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),P1=R("$ZodUndefined",(e,t)=>{Pe.init(e,t),e._zod.pattern=Pm,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),C1=R("$ZodNull",(e,t)=>{Pe.init(e,t),e._zod.pattern=Am,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),O1=R("$ZodAny",(e,t)=>{Pe.init(e,t),e._zod.parse=n=>n}),U1=R("$ZodUnknown",(e,t)=>{Pe.init(e,t),e._zod.parse=n=>n}),z1=R("$ZodNever",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),N1=R("$ZodVoid",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),R1=R("$ZodDate",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,s=r instanceof Date;return s&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...s?{received:"Invalid Date"}:{},inst:e}),n}});D1=R("$ZodArray",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let s=[];for(let c=0;c<r.length;c++){let u=r[c],p=t.element._zod.run({value:u,issues:[]},i);p instanceof Promise?s.push(p.then(f=>Qk(f,n,c))):Qk(p,n,c)}return s.length?Promise.all(s).then(()=>n):n}});h0=R("$ZodObject",(e,t)=>{if(Pe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p}})}let i=ts(()=>p0(t));Ne(e._zod,"propValues",()=>{let u=t.shape,p={};for(let f in u){let v=u[f]._zod;if(v.values){p[f]??(p[f]=new Set);for(let y of v.values)p[f].add(y)}}return p});let r=Yi,s=t.catchall,c;e._zod.parse=(u,p)=>{c??(c=i.value);let f=u.value;if(!r(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};let v=[],y=c.shape;for(let k of c.keys){let I=y[k],$=I._zod.optout==="optional",O=I._zod.run({value:f[k],issues:[]},p);O instanceof Promise?v.push(O.then(F=>Qu(F,u,k,f,$))):Qu(O,u,k,f,$)}return s?f0(v,f,u,p,i.value,e):v.length?Promise.all(v).then(()=>u):u}}),j1=R("$ZodObjectJIT",(e,t)=>{h0.init(e,t);let n=e._zod.parse,i=ts(()=>p0(t)),r=k=>{let I=new Ka(["shape","payload","ctx"]),$=i.value,O=H=>{let W=Cu(H);return`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`};I.write("const input = payload.value;");let F=Object.create(null),Z=0;for(let H of $.keys)F[H]=`key_${Z++}`;I.write("const newResult = {};");for(let H of $.keys){let W=F[H],ee=Cu(H),Y=k[H]?._zod?.optout==="optional";I.write(`const ${W} = ${O(H)};`),Y?I.write(`
|
|
70
|
-
if (${W}.issues.length) {
|
|
71
|
-
if (${ee} in input) {
|
|
72
|
-
payload.issues = payload.issues.concat(${W}.issues.map(iss => ({
|
|
73
|
-
...iss,
|
|
74
|
-
path: iss.path ? [${ee}, ...iss.path] : [${ee}]
|
|
75
|
-
})));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (${W}.value === undefined) {
|
|
80
|
-
if (${ee} in input) {
|
|
81
|
-
newResult[${ee}] = undefined;
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
newResult[${ee}] = ${W}.value;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
`):I.write(`
|
|
88
|
-
if (${W}.issues.length) {
|
|
89
|
-
payload.issues = payload.issues.concat(${W}.issues.map(iss => ({
|
|
90
|
-
...iss,
|
|
91
|
-
path: iss.path ? [${ee}, ...iss.path] : [${ee}]
|
|
92
|
-
})));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (${W}.value === undefined) {
|
|
96
|
-
if (${ee} in input) {
|
|
97
|
-
newResult[${ee}] = undefined;
|
|
98
|
-
}
|
|
99
|
-
} else {
|
|
100
|
-
newResult[${ee}] = ${W}.value;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
`)}I.write("payload.value = newResult;"),I.write("return payload;");let M=I.compile();return(H,W)=>M(k,H,W)},s,c=Yi,u=!Ra.jitless,f=u&&Jh.value,v=t.catchall,y;e._zod.parse=(k,I)=>{y??(y=i.value);let $=k.value;return c($)?u&&f&&I?.async===!1&&I.jitless!==!0?(s||(s=r(t.shape)),k=s(k,I),v?f0([],$,k,I,y,e):k):n(k,I):(k.issues.push({expected:"object",code:"invalid_type",input:$,inst:e}),k)}});Ha=R("$ZodUnion",(e,t)=>{Pe.init(e,t),Ne(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Ne(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>La(s.source)).join("|")})$`)}});let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,s)=>{if(n)return i(r,s);let c=!1,u=[];for(let p of t.options){let f=p._zod.run({value:r.value,issues:[]},s);if(f instanceof Promise)u.push(f),c=!0;else{if(f.issues.length===0)return f;u.push(f)}}return c?Promise.all(u).then(p=>e0(p,r,e,s)):e0(u,r,e,s)}});L1=R("$ZodXor",(e,t)=>{Ha.init(e,t),t.inclusive=!1;let n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(r,s)=>{if(n)return i(r,s);let c=!1,u=[];for(let p of t.options){let f=p._zod.run({value:r.value,issues:[]},s);f instanceof Promise?(u.push(f),c=!0):u.push(f)}return c?Promise.all(u).then(p=>t0(p,r,e,s)):t0(u,r,e,s)}}),F1=R("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ha.init(e,t);let n=e._zod.parse;Ne(e._zod,"propValues",()=>{let r={};for(let s of t.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let[u,p]of Object.entries(c)){r[u]||(r[u]=new Set);for(let f of p)r[u].add(f)}}return r});let i=ts(()=>{let r=t.options,s=new Map;for(let c of r){let u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(let p of u){if(s.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);s.set(p,c)}}return s});e._zod.parse=(r,s)=>{let c=r.value;if(!Yi(c))return r.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),r;let u=i.value.get(c?.[t.discriminator]);return u?u._zod.run(r,s):t.unionFallback?n(r,s):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),r)}}),M1=R("$ZodIntersection",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,s=t.left._zod.run({value:r,issues:[]},i),c=t.right._zod.run({value:r,issues:[]},i);return s instanceof Promise||c instanceof Promise?Promise.all([s,c]).then(([p,f])=>r0(n,p,f)):r0(n,s,c)}});rd=R("$ZodTuple",(e,t)=>{Pe.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let s=i.value;if(!Array.isArray(s))return i.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let c=[],u=[...n].reverse().findIndex(v=>v._zod.optin!=="optional"),p=u===-1?0:n.length-u;if(!t.rest){let v=s.length>n.length,y=s.length<p-1;if(v||y)return i.issues.push({...v?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:s,inst:e,origin:"array"}),i}let f=-1;for(let v of n){if(f++,f>=s.length&&f>=p)continue;let y=v._zod.run({value:s[f],issues:[]},r);y instanceof Promise?c.push(y.then(k=>Gu(k,i,f))):Gu(y,i,f)}if(t.rest){let v=s.slice(n.length);for(let y of v){f++;let k=t.rest._zod.run({value:y,issues:[]},r);k instanceof Promise?c.push(k.then(I=>Gu(I,i,f))):Gu(k,i,f)}}return c.length?Promise.all(c).then(()=>i):i}});B1=R("$ZodRecord",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!xi(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let s=[],c=t.keyType._zod.values;if(c){n.value={};let u=new Set;for(let f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);let v=t.valueType._zod.run({value:r[f],issues:[]},i);v instanceof Promise?s.push(v.then(y=>{y.issues.length&&n.issues.push(...zr(f,y.issues)),n.value[f]=y.value})):(v.issues.length&&n.issues.push(...zr(f,v.issues)),n.value[f]=v.value)}let p;for(let f in r)u.has(f)||(p=p??[],p.push(f));p&&p.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:p})}else{n.value={};for(let u of Reflect.ownKeys(r)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&Wu.test(u)&&p.issues.length&&p.issues.some(y=>y.code==="invalid_type"&&y.expected==="number")){let y=t.keyType._zod.run({value:Number(u),issues:[]},i);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(p=y)}if(p.issues.length){t.mode==="loose"?n.value[u]=r[u]:n.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(y=>kr(y,i,Pt())),input:u,path:[u],inst:e});continue}let v=t.valueType._zod.run({value:r[u],issues:[]},i);v instanceof Promise?s.push(v.then(y=>{y.issues.length&&n.issues.push(...zr(u,y.issues)),n.value[p.value]=y.value})):(v.issues.length&&n.issues.push(...zr(u,v.issues)),n.value[p.value]=v.value)}}return s.length?Promise.all(s).then(()=>n):n}}),Z1=R("$ZodMap",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let s=[];n.value=new Map;for(let[c,u]of r){let p=t.keyType._zod.run({value:c,issues:[]},i),f=t.valueType._zod.run({value:u,issues:[]},i);p instanceof Promise||f instanceof Promise?s.push(Promise.all([p,f]).then(([v,y])=>{n0(v,y,n,c,r,e,i)})):n0(p,f,n,c,r,e,i)}return s.length?Promise.all(s).then(()=>n):n}});W1=R("$ZodSet",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let s=[];n.value=new Set;for(let c of r){let u=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise?s.push(u.then(p=>i0(p,n))):i0(u,n)}return s.length?Promise.all(s).then(()=>n):n}});V1=R("$ZodEnum",(e,t)=>{Pe.init(e,t);let n=ja(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>Fa.has(typeof r)).map(r=>typeof r=="string"?Kr(r):r.toString()).join("|")})$`),e._zod.parse=(r,s)=>{let c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:n,input:c,inst:e}),r}}),q1=R("$ZodLiteral",(e,t)=>{if(Pe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Kr(i):i?Kr(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let s=i.value;return n.has(s)||i.issues.push({code:"invalid_value",values:t.values,input:s,inst:e}),i}}),J1=R("$ZodFile",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),K1=R("$ZodTransform",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new vi(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(c=>(n.value=c,n));if(r instanceof Promise)throw new cn;return n.value=r,n}});nd=R("$ZodOptional",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${La(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>o0(s,n.value)):o0(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),G1=R("$ZodExactOptional",(e,t)=>{nd.init(e,t),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),H1=R("$ZodNullable",(e,t)=>{Pe.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${La(n.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),X1=R("$ZodDefault",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>s0(s,t)):s0(r,t)}});Y1=R("$ZodPrefault",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Q1=R("$ZodNonOptional",(e,t)=>{Pe.init(e,t),Ne(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>a0(s,e)):a0(r,e)}});eg=R("$ZodSuccess",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new vi("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>(n.value=s.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),tg=R("$ZodCatch",(e,t)=>{Pe.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(s=>(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(c=>kr(c,i,Pt()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(s=>kr(s,i,Pt()))},input:n.value}),n.issues=[]),n)}}),rg=R("$ZodNaN",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),ng=R("$ZodPipe",(e,t)=>{Pe.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let s=t.out._zod.run(n,i);return s instanceof Promise?s.then(c=>Hu(c,t.in,i)):Hu(s,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(s=>Hu(s,t.out,i)):Hu(r,t.out,i)}});Xa=R("$ZodCodec",(e,t)=>{Pe.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let s=t.in._zod.run(n,i);return s instanceof Promise?s.then(c=>Xu(c,t,i)):Xu(s,t,i)}else{let s=t.out._zod.run(n,i);return s instanceof Promise?s.then(c=>Xu(c,t,i)):Xu(s,t,i)}}});ig=R("$ZodReadonly",(e,t)=>{Pe.init(e,t),Ne(e._zod,"propValues",()=>t.innerType._zod.propValues),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"optin",()=>t.innerType?._zod?.optin),Ne(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(c0):c0(r)}});og=R("$ZodTemplateLiteral",(e,t)=>{Pe.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let s=r.startsWith("^")?1:0,c=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(s,c))}else if(i===null||Gh.has(typeof i))n.push(Kr(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),sg=R("$ZodFunction",(e,t)=>(Pe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?Uu(e._def.input,i):i,s=Reflect.apply(n,this,r);return e._def.output?Uu(e._def.output,s):s}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await zu(e._def.input,i):i,s=await Reflect.apply(n,this,r);return e._def.output?await zu(e._def.output,s):s}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new rd({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),ag=R("$ZodPromise",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),cg=R("$ZodLazy",(e,t)=>{Pe.init(e,t),Ne(e._zod,"innerType",()=>t.getter()),Ne(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ne(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ne(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ne(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),lg=R("$ZodCustom",(e,t)=>{ut.init(e,t),Pe.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(s=>l0(s,n,i,e));l0(r,n,i,e)}})});function m0(){return{localeError:aN()}}var aN,g0=z(()=>{"use strict";g();be();aN=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${s}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${te(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${r.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${s} ${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${r.minimum.toString()} ${c.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${s} ${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:s.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${s.suffix}"`:s.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${s.includes}"`:s.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${s.pattern}`:`${n[s.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function _0(){return{localeError:cN()}}var cN,v0=z(()=>{"use strict";g();be();cN=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${s}, daxil olan ${u}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${te(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${s}${r.maximum.toString()} ${c.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${s}${r.minimum.toString()} ${c.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${s.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:s.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${s.suffix}" il\u0259 bitm\u0259lidir`:s.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${s.includes}" daxil olmal\u0131d\u0131r`:s.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${s.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[s.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function y0(e,t,n,i){let r=Math.abs(e),s=r%10,c=r%100;return c>=11&&c<=19?i:s===1?t:s>=2&&s<=4?n:i}function b0(){return{localeError:lN()}}var lN,x0=z(()=>{"use strict";g();be();lN=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${s}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${te(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);if(c){let u=Number(r.maximum),p=y0(u,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${r.maximum.toString()} ${p}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);if(c){let u=Number(r.minimum),p=y0(u,c.unit.one,c.unit.few,c.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${c.verb} ${s}${r.minimum.toString()} ${p}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[s.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function w0(){return{localeError:uN()}}var uN,k0=z(()=>{"use strict";g();be();uN=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${te(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${r.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${s}${r.minimum.toString()} ${c.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;if(s.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${s.prefix}"`;if(s.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${s.suffix}"`;if(s.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${s.includes}"`;if(s.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${s.pattern}`;let c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return s.format==="emoji"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="datetime"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="date"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),s.format==="time"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),s.format==="duration"&&(c="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${c} ${n[s.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function $0(){return{localeError:dN()}}var dN,S0=z(()=>{"use strict";g();be();dN=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${s}, s'ha rebut ${u}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${te(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${L(r.values," o ")}`;case"too_big":{let s=r.inclusive?"com a m\xE0xim":"menys de",c=t(r.origin);return c?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${s} ${r.maximum.toString()} ${c.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${s} ${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?"com a m\xEDnim":"m\xE9s de",c=t(r.origin);return c?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${s} ${r.minimum.toString()} ${c.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${s} ${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${s.prefix}"`:s.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format inv\xE0lid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${s.pattern}`:`Format inv\xE0lid per a ${n[s.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function I0(){return{localeError:pN()}}var pN,T0=z(()=>{"use strict";g();be();pN=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${s}, obdr\u017Eeno ${u}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${te(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${s}${r.maximum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${s}${r.minimum.toString()} ${c.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${s.prefix}"`:s.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${s.suffix}"`:s.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${s.includes}"`:s.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${s.pattern}`:`Neplatn\xFD form\xE1t ${n[s.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${L(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function E0(){return{localeError:fN()}}var fN,A0=z(()=>{"use strict";g();be();fN=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${u}`:`Ugyldigt input: forventede ${s}, fik ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${te(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin),u=i[r.origin]??r.origin;return c?`For stor: forventede ${u??"value"} ${c.verb} ${s} ${r.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${s} ${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin),u=i[r.origin]??r.origin;return c?`For lille: forventede ${u} ${c.verb} ${s} ${r.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${s} ${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${n[s.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function P0(){return{localeError:hN()}}var hN,C0=z(()=>{"use strict";g();be();hN=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${s}, erhalten ${u}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${te(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${s}${r.maximum.toString()} ${c.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${s}${r.maximum.toString()} ist`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Zu klein: erwartet, dass ${r.origin} ${s}${r.minimum.toString()} ${c.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${s}${r.minimum.toString()} ist`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ung\xFCltiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ung\xFCltiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ung\xFCltiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${s.pattern} entsprechen`:`Ung\xFCltig: ${n[s.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function id(){return{localeError:mN()}}var mN,dg=z(()=>{"use strict";g();be();mN=()=>{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"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={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",mac:"MAC 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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return`Invalid input: expected ${s}, received ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.values[0])}`:`Invalid option: expected one of ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Too big: expected ${r.origin??"value"} to have ${s}${r.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Too small: expected ${r.origin} to have ${s}${r.minimum.toString()} ${c.unit}`:`Too small: expected ${r.origin} to be ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${n[s.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function O0(){return{localeError:gN()}}var gN,U0=z(()=>{"use strict";g();be();gN=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${s}, ricevi\u011Dis ${u}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${te(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${s}${r.maximum.toString()} ${c.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${s}${r.minimum.toString()} ${c.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${s.prefix}"`:s.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${s.suffix}"`:s.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${s.includes}"`:s.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${s.pattern}`:`Nevalida ${n[s.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function z0(){return{localeError:_N()}}var _N,N0=z(()=>{"use strict";g();be();_N=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${s}, recibido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${te(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin),u=i[r.origin]??r.origin;return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${s}${r.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin),u=i[r.origin]??r.origin;return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${s}${r.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${n[s.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function R0(){return{localeError:vN()}}var vN,D0=z(()=>{"use strict";g();be();vN=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${s} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${te(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${L(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${r.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${s}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${s}${r.minimum.toString()} ${c.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${s}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:s.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${s.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:s.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${s.includes}" \u0628\u0627\u0634\u062F`:s.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${s.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[s.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${L(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function j0(){return{localeError:yN()}}var yN,L0=z(()=>{"use strict";g();be();yN=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${s}, oli ${u}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${te(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Liian suuri: ${c.subject} t\xE4ytyy olla ${s}${r.maximum.toString()} ${c.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Liian pieni: ${c.subject} t\xE4ytyy olla ${s}${r.minimum.toString()} ${c.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${s.includes}"`:s.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${s.pattern}`:`Virheellinen ${n[s.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${L(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function F0(){return{localeError:bN()}}var bN,M0=z(()=>{"use strict";g();be();bN=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${s} attendu, ${u} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${te(r.values[0])} attendu`:`Option invalide : une valeur parmi ${L(r.values,"|")} attendue`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Trop grand : ${r.origin??"valeur"} doit ${c.verb} ${s}${r.maximum.toString()} ${c.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Trop petit : ${r.origin} doit ${c.verb} ${s}${r.minimum.toString()} ${c.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${s.pattern}`:`${n[s.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function B0(){return{localeError:xN()}}var xN,Z0=z(()=>{"use strict";g();be();xN=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${s}, re\xE7u ${u}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${te(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"\u2264":"<",c=t(r.origin);return c?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${s}${r.maximum.toString()} ${c.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?"\u2265":">",c=t(r.origin);return c?`Trop petit : attendu que ${r.origin} ait ${s}${r.minimum.toString()} ${c.unit}`:`Trop petit : attendu que ${r.origin} soit ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Cha\xEEne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${s.pattern}`:`${n[s.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${L(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function W0(){return{localeError:wN()}}var wN,V0=z(()=>{"use strict";g();be();wN=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=f=>f?e[f]:void 0,i=f=>{let v=n(f);return v?v.label:f??e.unknown.label},r=f=>`\u05D4${i(f)}`,s=f=>(n(f)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",c=f=>f?t[f]??null:null,u={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},p={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{let v=f.expected,y=p[v??""]??i(v),k=re(f.input),I=p[k]??e[k]?.label??k;return/^[A-Z]/.test(f.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${f.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${I}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}, \u05D4\u05EA\u05E7\u05D1\u05DC ${I}`}case"invalid_value":{if(f.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${te(f.values[0])}`;let v=f.values.map(I=>te(I));if(f.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${v[0]} \u05D0\u05D5 ${v[1]}`;let y=v[v.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${v.slice(0,-1).join(", ")} \u05D0\u05D5 ${y}`}case"too_big":{let v=c(f.origin),y=r(f.origin??"value");if(f.origin==="string")return`${v?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.maximum.toString()} ${v?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(f.origin==="number"){let $=f.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${f.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${$}`}if(f.origin==="array"||f.origin==="set"){let $=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",O=f.inclusive?`${f.maximum} ${v?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${f.maximum} ${v?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${O}`.trim()}let k=f.inclusive?"<=":"<",I=s(f.origin??"value");return v?.unit?`${v.longLabel} \u05DE\u05D3\u05D9: ${y} ${I} ${k}${f.maximum.toString()} ${v.unit}`:`${v?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${y} ${I} ${k}${f.maximum.toString()}`}case"too_small":{let v=c(f.origin),y=r(f.origin??"value");if(f.origin==="string")return`${v?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.minimum.toString()} ${v?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(f.origin==="number"){let $=f.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${f.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${$}`}if(f.origin==="array"||f.origin==="set"){let $=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(f.minimum===1&&f.inclusive){let F=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${F}`}let O=f.inclusive?`${f.minimum} ${v?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${f.minimum} ${v?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${$} \u05DC\u05D4\u05DB\u05D9\u05DC ${O}`.trim()}let k=f.inclusive?">=":">",I=s(f.origin??"value");return v?.unit?`${v.shortLabel} \u05DE\u05D3\u05D9: ${y} ${I} ${k}${f.minimum.toString()} ${v.unit}`:`${v?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${y} ${I} ${k}${f.minimum.toString()}`}case"invalid_format":{let v=f;if(v.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${v.prefix}"`;if(v.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${v.suffix}"`;if(v.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${v.includes}"`;if(v.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${v.pattern}`;let y=u[v.format],k=y?.label??v.format,$=(y?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${k} \u05DC\u05D0 ${$}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${f.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${f.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${f.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${L(f.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(f.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function q0(){return{localeError:kN()}}var kN,J0=z(()=>{"use strict";g();be();kN=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${s}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${te(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${s}${r.maximum.toString()} ${c.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${s}${r.minimum.toString()} ${c.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\xC9rv\xE9nytelen string: "${s.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:s.format==="ends_with"?`\xC9rv\xE9nytelen string: "${s.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:s.format==="includes"?`\xC9rv\xE9nytelen string: "${s.includes}" \xE9rt\xE9ket kell tartalmaznia`:s.format==="regex"?`\xC9rv\xE9nytelen string: ${s.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[s.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function K0(e,t,n){return Math.abs(e)===1?t:n}function cs(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}function G0(){return{localeError:$N()}}var $N,H0=z(()=>{"use strict";g();be();$N=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${s}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${te(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);if(c){let u=Number(r.maximum),p=K0(u,c.unit.one,c.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${r.maximum.toString()} ${p}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);if(c){let u=Number(r.minimum),p=K0(u,c.unit.one,c.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${s}${r.minimum.toString()} ${p}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${cs(r.origin)} \u056C\u056B\u0576\u056B ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${s.prefix}"-\u0578\u057E`:s.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${s.suffix}"-\u0578\u057E`:s.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${s.includes}"`:s.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${s.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[s.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${L(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${cs(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${cs(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function X0(){return{localeError:SN()}}var SN,Y0=z(()=>{"use strict";g();be();SN=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${s}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${te(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${s}${r.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Terlalu kecil: diharapkan ${r.origin} memiliki ${s}${r.minimum.toString()} ${c.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${n[s.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Q0(){return{localeError:IN()}}var IN,e$=z(()=>{"use strict";g();be();IN=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${s}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${te(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${s}${r.maximum.toString()} ${c.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${s}${r.minimum.toString()} ${c.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${s.prefix}"`:s.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${s.suffix}"`:s.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${s.includes}"`:s.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${s.pattern}`:`Rangt ${n[s.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${L(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function t$(){return{localeError:TN()}}var TN,r$=z(()=>{"use strict";g();be();TN=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${u}`:`Input non valido: atteso ${s}, ricevuto ${u}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${te(r.values[0])}`:`Opzione non valida: atteso uno tra ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Troppo grande: ${r.origin??"valore"} deve avere ${s}${r.maximum.toString()} ${c.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Troppo piccolo: ${r.origin} deve avere ${s}${r.minimum.toString()} ${c.unit}`:`Troppo piccolo: ${r.origin} deve essere ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${n[s.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${L(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function n$(){return{localeError:EN()}}var EN,i$=z(()=>{"use strict";g();be();EN=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${s}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${te(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${L(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let s=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",c=t(r.origin);return c?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${c.unit??"\u8981\u7D20"}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let s=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",c=t(r.origin);return c?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${c.unit}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${s.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:s.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${s.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[s.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function o$(){return{localeError:AN()}}var AN,s$=z(()=>{"use strict";g();be();AN=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${s}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${te(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${L(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${c.verb} ${s}${r.maximum.toString()} ${c.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${c.verb} ${s}${r.minimum.toString()} ${c.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.prefix}"-\u10D8\u10D7`:s.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${s.suffix}"-\u10D8\u10D7`:s.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${s.includes}"-\u10E1`:s.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${s.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function od(){return{localeError:PN()}}var PN,pg=z(()=>{"use strict";g();be();PN=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${s} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${te(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${r.maximum.toString()} ${c.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${s} ${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${s} ${r.minimum.toString()} ${c.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${s} ${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${s.prefix}"`:s.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${s.suffix}"`:s.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${s.includes}"`:s.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${s.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${L(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function a$(){return od()}var c$=z(()=>{"use strict";g();pg()});function l$(){return{localeError:CN()}}var CN,u$=z(()=>{"use strict";g();be();CN=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${s}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${te(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${L(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let s=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",c=s==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),p=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${p} ${s}${c}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${s}${c}`}case"too_small":{let s=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",c=s==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(r.origin),p=u?.unit??"\uC694\uC18C";return u?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${p} ${s}${c}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${s}${c}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:s.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${s.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:s.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${s.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[s.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${L(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function d$(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}function p$(){return{localeError:ON()}}var Ya,ON,f$=z(()=>{"use strict";g();be();Ya=e=>e.charAt(0).toUpperCase()+e.slice(1);ON=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,s,c,u){let p=e[r]??null;return p===null?p:{unit:p.unit[s],verb:p.verb[u][c?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${s}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${te(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${L(r.values,"|")} pasirinkim\u0173`;case"too_big":{let s=i[r.origin]??r.origin,c=t(r.origin,d$(Number(r.maximum)),r.inclusive??!1,"smaller");if(c?.verb)return`${Ya(s??r.origin??"reik\u0161m\u0117")} ${c.verb} ${r.maximum.toString()} ${c.unit??"element\u0173"}`;let u=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Ya(s??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.maximum.toString()} ${c?.unit}`}case"too_small":{let s=i[r.origin]??r.origin,c=t(r.origin,d$(Number(r.minimum)),r.inclusive??!1,"bigger");if(c?.verb)return`${Ya(s??r.origin??"reik\u0161m\u0117")} ${c.verb} ${r.minimum.toString()} ${c.unit??"element\u0173"}`;let u=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Ya(s??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${r.minimum.toString()} ${c?.unit}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${s.prefix}"`:s.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${s.suffix}"`:s.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${s.includes}"`:s.format==="regex"?`Eilut\u0117 privalo atitikti ${s.pattern}`:`Neteisingas ${n[s.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${L(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let s=i[r.origin]??r.origin;return`${Ya(s??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function h$(){return{localeError:UN()}}var UN,m$=z(()=>{"use strict";g();be();UN=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${s}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${te(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${s}${r.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${s}${r.minimum.toString()} ${c.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${s.pattern}`:`Invalid ${n[s.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function g$(){return{localeError:zN()}}var zN,_$=z(()=>{"use strict";g();be();zN=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${u}`:`Input tidak sah: dijangka ${s}, diterima ${u}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${te(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Terlalu besar: dijangka ${r.origin??"nilai"} ${c.verb} ${s}${r.maximum.toString()} ${c.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Terlalu kecil: dijangka ${r.origin} ${c.verb} ${s}${r.minimum.toString()} ${c.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${n[s.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${L(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function v$(){return{localeError:NN()}}var NN,y$=z(()=>{"use strict";g();be();NN=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${s}, ontving ${u}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${te(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin),u=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return c?`Te ${u}: verwacht dat ${r.origin??"waarde"} ${s}${r.maximum.toString()} ${c.unit??"elementen"} ${c.verb}`:`Te ${u}: verwacht dat ${r.origin??"waarde"} ${s}${r.maximum.toString()} is`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin),u=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return c?`Te ${u}: verwacht dat ${r.origin} ${s}${r.minimum.toString()} ${c.unit} ${c.verb}`:`Te ${u}: verwacht dat ${r.origin} ${s}${r.minimum.toString()} is`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${n[s.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function b$(){return{localeError:RN()}}var RN,x$=z(()=>{"use strict";g();be();RN=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${u}`:`Ugyldig input: forventet ${s}, fikk ${u}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${te(r.values[0])}`:`Ugyldig valg: forventet en av ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${s}${r.maximum.toString()} ${c.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`For lite(n): forventet ${r.origin} til \xE5 ha ${s}${r.minimum.toString()} ${c.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${n[s.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function w$(){return{localeError:DN()}}var DN,k$=z(()=>{"use strict";g();be();DN=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${s}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${te(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${s}${r.maximum.toString()} ${c.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${s}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${s}${r.minimum.toString()} ${c.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${s}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let s=r;return s.format==="starts_with"?`F\xE2sit metin: "${s.prefix}" ile ba\u015Flamal\u0131.`:s.format==="ends_with"?`F\xE2sit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`F\xE2sit metin: "${s.includes}" ihtiv\xE2 etmeli.`:s.format==="regex"?`F\xE2sit metin: ${s.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[s.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function $$(){return{localeError:jN()}}var jN,S$=z(()=>{"use strict";g();be();jN=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${s} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${te(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${L(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${r.maximum.toString()} ${c.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${s}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${s}${r.minimum.toString()} ${c.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${s}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:s.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${s.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:s.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${s.includes}" \u0648\u0644\u0631\u064A`:s.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${s.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[s.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${L(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function I$(){return{localeError:LN()}}var LN,T$=z(()=>{"use strict";g();be();LN=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${s}, otrzymano ${u}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${te(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${r.maximum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${s}${r.minimum.toString()} ${c.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${s.prefix}"`:s.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${s.suffix}"`:s.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${s.includes}"`:s.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${s.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[s.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function E$(){return{localeError:FN()}}var FN,A$=z(()=>{"use strict";g();be();FN=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${s}, recebido ${u}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${te(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${s}${r.maximum.toString()} ${c.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Muito pequeno: esperado que ${r.origin} tivesse ${s}${r.minimum.toString()} ${c.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`${n[s.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${L(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function P$(e,t,n,i){let r=Math.abs(e),s=r%10,c=r%100;return c>=11&&c<=19?i:s===1?t:s>=2&&s<=4?n:i}function C$(){return{localeError:MN()}}var MN,O$=z(()=>{"use strict";g();be();MN=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${s}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${te(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);if(c){let u=Number(r.maximum),p=P$(u,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${r.maximum.toString()} ${p}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);if(c){let u=Number(r.minimum),p=P$(u,c.unit.one,c.unit.few,c.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${s}${r.minimum.toString()} ${p}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function U$(){return{localeError:BN()}}var BN,z$=z(()=>{"use strict";g();be();BN=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${s}, prejeto ${u}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${te(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${s}${r.maximum.toString()} ${c.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${s}${r.minimum.toString()} ${c.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${n[s.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${L(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function N$(){return{localeError:ZN()}}var ZN,R$=z(()=>{"use strict";g();be();ZN=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${s}, fick ${u}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${te(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${s}${r.maximum.toString()} ${c.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${s}${r.minimum.toString()} ${c.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${s.includes}"`:s.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${s.pattern}"`:`Ogiltig(t) ${n[s.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${L(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function D$(){return{localeError:WN()}}var WN,j$=z(()=>{"use strict";g();be();WN=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${te(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${r.maximum.toString()} ${c.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${s}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${s}${r.minimum.toString()} ${c.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${s}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${s.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:s.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${s.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function L$(){return{localeError:VN()}}var VN,F$=z(()=>{"use strict";g();be();VN=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${s} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${te(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",c=t(r.origin);return c?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${r.maximum.toString()} ${c.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",c=t(r.origin);return c?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${r.minimum.toString()} ${c.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${s} ${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${s.prefix}"`:s.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${s.suffix}"`:s.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${s.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:s.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${s.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[s.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${L(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function M$(){return{localeError:qN()}}var qN,B$=z(()=>{"use strict";g();be();qN=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${s}, al\u0131nan ${u}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${te(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${s}${r.maximum.toString()} ${c.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${s}${r.minimum.toString()} ${c.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Ge\xE7ersiz metin: "${s.prefix}" ile ba\u015Flamal\u0131`:s.format==="ends_with"?`Ge\xE7ersiz metin: "${s.suffix}" ile bitmeli`:s.format==="includes"?`Ge\xE7ersiz metin: "${s.includes}" i\xE7ermeli`:s.format==="regex"?`Ge\xE7ersiz metin: ${s.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[s.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function sd(){return{localeError:JN()}}var JN,fg=z(()=>{"use strict";g();be();JN=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${s}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${te(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${c.verb} ${s}${r.maximum.toString()} ${c.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${c.verb} ${s}${r.minimum.toString()} ${c.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${s.prefix}"`:s.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${s.suffix}"`:s.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${s.includes}"`:s.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${s.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${L(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function Z$(){return sd()}var W$=z(()=>{"use strict";g();fg()});function V$(){return{localeError:KN()}}var KN,q$=z(()=>{"use strict";g();be();KN=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${s} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${te(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${L(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${s}${r.maximum.toString()} ${c.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${s}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${s}${r.minimum.toString()} ${c.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${s}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${s.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:s.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${s.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${L(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function J$(){return{localeError:GN()}}var GN,K$=z(()=>{"use strict";g();be();GN=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${s}, qabul qilingan ${u}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${te(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Juda katta: kutilgan ${r.origin??"qiymat"} ${s}${r.maximum.toString()} ${c.unit} ${c.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Juda kichik: kutilgan ${r.origin} ${s}${r.minimum.toString()} ${c.unit} ${c.verb}`:`Juda kichik: kutilgan ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${s.prefix}" bilan boshlanishi kerak`:s.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${s.suffix}" bilan tugashi kerak`:s.format==="includes"?`Noto\u2018g\u2018ri satr: "${s.includes}" ni o\u2018z ichiga olishi kerak`:s.format==="regex"?`Noto\u2018g\u2018ri satr: ${s.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[s.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function G$(){return{localeError:HN()}}var HN,H$=z(()=>{"use strict";g();be();HN=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${s}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${te(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${c.verb} ${s}${r.maximum.toString()} ${c.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${c.verb} ${s}${r.minimum.toString()} ${c.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${s.prefix}"`:s.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${s.suffix}"`:s.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${s.includes}"`:s.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${s.pattern}`:`${n[s.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${L(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function X$(){return{localeError:XN()}}var XN,Y$=z(()=>{"use strict";g();be();XN=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${s}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${te(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${s}${r.maximum.toString()} ${c.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${s}${r.minimum.toString()} ${c.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.prefix}" \u5F00\u5934`:s.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${s.suffix}" \u7ED3\u5C3E`:s.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${s.pattern}`:`\u65E0\u6548${n[s.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${L(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function Q$(){return{localeError:YN()}}var YN,eS=z(()=>{"use strict";g();be();YN=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${s}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${te(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${s}${r.maximum.toString()} ${c.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${s}${r.maximum.toString()}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${s}${r.minimum.toString()} ${c.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${s}${r.minimum.toString()}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.prefix}" \u958B\u982D`:s.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${s.suffix}" \u7D50\u5C3E`:s.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${s.includes}"`:s.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${s.pattern}`:`\u7121\u6548\u7684 ${n[s.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${L(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function tS(){return{localeError:QN()}}var QN,rS=z(()=>{"use strict";g();be();QN=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let s=i[r.expected]??r.expected,c=re(r.input),u=i[c]??c;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${s}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${te(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${L(r.values,"|")}`;case"too_big":{let s=r.inclusive?"<=":"<",c=t(r.origin);return c?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${c.verb} ${s}${r.maximum} ${c.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${r.maximum}`}case"too_small":{let s=r.inclusive?">=":">",c=t(r.origin);return c?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${c.verb} ${s}${r.minimum} ${c.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${s}${r.minimum}`}case"invalid_format":{let s=r;return s.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${s.prefix}"`:s.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${s.suffix}"`:s.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${s.includes}"`:s.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${s.pattern}`:`A\u1E63\xEC\u1E63e: ${n[s.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${L(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var Qa={};It(Qa,{ar:()=>m0,az:()=>_0,be:()=>b0,bg:()=>w0,ca:()=>$0,cs:()=>I0,da:()=>E0,de:()=>P0,en:()=>id,eo:()=>O0,es:()=>z0,fa:()=>R0,fi:()=>j0,fr:()=>F0,frCA:()=>B0,he:()=>W0,hu:()=>q0,hy:()=>G0,id:()=>X0,is:()=>Q0,it:()=>t$,ja:()=>n$,ka:()=>o$,kh:()=>a$,km:()=>od,ko:()=>l$,lt:()=>p$,mk:()=>h$,ms:()=>g$,nl:()=>v$,no:()=>b$,ota:()=>w$,pl:()=>I$,ps:()=>$$,pt:()=>E$,ru:()=>C$,sl:()=>U$,sv:()=>N$,ta:()=>D$,th:()=>L$,tr:()=>M$,ua:()=>Z$,uk:()=>sd,ur:()=>V$,uz:()=>J$,vi:()=>G$,yo:()=>tS,zhCN:()=>X$,zhTW:()=>Q$});var hg=z(()=>{"use strict";g();g0();v0();x0();k0();S0();T0();A0();C0();dg();U0();N0();D0();L0();M0();Z0();V0();J0();H0();Y0();e$();r$();i$();s$();c$();pg();u$();f$();m$();_$();y$();x$();k$();S$();T$();A$();O$();z$();R$();j$();F$();B$();W$();fg();q$();K$();H$();Y$();eS();rS()});function cd(){return new ad}var nS,mg,gg,ad,nr,ec=z(()=>{"use strict";g();mg=Symbol("ZodOutput"),gg=Symbol("ZodInput"),ad=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(nS=globalThis).__zod_globalRegistry??(nS.__zod_globalRegistry=cd());nr=globalThis.__zod_globalRegistry});function _g(e,t){return new e({type:"string",...se(t)})}function vg(e,t){return new e({type:"string",coerce:!0,...se(t)})}function ld(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...se(t)})}function tc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...se(t)})}function ud(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...se(t)})}function dd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...se(t)})}function pd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...se(t)})}function fd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...se(t)})}function rc(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...se(t)})}function hd(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...se(t)})}function md(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...se(t)})}function gd(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...se(t)})}function _d(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...se(t)})}function vd(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...se(t)})}function yd(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...se(t)})}function bd(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...se(t)})}function xd(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...se(t)})}function wd(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...se(t)})}function yg(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...se(t)})}function kd(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...se(t)})}function $d(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...se(t)})}function Sd(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...se(t)})}function Id(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...se(t)})}function Td(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...se(t)})}function Ed(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...se(t)})}function xg(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...se(t)})}function wg(e,t){return new e({type:"string",format:"date",check:"string_format",...se(t)})}function kg(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...se(t)})}function $g(e,t){return new e({type:"string",format:"duration",check:"string_format",...se(t)})}function Sg(e,t){return new e({type:"number",checks:[],...se(t)})}function Ig(e,t){return new e({type:"number",coerce:!0,checks:[],...se(t)})}function Tg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...se(t)})}function Eg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...se(t)})}function Ag(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...se(t)})}function Pg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...se(t)})}function Cg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...se(t)})}function Og(e,t){return new e({type:"boolean",...se(t)})}function Ug(e,t){return new e({type:"boolean",coerce:!0,...se(t)})}function zg(e,t){return new e({type:"bigint",...se(t)})}function Ng(e,t){return new e({type:"bigint",coerce:!0,...se(t)})}function Rg(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...se(t)})}function Dg(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...se(t)})}function jg(e,t){return new e({type:"symbol",...se(t)})}function Lg(e,t){return new e({type:"undefined",...se(t)})}function Fg(e,t){return new e({type:"null",...se(t)})}function Mg(e){return new e({type:"any"})}function Bg(e){return new e({type:"unknown"})}function Zg(e,t){return new e({type:"never",...se(t)})}function Wg(e,t){return new e({type:"void",...se(t)})}function Vg(e,t){return new e({type:"date",...se(t)})}function qg(e,t){return new e({type:"date",coerce:!0,...se(t)})}function Jg(e,t){return new e({type:"nan",...se(t)})}function In(e,t){return new qu({check:"less_than",...se(t),value:e,inclusive:!1})}function Nr(e,t){return new qu({check:"less_than",...se(t),value:e,inclusive:!0})}function Tn(e,t){return new Ju({check:"greater_than",...se(t),value:e,inclusive:!1})}function mr(e,t){return new Ju({check:"greater_than",...se(t),value:e,inclusive:!0})}function Ad(e){return Tn(0,e)}function Pd(e){return In(0,e)}function Cd(e){return Nr(0,e)}function Od(e){return mr(0,e)}function ki(e,t){return new Um({check:"multiple_of",...se(t),value:e})}function $i(e,t){return new Rm({check:"max_size",...se(t),maximum:e})}function En(e,t){return new Dm({check:"min_size",...se(t),minimum:e})}function to(e,t){return new jm({check:"size_equals",...se(t),size:e})}function ro(e,t){return new Lm({check:"max_length",...se(t),maximum:e})}function Zn(e,t){return new Fm({check:"min_length",...se(t),minimum:e})}function no(e,t){return new Mm({check:"length_equals",...se(t),length:e})}function ls(e,t){return new Bm({check:"string_format",format:"regex",...se(t),pattern:e})}function us(e){return new Zm({check:"string_format",format:"lowercase",...se(e)})}function ds(e){return new Wm({check:"string_format",format:"uppercase",...se(e)})}function ps(e,t){return new Vm({check:"string_format",format:"includes",...se(t),includes:e})}function fs(e,t){return new qm({check:"string_format",format:"starts_with",...se(t),prefix:e})}function hs(e,t){return new Jm({check:"string_format",format:"ends_with",...se(t),suffix:e})}function Ud(e,t,n){return new Km({check:"property",property:e,schema:t,...se(n)})}function ms(e,t){return new Gm({check:"mime_type",mime:e,...se(t)})}function ln(e){return new Hm({check:"overwrite",tx:e})}function gs(e){return ln(t=>t.normalize(e))}function _s(){return ln(e=>e.trim())}function vs(){return ln(e=>e.toLowerCase())}function ys(){return ln(e=>e.toUpperCase())}function bs(){return ln(e=>qh(e))}function Kg(e,t,n){return new e({type:"array",element:t,...se(n)})}function tR(e,t,n){return new e({type:"union",options:t,...se(n)})}function rR(e,t,n){return new e({type:"union",options:t,inclusive:!1,...se(n)})}function nR(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...se(i)})}function iR(e,t,n){return new e({type:"intersection",left:t,right:n})}function oR(e,t,n,i){let r=n instanceof Pe,s=r?i:n,c=r?n:null;return new e({type:"tuple",items:t,rest:c,...se(s)})}function sR(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...se(i)})}function aR(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...se(i)})}function cR(e,t,n){return new e({type:"set",valueType:t,...se(n)})}function lR(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...se(n)})}function uR(e,t,n){return new e({type:"enum",entries:t,...se(n)})}function dR(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...se(n)})}function Gg(e,t){return new e({type:"file",...se(t)})}function pR(e,t){return new e({type:"transform",transform:t})}function fR(e,t){return new e({type:"optional",innerType:t})}function hR(e,t){return new e({type:"nullable",innerType:t})}function mR(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Kh(n)}})}function gR(e,t,n){return new e({type:"nonoptional",innerType:t,...se(n)})}function _R(e,t){return new e({type:"success",innerType:t})}function vR(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function yR(e,t,n){return new e({type:"pipe",in:t,out:n})}function bR(e,t){return new e({type:"readonly",innerType:t})}function xR(e,t,n){return new e({type:"template_literal",parts:t,...se(n)})}function wR(e,t){return new e({type:"lazy",getter:t})}function kR(e,t){return new e({type:"promise",innerType:t})}function Hg(e,t,n){let i=se(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Xg(e,t,n){return new e({type:"custom",check:"custom",fn:t,...se(n)})}function Yg(e){let t=iS(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(rs(i,n.value,t._zod.def));else{let r=i;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(rs(r))}},e(n.value,n)));return t}function iS(e,t){let n=new ut({check:"custom",...se(t)});return n._zod.check=e,n}function Qg(e){let t=new ut({check:"describe"});return t._zod.onattach=[n=>{let i=nr.get(n)??{};nr.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function e_(e){let t=new ut({check:"meta"});return t._zod.onattach=[n=>{let i=nr.get(n)??{};nr.add(n,{...i,...e})}],t._zod.check=()=>{},t}function t_(e,t){let n=se(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(I=>typeof I=="string"?I.toLowerCase():I),r=r.map(I=>typeof I=="string"?I.toLowerCase():I));let s=new Set(i),c=new Set(r),u=e.Codec??Xa,p=e.Boolean??Ga,f=e.String??eo,v=new f({type:"string",error:n.error}),y=new p({type:"boolean",error:n.error}),k=new u({type:"pipe",in:v,out:y,transform:((I,$)=>{let O=I;return n.case!=="sensitive"&&(O=O.toLowerCase()),s.has(O)?!0:c.has(O)?!1:($.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...c],input:$.value,inst:k,continue:!1}),{})}),reverseTransform:((I,$)=>I===!0?i[0]||"true":r[0]||"false"),error:n.error});return k}function xs(e,t,n,i={}){let r=se(i),s={...se(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...r};return n instanceof RegExp&&(s.pattern=n),new e(s)}var bg,oS=z(()=>{"use strict";g();Ku();ec();ug();be();bg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Si(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??nr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function et(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,s=t.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);let u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{let v={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,v);else{let k=c.schema,I=t.processors[r.type];if(!I)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);I(e,t,k,v)}let y=e._zod.parent;y&&(c.ref||(c.ref=y),et(y,t,v),t.seen.get(y).isParent=!0)}let p=t.metadataRegistry.get(e);return p&&Object.assign(c.schema,p),t.io==="input"&&gr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((i=c.schema).default??(i.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Ii(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let c of e.seen.entries()){let u=e.metadataRegistry.get(c[0])?.id;if(u){let p=i.get(u);if(p&&p!==c[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(u,c[0])}}let r=c=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let y=e.external.registry.get(c[0])?.id,k=e.external.uri??($=>$);if(y)return{ref:k(y)};let I=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=I,{defId:I,ref:`${k("__shared")}#/${u}/${I}`}}if(c[1]===n)return{ref:"#"};let f=`#/${u}/`,v=c[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:f+v}},s=c=>{if(c[1].schema.$ref)return;let u=c[1],{ref:p,defId:f}=r(c);u.def={...u.schema},f&&(u.defId=f);let v=u.schema;for(let y in v)delete v[y];v.$ref=p};if(e.cycles==="throw")for(let c of e.seen.entries()){let u=c[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
104
|
-
|
|
105
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let c of e.seen.entries()){let u=c[1];if(t===c[0]){s(c);continue}if(e.external){let f=e.external.registry.get(c[0])?.id;if(t!==c[0]&&f){s(c);continue}}if(e.metadataRegistry.get(c[0])?.id){s(c);continue}if(u.cycle){s(c);continue}if(u.count>1&&e.reused==="ref"){s(c);continue}}}function Ti(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=c=>{let u=e.seen.get(c);if(u.ref===null)return;let p=u.def??u.schema,f={...p},v=u.ref;if(u.ref=null,v){i(v);let k=e.seen.get(v),I=k.schema;if(I.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(I)):Object.assign(p,I),Object.assign(p,f),c._zod.parent===v)for(let O in p)O==="$ref"||O==="allOf"||O in f||delete p[O];if(I.$ref)for(let O in p)O==="$ref"||O==="allOf"||O in k.def&&JSON.stringify(p[O])===JSON.stringify(k.def[O])&&delete p[O]}let y=c._zod.parent;if(y&&y!==v){i(y);let k=e.seen.get(y);if(k?.schema.$ref&&(p.$ref=k.schema.$ref,k.def))for(let I in p)I==="$ref"||I==="allOf"||I in k.def&&JSON.stringify(p[I])===JSON.stringify(k.def[I])&&delete p[I]}e.override({zodSchema:c,jsonSchema:p,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())i(c[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(c)}Object.assign(r,n.def??n.schema);let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let c=JSON.parse(JSON.stringify(r));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ws(t,"input",e.processors),output:ws(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function gr(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return gr(i.element,n);if(i.type==="set")return gr(i.valueType,n);if(i.type==="lazy")return gr(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return gr(i.innerType,n);if(i.type==="intersection")return gr(i.left,n)||gr(i.right,n);if(i.type==="record"||i.type==="map")return gr(i.keyType,n)||gr(i.valueType,n);if(i.type==="pipe")return gr(i.in,n)||gr(i.out,n);if(i.type==="object"){for(let r in i.shape)if(gr(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(gr(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(gr(r,n))return!0;return!!(i.rest&&gr(i.rest,n))}return!1}var r_,ws,nc=z(()=>{"use strict";g();ec();r_=(e,t={})=>n=>{let i=Si({...n,processors:t});return et(e,i),Ii(i,e),Ti(i,e)},ws=(e,t,n={})=>i=>{let{libraryOptions:r,target:s}=i??{},c=Si({...r??{},target:s,io:t,processors:n});return et(e,c),Ii(c,e),Ti(c,e)}});function Dd(e,t){if("_idmap"in e){let i=e,r=Si({...t,processors:zd}),s={};for(let p of i._idmap.entries()){let[f,v]=p;et(v,r)}let c={},u={registry:i,uri:t?.uri,defs:s};r.external=u;for(let p of i._idmap.entries()){let[f,v]=p;Ii(r,v),c[f]=Ti(r,v)}if(Object.keys(s).length>0){let p=r.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[p]:s}}return{schemas:c}}let n=Si({...t,processors:zd});return et(e,n),Ii(n,e),Ti(n,e)}var $R,n_,i_,o_,s_,a_,c_,l_,u_,d_,p_,f_,h_,m_,g_,__,v_,y_,b_,x_,w_,k_,$_,S_,I_,T_,Nd,E_,A_,P_,C_,O_,U_,z_,N_,R_,D_,j_,Rd,L_,zd,ic=z(()=>{"use strict";g();nc();be();$R={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},n_=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:s,maximum:c,format:u,patterns:p,contentEncoding:f}=e._zod.bag;if(typeof s=="number"&&(r.minLength=s),typeof c=="number"&&(r.maxLength=c),u&&(r.format=$R[u]??u,r.format===""&&delete r.format,u==="time"&&delete r.format),f&&(r.contentEncoding=f),p&&p.size>0){let v=[...p];v.length===1?r.pattern=v[0].source:v.length>1&&(r.allOf=[...v.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},i_=(e,t,n,i)=>{let r=n,{minimum:s,maximum:c,format:u,multipleOf:p,exclusiveMaximum:f,exclusiveMinimum:v}=e._zod.bag;typeof u=="string"&&u.includes("int")?r.type="integer":r.type="number",typeof v=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.minimum=v,r.exclusiveMinimum=!0):r.exclusiveMinimum=v),typeof s=="number"&&(r.minimum=s,typeof v=="number"&&t.target!=="draft-04"&&(v>=s?delete r.minimum:delete r.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(r.maximum=f,r.exclusiveMaximum=!0):r.exclusiveMaximum=f),typeof c=="number"&&(r.maximum=c,typeof f=="number"&&t.target!=="draft-04"&&(f<=c?delete r.maximum:delete r.exclusiveMaximum)),typeof p=="number"&&(r.multipleOf=p)},o_=(e,t,n,i)=>{n.type="boolean"},s_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},a_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},c_=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},l_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},u_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},d_=(e,t,n,i)=>{n.not={}},p_=(e,t,n,i)=>{},f_=(e,t,n,i)=>{},h_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},m_=(e,t,n,i)=>{let r=e._zod.def,s=ja(r.entries);s.every(c=>typeof c=="number")&&(n.type="number"),s.every(c=>typeof c=="string")&&(n.type="string"),n.enum=s},g_=(e,t,n,i)=>{let r=e._zod.def,s=[];for(let c of r.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(c))}else s.push(c);if(s.length!==0)if(s.length===1){let c=s[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else s.every(c=>typeof c=="number")&&(n.type="number"),s.every(c=>typeof c=="string")&&(n.type="string"),s.every(c=>typeof c=="boolean")&&(n.type="boolean"),s.every(c=>c===null)&&(n.type="null"),n.enum=s},__=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},v_=(e,t,n,i)=>{let r=n,s=e._zod.pattern;if(!s)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=s.source},y_=(e,t,n,i)=>{let r=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:u,mime:p}=e._zod.bag;c!==void 0&&(s.minLength=c),u!==void 0&&(s.maxLength=u),p?p.length===1?(s.contentMediaType=p[0],Object.assign(r,s)):(Object.assign(r,s),r.anyOf=p.map(f=>({contentMediaType:f}))):Object.assign(r,s)},b_=(e,t,n,i)=>{n.type="boolean"},x_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},w_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},k_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},S_=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},I_=(e,t,n,i)=>{let r=n,s=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(r.minItems=c),typeof u=="number"&&(r.maxItems=u),r.type="array",r.items=et(s.element,t,{...i,path:[...i.path,"items"]})},T_=(e,t,n,i)=>{let r=n,s=e._zod.def;r.type="object",r.properties={};let c=s.shape;for(let f in c)r.properties[f]=et(c[f],t,{...i,path:[...i.path,"properties",f]});let u=new Set(Object.keys(c)),p=new Set([...u].filter(f=>{let v=s.shape[f]._zod;return t.io==="input"?v.optin===void 0:v.optout===void 0}));p.size>0&&(r.required=Array.from(p)),s.catchall?._zod.def.type==="never"?r.additionalProperties=!1:s.catchall?s.catchall&&(r.additionalProperties=et(s.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Nd=(e,t,n,i)=>{let r=e._zod.def,s=r.inclusive===!1,c=r.options.map((u,p)=>et(u,t,{...i,path:[...i.path,s?"oneOf":"anyOf",p]}));s?n.oneOf=c:n.anyOf=c},E_=(e,t,n,i)=>{let r=e._zod.def,s=et(r.left,t,{...i,path:[...i.path,"allOf",0]}),c=et(r.right,t,{...i,path:[...i.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,p=[...u(s)?s.allOf:[s],...u(c)?c.allOf:[c]];n.allOf=p},A_=(e,t,n,i)=>{let r=n,s=e._zod.def;r.type="array";let c=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",p=s.items.map((k,I)=>et(k,t,{...i,path:[...i.path,c,I]})),f=s.rest?et(s.rest,t,{...i,path:[...i.path,u,...t.target==="openapi-3.0"?[s.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=p,f&&(r.items=f)):t.target==="openapi-3.0"?(r.items={anyOf:p},f&&r.items.anyOf.push(f),r.minItems=p.length,f||(r.maxItems=p.length)):(r.items=p,f&&(r.additionalItems=f));let{minimum:v,maximum:y}=e._zod.bag;typeof v=="number"&&(r.minItems=v),typeof y=="number"&&(r.maxItems=y)},P_=(e,t,n,i)=>{let r=n,s=e._zod.def;r.type="object";let c=s.keyType,p=c._zod.bag?.patterns;if(s.mode==="loose"&&p&&p.size>0){let v=et(s.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let y of p)r.patternProperties[y.source]=v}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=et(s.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=et(s.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let f=c._zod.values;if(f){let v=[...f].filter(y=>typeof y=="string"||typeof y=="number");v.length>0&&(r.required=v)}},C_=(e,t,n,i)=>{let r=e._zod.def,s=et(r.innerType,t,i),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=r.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},O_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType},U_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},z_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},N_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType;let c;try{c=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},R_=(e,t,n,i)=>{let r=e._zod.def,s=t.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;et(s,t,i);let c=t.seen.get(e);c.ref=s},D_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType,n.readOnly=!0},j_=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType},Rd=(e,t,n,i)=>{let r=e._zod.def;et(r.innerType,t,i);let s=t.seen.get(e);s.ref=r.innerType},L_=(e,t,n,i)=>{let r=e._zod.innerType;et(r,t,i);let s=t.seen.get(e);s.ref=r},zd={string:n_,number:i_,boolean:o_,bigint:s_,symbol:a_,null:c_,undefined:l_,void:u_,never:d_,any:p_,unknown:f_,date:h_,enum:m_,literal:g_,nan:__,template_literal:v_,file:y_,success:b_,custom:x_,function:w_,transform:k_,map:$_,set:S_,array:I_,object:T_,union:Nd,intersection:E_,tuple:A_,record:P_,nullable:C_,nonoptional:O_,default:U_,prefault:z_,catch:N_,pipe:R_,readonly:D_,promise:j_,optional:Rd,lazy:L_}});var jd,sS=z(()=>{"use strict";g();ic();nc();jd=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Si({processors:zd,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return et(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Ii(this.ctx,t);let i=Ti(this.ctx,t),{"~standard":r,...s}=i;return s}}});var aS={};var cS=z(()=>{"use strict";g()});var Wn={};It(Wn,{$ZodAny:()=>O1,$ZodArray:()=>D1,$ZodAsyncError:()=>cn,$ZodBase64:()=>w1,$ZodBase64URL:()=>k1,$ZodBigInt:()=>td,$ZodBigIntFormat:()=>E1,$ZodBoolean:()=>Ga,$ZodCIDRv4:()=>y1,$ZodCIDRv6:()=>b1,$ZodCUID:()=>a1,$ZodCUID2:()=>c1,$ZodCatch:()=>tg,$ZodCheck:()=>ut,$ZodCheckBigIntFormat:()=>Nm,$ZodCheckEndsWith:()=>Jm,$ZodCheckGreaterThan:()=>Ju,$ZodCheckIncludes:()=>Vm,$ZodCheckLengthEquals:()=>Mm,$ZodCheckLessThan:()=>qu,$ZodCheckLowerCase:()=>Zm,$ZodCheckMaxLength:()=>Lm,$ZodCheckMaxSize:()=>Rm,$ZodCheckMimeType:()=>Gm,$ZodCheckMinLength:()=>Fm,$ZodCheckMinSize:()=>Dm,$ZodCheckMultipleOf:()=>Um,$ZodCheckNumberFormat:()=>zm,$ZodCheckOverwrite:()=>Hm,$ZodCheckProperty:()=>Km,$ZodCheckRegex:()=>Bm,$ZodCheckSizeEquals:()=>jm,$ZodCheckStartsWith:()=>qm,$ZodCheckStringFormat:()=>as,$ZodCheckUpperCase:()=>Wm,$ZodCodec:()=>Xa,$ZodCustom:()=>lg,$ZodCustomStringFormat:()=>I1,$ZodDate:()=>R1,$ZodDefault:()=>X1,$ZodDiscriminatedUnion:()=>F1,$ZodE164:()=>$1,$ZodEmail:()=>n1,$ZodEmoji:()=>o1,$ZodEncodeError:()=>vi,$ZodEnum:()=>V1,$ZodError:()=>Za,$ZodExactOptional:()=>G1,$ZodFile:()=>J1,$ZodFunction:()=>sg,$ZodGUID:()=>t1,$ZodIPv4:()=>g1,$ZodIPv6:()=>_1,$ZodISODate:()=>f1,$ZodISODateTime:()=>p1,$ZodISODuration:()=>m1,$ZodISOTime:()=>h1,$ZodIntersection:()=>M1,$ZodJWT:()=>S1,$ZodKSUID:()=>d1,$ZodLazy:()=>cg,$ZodLiteral:()=>q1,$ZodMAC:()=>v1,$ZodMap:()=>Z1,$ZodNaN:()=>rg,$ZodNanoID:()=>s1,$ZodNever:()=>z1,$ZodNonOptional:()=>Q1,$ZodNull:()=>C1,$ZodNullable:()=>H1,$ZodNumber:()=>ed,$ZodNumberFormat:()=>T1,$ZodObject:()=>h0,$ZodObjectJIT:()=>j1,$ZodOptional:()=>nd,$ZodPipe:()=>ng,$ZodPrefault:()=>Y1,$ZodPromise:()=>ag,$ZodReadonly:()=>ig,$ZodRealError:()=>$r,$ZodRecord:()=>B1,$ZodRegistry:()=>ad,$ZodSet:()=>W1,$ZodString:()=>eo,$ZodStringFormat:()=>st,$ZodSuccess:()=>eg,$ZodSymbol:()=>A1,$ZodTemplateLiteral:()=>og,$ZodTransform:()=>K1,$ZodTuple:()=>rd,$ZodType:()=>Pe,$ZodULID:()=>l1,$ZodURL:()=>i1,$ZodUUID:()=>r1,$ZodUndefined:()=>P1,$ZodUnion:()=>Ha,$ZodUnknown:()=>U1,$ZodVoid:()=>N1,$ZodXID:()=>u1,$ZodXor:()=>L1,$brand:()=>Pu,$constructor:()=>R,$input:()=>gg,$output:()=>mg,Doc:()=>Ka,JSONSchema:()=>aS,JSONSchemaGenerator:()=>jd,NEVER:()=>Bh,TimePrecision:()=>bg,_any:()=>Mg,_array:()=>Kg,_base64:()=>Sd,_base64url:()=>Id,_bigint:()=>zg,_boolean:()=>Og,_catch:()=>vR,_check:()=>iS,_cidrv4:()=>kd,_cidrv6:()=>$d,_coercedBigint:()=>Ng,_coercedBoolean:()=>Ug,_coercedDate:()=>qg,_coercedNumber:()=>Ig,_coercedString:()=>vg,_cuid:()=>gd,_cuid2:()=>_d,_custom:()=>Hg,_date:()=>Vg,_decode:()=>Ru,_decodeAsync:()=>ju,_default:()=>mR,_discriminatedUnion:()=>nR,_e164:()=>Td,_email:()=>ld,_emoji:()=>hd,_encode:()=>Nu,_encodeAsync:()=>Du,_endsWith:()=>hs,_enum:()=>lR,_file:()=>Gg,_float32:()=>Eg,_float64:()=>Ag,_gt:()=>Tn,_gte:()=>mr,_guid:()=>tc,_includes:()=>ps,_int:()=>Tg,_int32:()=>Pg,_int64:()=>Rg,_intersection:()=>iR,_ipv4:()=>xd,_ipv6:()=>wd,_isoDate:()=>wg,_isoDateTime:()=>xg,_isoDuration:()=>$g,_isoTime:()=>kg,_jwt:()=>Ed,_ksuid:()=>bd,_lazy:()=>wR,_length:()=>no,_literal:()=>dR,_lowercase:()=>us,_lt:()=>In,_lte:()=>Nr,_mac:()=>yg,_map:()=>aR,_max:()=>Nr,_maxLength:()=>ro,_maxSize:()=>$i,_mime:()=>ms,_min:()=>mr,_minLength:()=>Zn,_minSize:()=>En,_multipleOf:()=>ki,_nan:()=>Jg,_nanoid:()=>md,_nativeEnum:()=>uR,_negative:()=>Pd,_never:()=>Zg,_nonnegative:()=>Od,_nonoptional:()=>gR,_nonpositive:()=>Cd,_normalize:()=>gs,_null:()=>Fg,_nullable:()=>hR,_number:()=>Sg,_optional:()=>fR,_overwrite:()=>ln,_parse:()=>ns,_parseAsync:()=>is,_pipe:()=>yR,_positive:()=>Ad,_promise:()=>kR,_property:()=>Ud,_readonly:()=>bR,_record:()=>sR,_refine:()=>Xg,_regex:()=>ls,_safeDecode:()=>Fu,_safeDecodeAsync:()=>Bu,_safeEncode:()=>Lu,_safeEncodeAsync:()=>Mu,_safeParse:()=>os,_safeParseAsync:()=>ss,_set:()=>cR,_size:()=>to,_slugify:()=>bs,_startsWith:()=>fs,_string:()=>_g,_stringFormat:()=>xs,_stringbool:()=>t_,_success:()=>_R,_superRefine:()=>Yg,_symbol:()=>jg,_templateLiteral:()=>xR,_toLowerCase:()=>vs,_toUpperCase:()=>ys,_transform:()=>pR,_trim:()=>_s,_tuple:()=>oR,_uint32:()=>Cg,_uint64:()=>Dg,_ulid:()=>vd,_undefined:()=>Lg,_union:()=>tR,_unknown:()=>Bg,_uppercase:()=>ds,_url:()=>rc,_uuid:()=>ud,_uuidv4:()=>dd,_uuidv6:()=>pd,_uuidv7:()=>fd,_void:()=>Wg,_xid:()=>yd,_xor:()=>rR,clone:()=>hr,config:()=>Pt,createStandardJSONSchemaMethod:()=>ws,createToJSONSchemaMethod:()=>r_,decode:()=>Iz,decodeAsync:()=>Ez,describe:()=>Qg,encode:()=>Sz,encodeAsync:()=>Tz,extractDefs:()=>Ii,finalize:()=>Ti,flattenError:()=>Wa,formatError:()=>Va,globalConfig:()=>Ra,globalRegistry:()=>nr,initializeContext:()=>Si,isValidBase64:()=>x1,isValidBase64URL:()=>u0,isValidJWT:()=>d0,locales:()=>Qa,meta:()=>e_,parse:()=>Uu,parseAsync:()=>zu,prettifyError:()=>em,process:()=>et,regexes:()=>Gr,registry:()=>cd,safeDecode:()=>Pz,safeDecodeAsync:()=>Oz,safeEncode:()=>Az,safeEncodeAsync:()=>Cz,safeParse:()=>rm,safeParseAsync:()=>nm,toDotPath:()=>qk,toJSONSchema:()=>Dd,treeifyError:()=>Qh,util:()=>ne,version:()=>Ym});var Sr=z(()=>{"use strict";g();Qo();im();tm();ug();Ku();Qm();be();Vu();hg();ec();Xm();oS();nc();ic();sS();cS()});var Ld={};It(Ld,{endsWith:()=>hs,gt:()=>Tn,gte:()=>mr,includes:()=>ps,length:()=>no,lowercase:()=>us,lt:()=>In,lte:()=>Nr,maxLength:()=>ro,maxSize:()=>$i,mime:()=>ms,minLength:()=>Zn,minSize:()=>En,multipleOf:()=>ki,negative:()=>Pd,nonnegative:()=>Od,nonpositive:()=>Cd,normalize:()=>gs,overwrite:()=>ln,positive:()=>Ad,property:()=>Ud,regex:()=>ls,size:()=>to,slugify:()=>bs,startsWith:()=>fs,toLowerCase:()=>vs,toUpperCase:()=>ys,trim:()=>_s,uppercase:()=>ds});var Fd=z(()=>{"use strict";g();Sr()});var ks={};It(ks,{ZodISODate:()=>Bd,ZodISODateTime:()=>Md,ZodISODuration:()=>Wd,ZodISOTime:()=>Zd,date:()=>M_,datetime:()=>F_,duration:()=>Z_,time:()=>B_});function F_(e){return xg(Md,e)}function M_(e){return wg(Bd,e)}function B_(e){return kg(Zd,e)}function Z_(e){return $g(Wd,e)}var Md,Bd,Zd,Wd,oc=z(()=>{"use strict";g();Sr();ac();Md=R("ZodISODateTime",(e,t)=>{p1.init(e,t),at.init(e,t)});Bd=R("ZodISODate",(e,t)=>{f1.init(e,t),at.init(e,t)});Zd=R("ZodISOTime",(e,t)=>{h1.init(e,t),at.init(e,t)});Wd=R("ZodISODuration",(e,t)=>{m1.init(e,t),at.init(e,t)})});var lS,IR,Ir,W_=z(()=>{"use strict";g();Sr();Sr();be();lS=(e,t)=>{Za.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Va(e,n)},flatten:{value:n=>Wa(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,es,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,es,2)}},isEmpty:{get(){return e.issues.length===0}}})},IR=R("ZodError",lS),Ir=R("ZodError",lS,{Parent:Error})});var Vn,V_,q_,J_,K_,G_,H_,X_,Y_,Q_,ev,tv,rv=z(()=>{"use strict";g();Sr();W_();Vn=ns(Ir),V_=is(Ir),q_=os(Ir),J_=ss(Ir),K_=Nu(Ir),G_=Ru(Ir),H_=Du(Ir),X_=ju(Ir),Y_=Lu(Ir),Q_=Fu(Ir),ev=Mu(Ir),tv=Bu(Ir)});var sc={};It(sc,{ZodAny:()=>uv,ZodArray:()=>hv,ZodBase64:()=>op,ZodBase64URL:()=>sp,ZodBigInt:()=>As,ZodBigIntFormat:()=>lp,ZodBoolean:()=>Es,ZodCIDRv4:()=>np,ZodCIDRv6:()=>ip,ZodCUID:()=>Hd,ZodCUID2:()=>Xd,ZodCatch:()=>Rv,ZodCodec:()=>_p,ZodCustom:()=>vc,ZodCustomStringFormat:()=>Is,ZodDate:()=>fc,ZodDefault:()=>Pv,ZodDiscriminatedUnion:()=>gv,ZodE164:()=>ap,ZodEmail:()=>Jd,ZodEmoji:()=>Kd,ZodEnum:()=>$s,ZodExactOptional:()=>Tv,ZodFile:()=>Sv,ZodFunction:()=>Vv,ZodGUID:()=>cc,ZodIPv4:()=>tp,ZodIPv6:()=>rp,ZodIntersection:()=>_v,ZodJWT:()=>cp,ZodKSUID:()=>ep,ZodLazy:()=>Bv,ZodLiteral:()=>$v,ZodMAC:()=>nv,ZodMap:()=>wv,ZodNaN:()=>jv,ZodNanoID:()=>Gd,ZodNever:()=>pv,ZodNonOptional:()=>mp,ZodNull:()=>cv,ZodNullable:()=>Av,ZodNumber:()=>Ts,ZodNumberFormat:()=>oo,ZodObject:()=>mc,ZodOptional:()=>hp,ZodPipe:()=>gp,ZodPrefault:()=>Ov,ZodPromise:()=>Wv,ZodReadonly:()=>Lv,ZodRecord:()=>_c,ZodSet:()=>kv,ZodString:()=>Ss,ZodStringFormat:()=>at,ZodSuccess:()=>Nv,ZodSymbol:()=>sv,ZodTemplateLiteral:()=>Mv,ZodTransform:()=>Iv,ZodTuple:()=>yv,ZodType:()=>Ue,ZodULID:()=>Yd,ZodURL:()=>pc,ZodUUID:()=>An,ZodUndefined:()=>av,ZodUnion:()=>gc,ZodUnknown:()=>dv,ZodVoid:()=>fv,ZodXID:()=>Qd,ZodXor:()=>mv,_ZodString:()=>qd,_default:()=>Cv,_function:()=>hI,any:()=>JS,array:()=>hc,base64:()=>PS,base64url:()=>CS,bigint:()=>BS,boolean:()=>ov,catch:()=>Dv,check:()=>mI,cidrv4:()=>ES,cidrv6:()=>AS,codec:()=>dI,cuid:()=>bS,cuid2:()=>xS,custom:()=>gI,date:()=>GS,describe:()=>_I,discriminatedUnion:()=>eI,e164:()=>OS,email:()=>uS,emoji:()=>vS,enum:()=>pp,exactOptional:()=>Ev,file:()=>aI,float32:()=>jS,float64:()=>LS,function:()=>hI,guid:()=>dS,hash:()=>DS,hex:()=>RS,hostname:()=>NS,httpUrl:()=>_S,instanceof:()=>yI,int:()=>Vd,int32:()=>FS,int64:()=>ZS,intersection:()=>vv,ipv4:()=>SS,ipv6:()=>TS,json:()=>xI,jwt:()=>US,keyof:()=>HS,ksuid:()=>$S,lazy:()=>Zv,literal:()=>sI,looseObject:()=>YS,looseRecord:()=>rI,mac:()=>IS,map:()=>nI,meta:()=>vI,nan:()=>uI,nanoid:()=>yS,nativeEnum:()=>oI,never:()=>up,nonoptional:()=>zv,null:()=>lv,nullable:()=>uc,nullish:()=>cI,number:()=>iv,object:()=>Ei,optional:()=>lc,partialRecord:()=>tI,pipe:()=>dc,prefault:()=>Uv,preprocess:()=>wI,promise:()=>fI,readonly:()=>Fv,record:()=>xv,refine:()=>qv,set:()=>iI,strictObject:()=>XS,string:()=>_r,stringFormat:()=>zS,stringbool:()=>bI,success:()=>lI,superRefine:()=>Jv,symbol:()=>VS,templateLiteral:()=>pI,transform:()=>fp,tuple:()=>bv,uint32:()=>MS,uint64:()=>WS,ulid:()=>wS,undefined:()=>qS,union:()=>dp,unknown:()=>io,url:()=>gS,uuid:()=>pS,uuidv4:()=>fS,uuidv6:()=>hS,uuidv7:()=>mS,void:()=>KS,xid:()=>kS,xor:()=>QS});function _r(e){return _g(Ss,e)}function uS(e){return ld(Jd,e)}function dS(e){return tc(cc,e)}function pS(e){return ud(An,e)}function fS(e){return dd(An,e)}function hS(e){return pd(An,e)}function mS(e){return fd(An,e)}function gS(e){return rc(pc,e)}function _S(e){return rc(pc,{protocol:/^https?$/,hostname:Gr.domain,...ne.normalizeParams(e)})}function vS(e){return hd(Kd,e)}function yS(e){return md(Gd,e)}function bS(e){return gd(Hd,e)}function xS(e){return _d(Xd,e)}function wS(e){return vd(Yd,e)}function kS(e){return yd(Qd,e)}function $S(e){return bd(ep,e)}function SS(e){return xd(tp,e)}function IS(e){return yg(nv,e)}function TS(e){return wd(rp,e)}function ES(e){return kd(np,e)}function AS(e){return $d(ip,e)}function PS(e){return Sd(op,e)}function CS(e){return Id(sp,e)}function OS(e){return Td(ap,e)}function US(e){return Ed(cp,e)}function zS(e,t,n={}){return xs(Is,e,t,n)}function NS(e){return xs(Is,"hostname",Gr.hostname,e)}function RS(e){return xs(Is,"hex",Gr.hex,e)}function DS(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=Gr[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return xs(Is,i,r,t)}function iv(e){return Sg(Ts,e)}function Vd(e){return Tg(oo,e)}function jS(e){return Eg(oo,e)}function LS(e){return Ag(oo,e)}function FS(e){return Pg(oo,e)}function MS(e){return Cg(oo,e)}function ov(e){return Og(Es,e)}function BS(e){return zg(As,e)}function ZS(e){return Rg(lp,e)}function WS(e){return Dg(lp,e)}function VS(e){return jg(sv,e)}function qS(e){return Lg(av,e)}function lv(e){return Fg(cv,e)}function JS(){return Mg(uv)}function io(){return Bg(dv)}function up(e){return Zg(pv,e)}function KS(e){return Wg(fv,e)}function GS(e){return Vg(fc,e)}function hc(e,t){return Kg(hv,e,t)}function HS(e){let t=e._zod.def.shape;return pp(Object.keys(t))}function Ei(e,t){let n={type:"object",shape:e??{},...ne.normalizeParams(t)};return new mc(n)}function XS(e,t){return new mc({type:"object",shape:e,catchall:up(),...ne.normalizeParams(t)})}function YS(e,t){return new mc({type:"object",shape:e,catchall:io(),...ne.normalizeParams(t)})}function dp(e,t){return new gc({type:"union",options:e,...ne.normalizeParams(t)})}function QS(e,t){return new mv({type:"union",options:e,inclusive:!1,...ne.normalizeParams(t)})}function eI(e,t,n){return new gv({type:"union",options:t,discriminator:e,...ne.normalizeParams(n)})}function vv(e,t){return new _v({type:"intersection",left:e,right:t})}function bv(e,t,n){let i=t instanceof Pe,r=i?n:t,s=i?t:null;return new yv({type:"tuple",items:e,rest:s,...ne.normalizeParams(r)})}function xv(e,t,n){return new _c({type:"record",keyType:e,valueType:t,...ne.normalizeParams(n)})}function tI(e,t,n){let i=hr(e);return i._zod.values=void 0,new _c({type:"record",keyType:i,valueType:t,...ne.normalizeParams(n)})}function rI(e,t,n){return new _c({type:"record",keyType:e,valueType:t,mode:"loose",...ne.normalizeParams(n)})}function nI(e,t,n){return new wv({type:"map",keyType:e,valueType:t,...ne.normalizeParams(n)})}function iI(e,t){return new kv({type:"set",valueType:e,...ne.normalizeParams(t)})}function pp(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new $s({type:"enum",entries:n,...ne.normalizeParams(t)})}function oI(e,t){return new $s({type:"enum",entries:e,...ne.normalizeParams(t)})}function sI(e,t){return new $v({type:"literal",values:Array.isArray(e)?e:[e],...ne.normalizeParams(t)})}function aI(e){return Gg(Sv,e)}function fp(e){return new Iv({type:"transform",transform:e})}function lc(e){return new hp({type:"optional",innerType:e})}function Ev(e){return new Tv({type:"optional",innerType:e})}function uc(e){return new Av({type:"nullable",innerType:e})}function cI(e){return lc(uc(e))}function Cv(e,t){return new Pv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ne.shallowClone(t)}})}function Uv(e,t){return new Ov({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ne.shallowClone(t)}})}function zv(e,t){return new mp({type:"nonoptional",innerType:e,...ne.normalizeParams(t)})}function lI(e){return new Nv({type:"success",innerType:e})}function Dv(e,t){return new Rv({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function uI(e){return Jg(jv,e)}function dc(e,t){return new gp({type:"pipe",in:e,out:t})}function dI(e,t,n){return new _p({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Fv(e){return new Lv({type:"readonly",innerType:e})}function pI(e,t){return new Mv({type:"template_literal",parts:e,...ne.normalizeParams(t)})}function Zv(e){return new Bv({type:"lazy",getter:e})}function fI(e){return new Wv({type:"promise",innerType:e})}function hI(e){return new Vv({type:"function",input:Array.isArray(e?.input)?bv(e?.input):e?.input??hc(io()),output:e?.output??io()})}function mI(e){let t=new ut({check:"custom"});return t._zod.check=e,t}function gI(e,t){return Hg(vc,e??(()=>!0),t)}function qv(e,t={}){return Xg(vc,e,t)}function Jv(e){return Yg(e)}function yI(e,t={}){let n=new vc({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...ne.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}function xI(e){let t=Zv(()=>dp([_r(e),iv(),ov(),lv(),hc(t),xv(_r(),t)]));return t}function wI(e,t){return dc(fp(e),t)}var Ue,qd,Ss,at,Jd,cc,An,pc,Kd,Gd,Hd,Xd,Yd,Qd,ep,tp,nv,rp,np,ip,op,sp,ap,cp,Is,Ts,oo,Es,As,lp,sv,av,cv,uv,dv,pv,fv,fc,hv,mc,gc,mv,gv,_v,yv,_c,wv,kv,$s,$v,Sv,Iv,hp,Tv,Av,Pv,Ov,mp,Nv,Rv,jv,gp,_p,Lv,Mv,Bv,Wv,Vv,vc,_I,vI,bI,ac=z(()=>{"use strict";g();Sr();Sr();ic();nc();Fd();oc();rv();Ue=R("ZodType",(e,t)=>(Pe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ws(e,"input"),output:ws(e,"output")}}),e.toJSONSchema=r_(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(ne.mergeDefs(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>hr(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Vn(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>q_(e,n,i),e.parseAsync=async(n,i)=>V_(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>J_(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>K_(e,n,i),e.decode=(n,i)=>G_(e,n,i),e.encodeAsync=async(n,i)=>H_(e,n,i),e.decodeAsync=async(n,i)=>X_(e,n,i),e.safeEncode=(n,i)=>Y_(e,n,i),e.safeDecode=(n,i)=>Q_(e,n,i),e.safeEncodeAsync=async(n,i)=>ev(e,n,i),e.safeDecodeAsync=async(n,i)=>tv(e,n,i),e.refine=(n,i)=>e.check(qv(n,i)),e.superRefine=n=>e.check(Jv(n)),e.overwrite=n=>e.check(ln(n)),e.optional=()=>lc(e),e.exactOptional=()=>Ev(e),e.nullable=()=>uc(e),e.nullish=()=>lc(uc(e)),e.nonoptional=n=>zv(e,n),e.array=()=>hc(e),e.or=n=>dp([e,n]),e.and=n=>vv(e,n),e.transform=n=>dc(e,fp(n)),e.default=n=>Cv(e,n),e.prefault=n=>Uv(e,n),e.catch=n=>Dv(e,n),e.pipe=n=>dc(e,n),e.readonly=()=>Fv(e),e.describe=n=>{let i=e.clone();return nr.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return nr.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return nr.get(e);let i=e.clone();return nr.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),qd=R("_ZodString",(e,t)=>{eo.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(i,r,s)=>n_(e,i,r,s);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(ls(...i)),e.includes=(...i)=>e.check(ps(...i)),e.startsWith=(...i)=>e.check(fs(...i)),e.endsWith=(...i)=>e.check(hs(...i)),e.min=(...i)=>e.check(Zn(...i)),e.max=(...i)=>e.check(ro(...i)),e.length=(...i)=>e.check(no(...i)),e.nonempty=(...i)=>e.check(Zn(1,...i)),e.lowercase=i=>e.check(us(i)),e.uppercase=i=>e.check(ds(i)),e.trim=()=>e.check(_s()),e.normalize=(...i)=>e.check(gs(...i)),e.toLowerCase=()=>e.check(vs()),e.toUpperCase=()=>e.check(ys()),e.slugify=()=>e.check(bs())}),Ss=R("ZodString",(e,t)=>{eo.init(e,t),qd.init(e,t),e.email=n=>e.check(ld(Jd,n)),e.url=n=>e.check(rc(pc,n)),e.jwt=n=>e.check(Ed(cp,n)),e.emoji=n=>e.check(hd(Kd,n)),e.guid=n=>e.check(tc(cc,n)),e.uuid=n=>e.check(ud(An,n)),e.uuidv4=n=>e.check(dd(An,n)),e.uuidv6=n=>e.check(pd(An,n)),e.uuidv7=n=>e.check(fd(An,n)),e.nanoid=n=>e.check(md(Gd,n)),e.guid=n=>e.check(tc(cc,n)),e.cuid=n=>e.check(gd(Hd,n)),e.cuid2=n=>e.check(_d(Xd,n)),e.ulid=n=>e.check(vd(Yd,n)),e.base64=n=>e.check(Sd(op,n)),e.base64url=n=>e.check(Id(sp,n)),e.xid=n=>e.check(yd(Qd,n)),e.ksuid=n=>e.check(bd(ep,n)),e.ipv4=n=>e.check(xd(tp,n)),e.ipv6=n=>e.check(wd(rp,n)),e.cidrv4=n=>e.check(kd(np,n)),e.cidrv6=n=>e.check($d(ip,n)),e.e164=n=>e.check(Td(ap,n)),e.datetime=n=>e.check(F_(n)),e.date=n=>e.check(M_(n)),e.time=n=>e.check(B_(n)),e.duration=n=>e.check(Z_(n))});at=R("ZodStringFormat",(e,t)=>{st.init(e,t),qd.init(e,t)}),Jd=R("ZodEmail",(e,t)=>{n1.init(e,t),at.init(e,t)});cc=R("ZodGUID",(e,t)=>{t1.init(e,t),at.init(e,t)});An=R("ZodUUID",(e,t)=>{r1.init(e,t),at.init(e,t)});pc=R("ZodURL",(e,t)=>{i1.init(e,t),at.init(e,t)});Kd=R("ZodEmoji",(e,t)=>{o1.init(e,t),at.init(e,t)});Gd=R("ZodNanoID",(e,t)=>{s1.init(e,t),at.init(e,t)});Hd=R("ZodCUID",(e,t)=>{a1.init(e,t),at.init(e,t)});Xd=R("ZodCUID2",(e,t)=>{c1.init(e,t),at.init(e,t)});Yd=R("ZodULID",(e,t)=>{l1.init(e,t),at.init(e,t)});Qd=R("ZodXID",(e,t)=>{u1.init(e,t),at.init(e,t)});ep=R("ZodKSUID",(e,t)=>{d1.init(e,t),at.init(e,t)});tp=R("ZodIPv4",(e,t)=>{g1.init(e,t),at.init(e,t)});nv=R("ZodMAC",(e,t)=>{v1.init(e,t),at.init(e,t)});rp=R("ZodIPv6",(e,t)=>{_1.init(e,t),at.init(e,t)});np=R("ZodCIDRv4",(e,t)=>{y1.init(e,t),at.init(e,t)});ip=R("ZodCIDRv6",(e,t)=>{b1.init(e,t),at.init(e,t)});op=R("ZodBase64",(e,t)=>{w1.init(e,t),at.init(e,t)});sp=R("ZodBase64URL",(e,t)=>{k1.init(e,t),at.init(e,t)});ap=R("ZodE164",(e,t)=>{$1.init(e,t),at.init(e,t)});cp=R("ZodJWT",(e,t)=>{S1.init(e,t),at.init(e,t)});Is=R("ZodCustomStringFormat",(e,t)=>{I1.init(e,t),at.init(e,t)});Ts=R("ZodNumber",(e,t)=>{ed.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(i,r,s)=>i_(e,i,r,s),e.gt=(i,r)=>e.check(Tn(i,r)),e.gte=(i,r)=>e.check(mr(i,r)),e.min=(i,r)=>e.check(mr(i,r)),e.lt=(i,r)=>e.check(In(i,r)),e.lte=(i,r)=>e.check(Nr(i,r)),e.max=(i,r)=>e.check(Nr(i,r)),e.int=i=>e.check(Vd(i)),e.safe=i=>e.check(Vd(i)),e.positive=i=>e.check(Tn(0,i)),e.nonnegative=i=>e.check(mr(0,i)),e.negative=i=>e.check(In(0,i)),e.nonpositive=i=>e.check(Nr(0,i)),e.multipleOf=(i,r)=>e.check(ki(i,r)),e.step=(i,r)=>e.check(ki(i,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});oo=R("ZodNumberFormat",(e,t)=>{T1.init(e,t),Ts.init(e,t)});Es=R("ZodBoolean",(e,t)=>{Ga.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>o_(e,n,i,r)});As=R("ZodBigInt",(e,t)=>{td.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(i,r,s)=>s_(e,i,r,s),e.gte=(i,r)=>e.check(mr(i,r)),e.min=(i,r)=>e.check(mr(i,r)),e.gt=(i,r)=>e.check(Tn(i,r)),e.gte=(i,r)=>e.check(mr(i,r)),e.min=(i,r)=>e.check(mr(i,r)),e.lt=(i,r)=>e.check(In(i,r)),e.lte=(i,r)=>e.check(Nr(i,r)),e.max=(i,r)=>e.check(Nr(i,r)),e.positive=i=>e.check(Tn(BigInt(0),i)),e.negative=i=>e.check(In(BigInt(0),i)),e.nonpositive=i=>e.check(Nr(BigInt(0),i)),e.nonnegative=i=>e.check(mr(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(ki(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});lp=R("ZodBigIntFormat",(e,t)=>{E1.init(e,t),As.init(e,t)});sv=R("ZodSymbol",(e,t)=>{A1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>a_(e,n,i,r)});av=R("ZodUndefined",(e,t)=>{P1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>l_(e,n,i,r)});cv=R("ZodNull",(e,t)=>{C1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>c_(e,n,i,r)});uv=R("ZodAny",(e,t)=>{O1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>p_(e,n,i,r)});dv=R("ZodUnknown",(e,t)=>{U1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>f_(e,n,i,r)});pv=R("ZodNever",(e,t)=>{z1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>d_(e,n,i,r)});fv=R("ZodVoid",(e,t)=>{N1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>u_(e,n,i,r)});fc=R("ZodDate",(e,t)=>{R1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(i,r,s)=>h_(e,i,r,s),e.min=(i,r)=>e.check(mr(i,r)),e.max=(i,r)=>e.check(Nr(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});hv=R("ZodArray",(e,t)=>{D1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>I_(e,n,i,r),e.element=t.element,e.min=(n,i)=>e.check(Zn(n,i)),e.nonempty=n=>e.check(Zn(1,n)),e.max=(n,i)=>e.check(ro(n,i)),e.length=(n,i)=>e.check(no(n,i)),e.unwrap=()=>e.element});mc=R("ZodObject",(e,t)=>{j1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>T_(e,n,i,r),ne.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>pp(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:io()}),e.loose=()=>e.clone({...e._zod.def,catchall:io()}),e.strict=()=>e.clone({...e._zod.def,catchall:up()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>ne.extend(e,n),e.safeExtend=n=>ne.safeExtend(e,n),e.merge=n=>ne.merge(e,n),e.pick=n=>ne.pick(e,n),e.omit=n=>ne.omit(e,n),e.partial=(...n)=>ne.partial(hp,e,n[0]),e.required=(...n)=>ne.required(mp,e,n[0])});gc=R("ZodUnion",(e,t)=>{Ha.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nd(e,n,i,r),e.options=t.options});mv=R("ZodXor",(e,t)=>{gc.init(e,t),L1.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nd(e,n,i,r),e.options=t.options});gv=R("ZodDiscriminatedUnion",(e,t)=>{gc.init(e,t),F1.init(e,t)});_v=R("ZodIntersection",(e,t)=>{M1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>E_(e,n,i,r)});yv=R("ZodTuple",(e,t)=>{rd.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>A_(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});_c=R("ZodRecord",(e,t)=>{B1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>P_(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});wv=R("ZodMap",(e,t)=>{Z1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$_(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(En(...n)),e.nonempty=n=>e.check(En(1,n)),e.max=(...n)=>e.check($i(...n)),e.size=(...n)=>e.check(to(...n))});kv=R("ZodSet",(e,t)=>{W1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>S_(e,n,i,r),e.min=(...n)=>e.check(En(...n)),e.nonempty=n=>e.check(En(1,n)),e.max=(...n)=>e.check($i(...n)),e.size=(...n)=>e.check(to(...n))});$s=R("ZodEnum",(e,t)=>{V1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(i,r,s)=>m_(e,i,r,s),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let s={};for(let c of i)if(n.has(c))s[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new $s({...t,checks:[],...ne.normalizeParams(r),entries:s})},e.exclude=(i,r)=>{let s={...t.entries};for(let c of i)if(n.has(c))delete s[c];else throw new Error(`Key ${c} not found in enum`);return new $s({...t,checks:[],...ne.normalizeParams(r),entries:s})}});$v=R("ZodLiteral",(e,t)=>{q1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>g_(e,n,i,r),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]}})});Sv=R("ZodFile",(e,t)=>{J1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>y_(e,n,i,r),e.min=(n,i)=>e.check(En(n,i)),e.max=(n,i)=>e.check($i(n,i)),e.mime=(n,i)=>e.check(ms(Array.isArray(n)?n:[n],i))});Iv=R("ZodTransform",(e,t)=>{K1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>k_(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new vi(e.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(ne.issue(s,n.value,t));else{let c=s;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(ne.issue(c))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(s=>(n.value=s,n)):(n.value=r,n)}});hp=R("ZodOptional",(e,t)=>{nd.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Tv=R("ZodExactOptional",(e,t)=>{G1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rd(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Av=R("ZodNullable",(e,t)=>{H1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>C_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Pv=R("ZodDefault",(e,t)=>{X1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>U_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Ov=R("ZodPrefault",(e,t)=>{Y1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>z_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});mp=R("ZodNonOptional",(e,t)=>{Q1.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>O_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Nv=R("ZodSuccess",(e,t)=>{eg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>b_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Rv=R("ZodCatch",(e,t)=>{tg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>N_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});jv=R("ZodNaN",(e,t)=>{rg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>__(e,n,i,r)});gp=R("ZodPipe",(e,t)=>{ng.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>R_(e,n,i,r),e.in=t.in,e.out=t.out});_p=R("ZodCodec",(e,t)=>{gp.init(e,t),Xa.init(e,t)});Lv=R("ZodReadonly",(e,t)=>{ig.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>D_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Mv=R("ZodTemplateLiteral",(e,t)=>{og.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>v_(e,n,i,r)});Bv=R("ZodLazy",(e,t)=>{cg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>L_(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});Wv=R("ZodPromise",(e,t)=>{ag.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>j_(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});Vv=R("ZodFunction",(e,t)=>{sg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>w_(e,n,i,r)});vc=R("ZodCustom",(e,t)=>{lg.init(e,t),Ue.init(e,t),e._zod.processJSONSchema=(n,i,r)=>x_(e,n,i,r)});_I=Qg,vI=e_;bI=(...e)=>t_({Codec:_p,Boolean:Es,String:Ss},...e)});function AR(e){Pt({customError:e})}function PR(){return Pt().customError}var ER,Kv,kI=z(()=>{"use strict";g();Sr();Sr();ER={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"};Kv||(Kv={})});function OR(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function UR(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function $I(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ue.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return ue.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let s=UR(r,t),c=ar(s,t);return t.refs.set(r,c),t.processing.delete(r),c}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return ue.null();if(r.length===0)return ue.never();if(r.length===1)return ue.literal(r[0]);if(r.every(c=>typeof c=="string"))return ue.enum(r);let s=r.map(c=>ue.literal(c));return s.length<2?s[0]:ue.union([s[0],s[1],...s.slice(2)])}if(e.const!==void 0)return ue.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(s=>{let c={...e,type:s};return $I(c,t)});return r.length===0?ue.never():r.length===1?r[0]:ue.union(r)}if(!n)return ue.any();let i;switch(n){case"string":{let r=ue.string();if(e.format){let s=e.format;s==="email"?r=r.check(ue.email()):s==="uri"||s==="uri-reference"?r=r.check(ue.url()):s==="uuid"||s==="guid"?r=r.check(ue.uuid()):s==="date-time"?r=r.check(ue.iso.datetime()):s==="date"?r=r.check(ue.iso.date()):s==="time"?r=r.check(ue.iso.time()):s==="duration"?r=r.check(ue.iso.duration()):s==="ipv4"?r=r.check(ue.ipv4()):s==="ipv6"?r=r.check(ue.ipv6()):s==="mac"?r=r.check(ue.mac()):s==="cidr"?r=r.check(ue.cidrv4()):s==="cidr-v6"?r=r.check(ue.cidrv6()):s==="base64"?r=r.check(ue.base64()):s==="base64url"?r=r.check(ue.base64url()):s==="e164"?r=r.check(ue.e164()):s==="jwt"?r=r.check(ue.jwt()):s==="emoji"?r=r.check(ue.emoji()):s==="nanoid"?r=r.check(ue.nanoid()):s==="cuid"?r=r.check(ue.cuid()):s==="cuid2"?r=r.check(ue.cuid2()):s==="ulid"?r=r.check(ue.ulid()):s==="xid"?r=r.check(ue.xid()):s==="ksuid"&&(r=r.check(ue.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?ue.number().int():ue.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=ue.boolean();break}case"null":{i=ue.null();break}case"object":{let r={},s=e.properties||{},c=new Set(e.required||[]);for(let[p,f]of Object.entries(s)){let v=ar(f,t);r[p]=c.has(p)?v:v.optional()}if(e.propertyNames){let p=ar(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?ar(e.additionalProperties,t):ue.any();if(Object.keys(r).length===0){i=ue.record(p,f);break}let v=ue.object(r).passthrough(),y=ue.looseRecord(p,f);i=ue.intersection(v,y);break}if(e.patternProperties){let p=e.patternProperties,f=Object.keys(p),v=[];for(let k of f){let I=ar(p[k],t),$=ue.string().regex(new RegExp(k));v.push(ue.looseRecord($,I))}let y=[];if(Object.keys(r).length>0&&y.push(ue.object(r).passthrough()),y.push(...v),y.length===0)i=ue.object({}).passthrough();else if(y.length===1)i=y[0];else{let k=ue.intersection(y[0],y[1]);for(let I=2;I<y.length;I++)k=ue.intersection(k,y[I]);i=k}break}let u=ue.object(r);e.additionalProperties===!1?i=u.strict():typeof e.additionalProperties=="object"?i=u.catchall(ar(e.additionalProperties,t)):i=u.passthrough();break}case"array":{let r=e.prefixItems,s=e.items;if(r&&Array.isArray(r)){let c=r.map(p=>ar(p,t)),u=s&&typeof s=="object"&&!Array.isArray(s)?ar(s,t):void 0;u?i=ue.tuple(c).rest(u):i=ue.tuple(c),typeof e.minItems=="number"&&(i=i.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ue.maxLength(e.maxItems)))}else if(Array.isArray(s)){let c=s.map(p=>ar(p,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?ar(e.additionalItems,t):void 0;u?i=ue.tuple(c).rest(u):i=ue.tuple(c),typeof e.minItems=="number"&&(i=i.check(ue.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ue.maxLength(e.maxItems)))}else if(s!==void 0){let c=ar(s,t),u=ue.array(c);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),i=u}else i=ue.array(ue.any());break}default:throw new Error(`Unsupported type: ${n}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ar(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=$I(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>ar(f,t)),p=ue.union(u);n=i?ue.intersection(n,p):p}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>ar(f,t)),p=ue.xor(u);n=i?ue.intersection(n,p):p}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:ue.any();else{let u=i?n:ar(e.allOf[0],t),p=i?0:1;for(let f=p;f<e.allOf.length;f++)u=ue.intersection(u,ar(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ue.nullable(n)),e.readOnly===!0&&(n=ue.readonly(n));let r={},s=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of s)u in e&&(r[u]=e[u]);let c=["contentEncoding","contentMediaType","contentSchema"];for(let u of c)u in e&&(r[u]=e[u]);for(let u of Object.keys(e))CR.has(u)||(r[u]=e[u]);return Object.keys(r).length>0&&t.registry.add(n,r),n}function SI(e,t){if(typeof e=="boolean")return e?ue.any():ue.never();let n=OR(e,t?.defaultTarget),i=e.$defs||e.definitions||{},r={version:n,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??nr};return ar(e,r)}var ue,CR,II=z(()=>{"use strict";g();ec();Fd();oc();ac();ue={...sc,...Ld,iso:ks},CR=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var Gv={};It(Gv,{bigint:()=>DR,boolean:()=>RR,date:()=>jR,number:()=>NR,string:()=>zR});function zR(e){return vg(Ss,e)}function NR(e){return Ig(Ts,e)}function RR(e){return Ug(Es,e)}function DR(e){return Ng(As,e)}function jR(e){return qg(fc,e)}var TI=z(()=>{"use strict";g();Sr();ac()});var Ps={};It(Ps,{$brand:()=>Pu,$input:()=>gg,$output:()=>mg,NEVER:()=>Bh,TimePrecision:()=>bg,ZodAny:()=>uv,ZodArray:()=>hv,ZodBase64:()=>op,ZodBase64URL:()=>sp,ZodBigInt:()=>As,ZodBigIntFormat:()=>lp,ZodBoolean:()=>Es,ZodCIDRv4:()=>np,ZodCIDRv6:()=>ip,ZodCUID:()=>Hd,ZodCUID2:()=>Xd,ZodCatch:()=>Rv,ZodCodec:()=>_p,ZodCustom:()=>vc,ZodCustomStringFormat:()=>Is,ZodDate:()=>fc,ZodDefault:()=>Pv,ZodDiscriminatedUnion:()=>gv,ZodE164:()=>ap,ZodEmail:()=>Jd,ZodEmoji:()=>Kd,ZodEnum:()=>$s,ZodError:()=>IR,ZodExactOptional:()=>Tv,ZodFile:()=>Sv,ZodFirstPartyTypeKind:()=>Kv,ZodFunction:()=>Vv,ZodGUID:()=>cc,ZodIPv4:()=>tp,ZodIPv6:()=>rp,ZodISODate:()=>Bd,ZodISODateTime:()=>Md,ZodISODuration:()=>Wd,ZodISOTime:()=>Zd,ZodIntersection:()=>_v,ZodIssueCode:()=>ER,ZodJWT:()=>cp,ZodKSUID:()=>ep,ZodLazy:()=>Bv,ZodLiteral:()=>$v,ZodMAC:()=>nv,ZodMap:()=>wv,ZodNaN:()=>jv,ZodNanoID:()=>Gd,ZodNever:()=>pv,ZodNonOptional:()=>mp,ZodNull:()=>cv,ZodNullable:()=>Av,ZodNumber:()=>Ts,ZodNumberFormat:()=>oo,ZodObject:()=>mc,ZodOptional:()=>hp,ZodPipe:()=>gp,ZodPrefault:()=>Ov,ZodPromise:()=>Wv,ZodReadonly:()=>Lv,ZodRealError:()=>Ir,ZodRecord:()=>_c,ZodSet:()=>kv,ZodString:()=>Ss,ZodStringFormat:()=>at,ZodSuccess:()=>Nv,ZodSymbol:()=>sv,ZodTemplateLiteral:()=>Mv,ZodTransform:()=>Iv,ZodTuple:()=>yv,ZodType:()=>Ue,ZodULID:()=>Yd,ZodURL:()=>pc,ZodUUID:()=>An,ZodUndefined:()=>av,ZodUnion:()=>gc,ZodUnknown:()=>dv,ZodVoid:()=>fv,ZodXID:()=>Qd,ZodXor:()=>mv,_ZodString:()=>qd,_default:()=>Cv,_function:()=>hI,any:()=>JS,array:()=>hc,base64:()=>PS,base64url:()=>CS,bigint:()=>BS,boolean:()=>ov,catch:()=>Dv,check:()=>mI,cidrv4:()=>ES,cidrv6:()=>AS,clone:()=>hr,codec:()=>dI,coerce:()=>Gv,config:()=>Pt,core:()=>Wn,cuid:()=>bS,cuid2:()=>xS,custom:()=>gI,date:()=>GS,decode:()=>G_,decodeAsync:()=>X_,describe:()=>_I,discriminatedUnion:()=>eI,e164:()=>OS,email:()=>uS,emoji:()=>vS,encode:()=>K_,encodeAsync:()=>H_,endsWith:()=>hs,enum:()=>pp,exactOptional:()=>Ev,file:()=>aI,flattenError:()=>Wa,float32:()=>jS,float64:()=>LS,formatError:()=>Va,fromJSONSchema:()=>SI,function:()=>hI,getErrorMap:()=>PR,globalRegistry:()=>nr,gt:()=>Tn,gte:()=>mr,guid:()=>dS,hash:()=>DS,hex:()=>RS,hostname:()=>NS,httpUrl:()=>_S,includes:()=>ps,instanceof:()=>yI,int:()=>Vd,int32:()=>FS,int64:()=>ZS,intersection:()=>vv,ipv4:()=>SS,ipv6:()=>TS,iso:()=>ks,json:()=>xI,jwt:()=>US,keyof:()=>HS,ksuid:()=>$S,lazy:()=>Zv,length:()=>no,literal:()=>sI,locales:()=>Qa,looseObject:()=>YS,looseRecord:()=>rI,lowercase:()=>us,lt:()=>In,lte:()=>Nr,mac:()=>IS,map:()=>nI,maxLength:()=>ro,maxSize:()=>$i,meta:()=>vI,mime:()=>ms,minLength:()=>Zn,minSize:()=>En,multipleOf:()=>ki,nan:()=>uI,nanoid:()=>yS,nativeEnum:()=>oI,negative:()=>Pd,never:()=>up,nonnegative:()=>Od,nonoptional:()=>zv,nonpositive:()=>Cd,normalize:()=>gs,null:()=>lv,nullable:()=>uc,nullish:()=>cI,number:()=>iv,object:()=>Ei,optional:()=>lc,overwrite:()=>ln,parse:()=>Vn,parseAsync:()=>V_,partialRecord:()=>tI,pipe:()=>dc,positive:()=>Ad,prefault:()=>Uv,preprocess:()=>wI,prettifyError:()=>em,promise:()=>fI,property:()=>Ud,readonly:()=>Fv,record:()=>xv,refine:()=>qv,regex:()=>ls,regexes:()=>Gr,registry:()=>cd,safeDecode:()=>Q_,safeDecodeAsync:()=>tv,safeEncode:()=>Y_,safeEncodeAsync:()=>ev,safeParse:()=>q_,safeParseAsync:()=>J_,set:()=>iI,setErrorMap:()=>AR,size:()=>to,slugify:()=>bs,startsWith:()=>fs,strictObject:()=>XS,string:()=>_r,stringFormat:()=>zS,stringbool:()=>bI,success:()=>lI,superRefine:()=>Jv,symbol:()=>VS,templateLiteral:()=>pI,toJSONSchema:()=>Dd,toLowerCase:()=>vs,toUpperCase:()=>ys,transform:()=>fp,treeifyError:()=>Qh,trim:()=>_s,tuple:()=>bv,uint32:()=>MS,uint64:()=>WS,ulid:()=>wS,undefined:()=>qS,union:()=>dp,unknown:()=>io,uppercase:()=>ds,url:()=>gS,util:()=>ne,uuid:()=>pS,uuidv4:()=>fS,uuidv6:()=>hS,uuidv7:()=>mS,void:()=>KS,xid:()=>kS,xor:()=>QS});var Hv=z(()=>{"use strict";g();Sr();ac();Fd();W_();rv();kI();Sr();dg();Sr();ic();II();hg();oc();oc();TI();Pt(id())});var yc=z(()=>{"use strict";g();Hv();Hv()});import LR from"http";function ZR(e){if(!e.url)throw new Error("No URL found in callback response.");let t=new URL(e.url,Yv);return Vn(FR,Object.fromEntries(t.searchParams.entries()))}function EI(e){e.writeHead(400,{"Content-Type":"text/html"}),e.end(BR)}function WR(e){e.writeHead(200,{"Content-Type":"text/html"}),e.end(MR)}function PI(e){return new Promise((t,n)=>{let i=LR.createServer(async(r,s)=>{let c=await Ae(()=>ZR(r),p=>p);if(c.failure){EI(s),n(c.failure);return}let u=await Ae(()=>e(c.data),p=>p);if(u.failure){EI(s),n(u.failure);return}WR(s),i.close(()=>{t()})});i.listen(AI)})}var AI,Yv,FR,MR,BR,CI=z(()=>{"use strict";g();rr();yc();AI=8765,Yv=`http://localhost:${AI}`,FR=Ei({code:_r(),state:_r()}),MR=`
|
|
106
|
-
<!DOCTYPE html>
|
|
107
|
-
<html lang="en">
|
|
108
|
-
<head>
|
|
109
|
-
<meta charset="UTF-8">
|
|
110
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
111
|
-
<title>Authentication Successful</title>
|
|
112
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
113
|
-
</head>
|
|
114
|
-
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
|
|
115
|
-
<div class="bg-white p-8 rounded-2xl shadow-lg text-center max-w-md">
|
|
116
|
-
<svg class="w-16 h-16 text-green-500 mx-auto" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
117
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
|
118
|
-
</svg>
|
|
119
|
-
<h1 class="text-2xl font-semibold mt-4">Authentication Successful</h1>
|
|
120
|
-
<p class="text-gray-600 mt-2">You can now return to your terminal and close this browser.</p>
|
|
121
|
-
</div>
|
|
122
|
-
</body>
|
|
123
|
-
</html>
|
|
124
|
-
`,BR=`
|
|
125
|
-
<!DOCTYPE html>
|
|
126
|
-
<html lang="en">
|
|
127
|
-
<head>
|
|
128
|
-
<meta charset="UTF-8">
|
|
129
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
130
|
-
<title>Authentication Failed</title>
|
|
131
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
132
|
-
</head>
|
|
133
|
-
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
|
|
134
|
-
<div class="bg-white p-8 rounded-2xl shadow-lg text-center max-w-md">
|
|
135
|
-
<svg class="w-16 h-16 text-red-500 mx-auto" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
136
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
137
|
-
</svg>
|
|
138
|
-
<h1 class="text-2xl font-semibold mt-4">Authentication Failed</h1>
|
|
139
|
-
<p class="text-gray-600 mt-2">Something bad happened while trying to authenticate you. Please try again.</p>
|
|
140
|
-
<p class="text-gray-600 mt-2">If the problem persists, <a href="mailto:help@byteslice.co" target="_blank" class="text-amber-500 hover:text-amber-600">please let us know</a>.</p>
|
|
141
|
-
</div>
|
|
142
|
-
</body>
|
|
143
|
-
</html>
|
|
144
|
-
`});var RI=$t((bc,Qv)=>{"use strict";g();(function(e,t){if(typeof bc=="object"&&typeof Qv=="object")Qv.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var n=t();for(var i in n)(typeof bc=="object"?bc:e)[i]=n[i]}})(globalThis,()=>(()=>{var e={3822:function(i,r,s){"use strict";let c,u,p;function f(){return typeof window<"u"}s.r(r),s.d(r,{EmailLinkErrorCode:()=>Re,EmailLinkErrorCodeStatus:()=>pt,ClerkRuntimeError:()=>ye,isEmailLinkError:()=>zt,Clerk:()=>Dt,isClerkAPIResponseError:()=>Ce,EmailLinkError:()=>Tt,isClerkRuntimeError:()=>ve,ClerkAPIResponseError:()=>Ke,isMetamaskError:()=>Qe,isUserLockedError:()=>De,isKnownError:()=>xe}),s(4096);let v=RegExp("bot|spider|crawl|APIs-Google|AdsBot|Googlebot|mediapartners|Google Favicon|FeedFetcher|Google-Read-Aloud|DuplexWeb-Google|googleweblight|bing|yandex|baidu|duckduck|yahoo|ecosia|ia_archiver|facebook|instagram|pinterest|reddit|slack|twitter|whatsapp|youtube|semrush","i");function y(){var m;let o=f()?window?.navigator:null;return!!o&&!((m=o?.userAgent)&&v.test(m))&&!o?.webdriver}function k(){let m=f()?window?.navigator:null;if(!m)return!1;let o=m?.onLine;return m?.connection?.rtt!==0&&m?.connection?.downlink!==0&&o}function I(){return k()&&y()}let $=(m,o,l,h,_)=>{let{notify:b}=_||{},x=m.get(l);x||(x=[],m.set(l,x)),x.push(h),b&&o.has(l)&&h(o.get(l))},O=(m,o,l)=>(m.get(o)||[]).map(h=>h(l)),F=(m,o,l)=>{let h=m.get(o);h&&(l?h.splice(h.indexOf(l)>>>0,1):m.set(o,[]))},Z=()=>{let m=new Map,o=new Map,l=new Map;return{on:(...h)=>$(m,o,...h),prioritizedOn:(...h)=>$(l,o,...h),emit:(h,_)=>{o.set(h,_),O(l,h,_),O(m,h,_)},off:(...h)=>F(m,...h),prioritizedOff:(...h)=>F(l,...h),internal:{retrieveListeners:h=>m.get(h)||[]}}},M="status",H=new Set;function W(m){return function(o){let l=o??this;if(!l)throw TypeError(`${m.kind||m.name} type guard requires an error object`);return l instanceof m}}var ee,fe,Y=class{static kind="ClerkApiError";code;message;longMessage;meta;constructor(m){let o={code:m.code,message:m.message,longMessage:m.long_message,meta:{paramName:m.meta?.param_name,sessionId:m.meta?.session_id,emailAddresses:m.meta?.email_addresses,identifiers:m.meta?.identifiers,zxcvbn:m.meta?.zxcvbn,plan:m.meta?.plan,isPlanUpgradePossible:m.meta?.is_plan_upgrade_possible}};this.code=o.code,this.message=o.message,this.longMessage=o.longMessage,this.meta=o.meta}};W(Y);var X=class OI extends Error{static kind="ClerkError";clerkError=!0;code;longMessage;docsUrl;cause;get name(){return this.constructor.name}constructor(o){super(new.target.formatMessage(new.target.kind,o.message,o.code,o.docsUrl),{cause:o.cause}),Object.setPrototypeOf(this,OI.prototype),this.code=o.code,this.docsUrl=o.docsUrl,this.longMessage=o.longMessage,this.cause=o.cause}toString(){return`[${this.name}]
|
|
145
|
-
Message:${this.message}`}static formatMessage(o,l,h,_){let b="Clerk:",x=RegExp(b.replace(" ","\\s*"),"i");return l=l.replace(x,""),l=`${b} ${l.trim()}
|
|
146
|
-
|
|
147
|
-
(code="${h}")
|
|
148
|
-
|
|
149
|
-
`,_&&(l+=`
|
|
150
|
-
|
|
151
|
-
Docs: ${_}`),l}},Ke=class UI extends X{static kind="ClerkAPIResponseError";status;clerkTraceId;retryAfter;errors;constructor(o,l){let{data:h,status:_,clerkTraceId:b,retryAfter:x}=l;super({...l,message:o,code:"api_response_error"}),Object.setPrototypeOf(this,UI.prototype),this.status=_,this.clerkTraceId=b,this.retryAfter=x,this.errors=(h||[]).map(A=>new Y(A))}toString(){let o=`[${this.name}]
|
|
152
|
-
Message:${this.message}
|
|
153
|
-
Status:${this.status}
|
|
154
|
-
Serialized errors: ${this.errors.map(l=>JSON.stringify(l))}`;return this.clerkTraceId&&(o+=`
|
|
155
|
-
Clerk Trace ID: ${this.clerkTraceId}`),o}static formatMessage(o,l,h,_){return l}};let lt=W(Ke),Ye=Object.freeze({InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingSecretKeyErrorMessage:"Missing secretKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.",MissingClerkProvider:"{{source}} can only be used within the <ClerkProvider /> component. Learn more: https://clerk.com/docs/components/clerk-provider"});var Tt=class zI extends Error{code;constructor(o){super(o),this.code=o,this.name="EmailLinkError",Object.setPrototypeOf(this,zI.prototype)}};let Re={Expired:"expired",Failed:"failed",ClientMismatch:"client_mismatch"},pt={Expired:"expired",Failed:"failed",ClientMismatch:"client_mismatch"};var ye=class NI extends X{static kind="ClerkRuntimeError";clerkRuntimeError=!0;constructor(o,l){super({...l,message:o}),Object.setPrototypeOf(this,NI.prototype)}};let Et=W(ye);var tt=class extends ye{code;constructor(m,{code:o}){super(m,{code:o}),this.code=o}};function oe(m){return["captcha_invalid","captcha_not_enabled","captcha_missing_token"].includes(m.errors[0].code)}function ce(m){let o=m?.status;return!!o&&o>=400&&o<500}function xe(m){return Ce(m)||Qe(m)||ve(m)}function Ce(m){return m&&"clerkError"in m}function ve(m){return"clerkRuntimeError"in m}function Qe(m){return"code"in m&&[4001,32602,32603].includes(m.code)&&"message"in m}function De(m){return Ce(m)&&m.errors?.[0]?.code==="user_locked"}function zt(m){return m.name==="EmailLinkError"}function ur(m){for(let[o,l]of Object.entries({isClerkApiResponseError:lt,isClerkRuntimeError:Et}))Object.assign(m,{[o]:l});return m}let Pr=[".lcl.dev",".lclstage.dev",".lclclerk.com"],hn=[".accounts.dev",".accountsstage.dev",".accounts.lclclerk.com"],Cr=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],dr=m=>typeof atob<"u"&&typeof atob=="function"?atob(m):typeof global<"u"&&global.Buffer?new global.Buffer(m,"base64").toString():m,or="pk_live_";function Mr(m){if(!m.endsWith("$"))return!1;let o=m.slice(0,-1);return!o.includes("$")&&o.includes(".")}function Nt(m,o={}){let l;if(!(m=m||"")||!Be(m)){if(o.fatal&&!m)throw Error("Publishable key is missing. Ensure that your publishable key is correctly configured. Double-check your environment configuration for your keys, or access them here: https://dashboard.clerk.com/last-active?path=api-keys");if(o.fatal&&!Be(m))throw Error("Publishable key not valid.");return null}let h=m.startsWith(or)?"production":"development";try{l=dr(m.split("_")[2])}catch{if(o.fatal)throw Error("Publishable key not valid: Failed to decode key.");return null}if(!Mr(l)){if(o.fatal)throw Error("Publishable key not valid: Decoded key has invalid format.");return null}let _=l.slice(0,-1);return o.proxyUrl?_=o.proxyUrl:h!=="development"&&o.domain&&o.isSatellite&&(_=`clerk.${o.domain}`),{instanceType:h,frontendApi:_}}function Be(m=""){try{if(!(m.startsWith(or)||m.startsWith("pk_test_")))return!1;let o=m.split("_");if(o.length!==3)return!1;let l=o[2];return l?Mr(dr(l)):!1}catch{return!1}}async function mn(m,o=globalThis.crypto.subtle){var l;let h=new TextEncoder().encode(m);return(l=String.fromCharCode(...new Uint8Array(await o.digest("sha-1",h))),typeof btoa<"u"&&typeof btoa=="function"?btoa(l):typeof global<"u"&&global.Buffer?new global.Buffer(l).toString("base64"):l).replace(/\+/gi,"-").replace(/\//gi,"_").substring(0,8)}let gn=(m,o)=>`${m}_${o}`,Br=new Set,At=m=>{Br.has(m)||(Br.add(m),console.warn(m))},xo="__clerk_netlify_cache_bust";function wo(m){return/^http(s)?:\/\//.test(m||"")}function ko(m){return m.startsWith("/")}function $o(m){return m?m.replace(/([-_][a-z])/g,o=>o.toUpperCase().replace(/-|_/,"")):""}function on(m){return m?m.replace(/[A-Z]/g,o=>`_${o.toLowerCase()}`):""}let So=m=>{let o=l=>{if(!l)return l;if(Array.isArray(l))return l.map(_=>typeof _=="object"||Array.isArray(_)?o(_):_);let h={...l};for(let _ of Object.keys(h)){let b=m(_.toString());b!==_&&(h[b]=h[_],delete h[_]),typeof h[b]=="object"&&(h[b]=o(h[b]))}return h};return o},Io=So(on),oi=So($o);function To(m){if(typeof m=="boolean")return m;if(m==null)return!1;if(typeof m=="string"){if(m.toLowerCase()==="true")return!0;if(m.toLowerCase()==="false")return!1}let o=parseInt(m,10);return!isNaN(o)&&o>0}var ta=class{#r;#i=864e5;constructor(m){this.#r=m}isEventThrottled(m){let o=Date.now(),l=this.#n(m),h=this.#r.getItem(l);return!!h&&!(o-h>this.#i)||(this.#r.setItem(l,o),!1)}#n(m){let{sk:o,pk:l,payload:h,..._}=m,b={...h,..._};return JSON.stringify(Object.keys({...h,..._}).sort().map(x=>b[x]))}},Eo=class{#r="clerk_telemetry_throttler";getItem(m){return this.#i()[m]}setItem(m,o){try{let l=this.#i();l[m]=o,localStorage.setItem(this.#r,JSON.stringify(l))}catch(l){l instanceof DOMException&&(l.name==="QuotaExceededError"||l.name==="NS_ERROR_DOM_QUOTA_REACHED")&&localStorage.length>0&&localStorage.removeItem(this.#r)}}removeItem(m){try{let o=this.#i();delete o[m],localStorage.setItem(this.#r,JSON.stringify(o))}catch{}}#i(){try{let m=localStorage.getItem(this.#r);return m?JSON.parse(m):{}}catch{return{}}}static isSupported(){return typeof window<"u"&&!!window.localStorage}},ra=class{#r=new Map;#i=1e4;getItem(m){return this.#r.size>this.#i?void this.#r.clear():this.#r.get(m)}setItem(m,o){this.#r.set(m,o)}removeItem(m){this.#r.delete(m)}};let na=new Set(["error","warn","info","debug","trace"]);var ia=class{#r;#i;#n={};#a=[];#s=null;constructor(m){this.#r={maxBufferSize:m.maxBufferSize??5,samplingRate:m.samplingRate??1,perEventSampling:m.perEventSampling??!0,disabled:m.disabled??!1,debug:m.debug??!1,endpoint:"https://clerk-telemetry.com"},m.clerkVersion||typeof window<"u"?this.#n.clerkVersion=m.clerkVersion??"":this.#n.clerkVersion="",this.#n.sdk=m.sdk,this.#n.sdkVersion=m.sdkVersion,this.#n.publishableKey=m.publishableKey??"";let o=Nt(m.publishableKey);o&&(this.#n.instanceType=o.instanceType),m.secretKey&&(this.#n.secretKey=m.secretKey.substring(0,16)),this.#i=new ta(Eo.isSupported()?new Eo:new ra)}get isEnabled(){return!(this.#n.instanceType!=="development"||this.#r.disabled||typeof process<"u"&&process.env&&To(process.env.CLERK_TELEMETRY_DISABLED)||typeof window<"u"&&window?.navigator?.webdriver)}get isDebug(){return this.#r.debug||typeof process<"u"&&process.env&&To(process.env.CLERK_TELEMETRY_DEBUG)}record(m){try{let o=this.#f(m.event,m.payload);if(this.#o(o.event,o),!this.#p(o,m.eventSamplingRate))return;this.#a.push({kind:"event",value:o}),this.#e()}catch(o){console.error("[clerk/telemetry] Error recording telemetry event",o)}}recordLog(m){try{if(!this.#d(m))return;let o=typeof m?.level=="string"&&na.has(m.level),l=typeof m?.message=="string"&&m.message.trim().length>0,h=null,_=m?.timestamp;if(typeof _=="number"||typeof _=="string"){let A=new Date(_);Number.isNaN(A.getTime())||(h=A)}if(!o||!l||h===null){this.isDebug&&typeof console<"u"&&console.warn("[clerk/telemetry] Dropping invalid telemetry log entry",{levelIsValid:o,messageIsValid:l,timestampIsValid:h!==null});return}let b=this.#g(),x={sdk:b.name,sdkv:b.version,cv:this.#n.clerkVersion??"",lvl:m.level,msg:m.message,ts:h.toISOString(),pk:this.#n.publishableKey||null,payload:this.#h(m.context)};this.#a.push({kind:"log",value:x}),this.#e()}catch(o){console.error("[clerk/telemetry] Error recording telemetry log entry",o)}}#p(m,o){return this.isEnabled&&!this.isDebug&&this.#u(m,o)}#d(m){return!0}#u(m,o){let l=Math.random();return l<=this.#r.samplingRate&&(this.#r.perEventSampling===!1||o===void 0||l<=o)&&!this.#i.isEventThrottled(m)}#e(){if(typeof window>"u")return void this.#c();if(this.#a.length>=this.#r.maxBufferSize){this.#s&&(typeof cancelIdleCallback<"u"?cancelIdleCallback(Number(this.#s)):clearTimeout(Number(this.#s))),this.#c();return}this.#s||("requestIdleCallback"in window?this.#s=requestIdleCallback(()=>{this.#c(),this.#s=null}):this.#s=setTimeout(()=>{this.#c(),this.#s=null},0))}#c(){let m=[...this.#a];if(this.#a=[],this.#s=null,m.length===0)return;let o=m.filter(h=>h.kind==="event").map(h=>h.value),l=m.filter(h=>h.kind==="log").map(h=>h.value);o.length>0&&fetch(new URL("/v1/event",this.#r.endpoint),{headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",body:JSON.stringify({events:o})}).catch(()=>{}),l.length>0&&fetch(new URL("/v1/logs",this.#r.endpoint),{headers:{"Content-Type":"application/json"},keepalive:!0,method:"POST",body:JSON.stringify({logs:l})}).catch(()=>{})}#o(m,o){this.isDebug&&(console.groupCollapsed!==void 0?(console.groupCollapsed("[clerk/telemetry]",m),console.log(o),console.groupEnd()):console.log("[clerk/telemetry]",m,o))}#g(){let m={name:this.#n.sdk,version:this.#n.sdkVersion};if(typeof window<"u"){let o=window;if(o.Clerk){let l=o.Clerk;if(typeof l=="object"&&l!==null&&"constructor"in l&&typeof l.constructor=="function"&&l.constructor.sdkMetadata){let{name:h,version:_}=l.constructor.sdkMetadata;h!==void 0&&(m.name=h),_!==void 0&&(m.version=_)}}}return m}#f(m,o){let l=this.#g();return{event:m,cv:this.#n.clerkVersion??"",it:this.#n.instanceType??"",sdk:l.name,sdkv:l.version,...this.#n.publishableKey?{pk:this.#n.publishableKey}:{},...this.#n.secretKey?{sk:this.#n.secretKey}:{},payload:o}}#h(m){if(m==null||typeof m!="object")return null;try{let o=JSON.parse(JSON.stringify(m));return o&&typeof o=="object"&&!Array.isArray(o)?o:null}catch{return null}}};let Ao="COMPONENT_MOUNTED",oa=new Set(["SignIn","SignUp"]);function Po(m){return function(o,l,h){return{event:m,eventSamplingRate:m===Ao&&oa.has(o)?1:.1,payload:{component:o,appearanceProp:!!l?.appearance,baseTheme:!!l?.appearance?.baseTheme,elements:!!l?.appearance?.elements,variables:!!l?.appearance?.variables,...h}}}}function tr(m,o,l){return Po(Ao)(m,o,l)}function Or(m,o,l){return Po("COMPONENT_OPENED")(m,o,l)}function Co(m){return typeof m=="string"?m:typeof m=="object"&&m!==null&&"name"in m&&typeof m.name=="string"?m.name:void 0}let sa=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/;function Bi(m,o,l){return typeof m=="function"?m(o):m!==void 0?m:l!==void 0?l:void 0}let pr=(...m)=>{},Zi=!1,qt=null,Oo=!1,_n=[];function si(m,o,l,h){Zi&&(_n.push({level:m,message:o,context:l,source:h,ts:Date.now()}),_n.length>200&&_n.shift())}async function aa(m){try{if(!Zi||qt)return;let{getDebugLogger:o}=await s.e("785").then(s.bind(s,3656)),l=await o({logLevel:m?.logLevel,telemetryCollector:m?.telemetryCollector});if(l&&(qt=l)&&_n.length!==0){for(let h of _n){let _={...h.context||{},__preInit:!0,__preInitTs:h.ts};switch(h.level){case"error":qt.error(h.message,_,h.source);break;case"warn":qt.warn(h.message,_,h.source);break;case"info":qt.info(h.message,_,h.source);break;case"debug":qt.debug(h.message,_,h.source)}}_n.length=0}}catch(o){try{console.debug?.("Debug logger initialization failed",o)}catch{}return}}let Ve={debug(m,o,l){if(!qt)return void si("debug",m,o,l);qt.debug(m,o,l)},error(m,o,l){if(!qt)return void si("error",m,o,l);qt.error(m,o,l)},info(m,o,l){if(!qt)return void si("info",m,o,l);qt.info(m,o,l)},warn(m,o,l){if(!qt)return void si("warn",m,o,l);qt.warn(m,o,l)}},Wi="clerk:beforeunload",ca=["http:","https:","wails:","chrome-extension:"];function vn(m){let o=new URL(m,window.location.href);window.dispatchEvent(new CustomEvent(Wi)),window.location.href=o.href}let Uo=(m=!1)=>{if(!m)return{track:async l=>{await l()},isUnloading:()=>!1};let o=(()=>{let l=!1,h=()=>l=!0;return{startListening:()=>{window.addEventListener("beforeunload",h),window.addEventListener(Wi,h)},stopListening:()=>{window.removeEventListener("beforeunload",h),window.removeEventListener(Wi,h)},isUnloading:()=>l}})();return{track:async l=>{o.startListening(),await l(),o.stopListening()},isUnloading:o.isUnloading}},Jt=m=>({amount:m.amount,amountFormatted:m.amount_formatted,currency:m.currency,currencySymbol:m.currency_symbol}),zo=m=>{let o={grandTotal:Jt(m.grand_total),subtotal:Jt(m.subtotal),taxTotal:Jt(m.tax_total)};return"past_due"in m&&(o.pastDue=m.past_due?Jt(m.past_due):null),"credit"in m&&(o.credit=m.credit?Jt(m.credit):null),"total_due_now"in m&&(o.totalDueNow=Jt(m.total_due_now)),"total_due_after_free_trial"in m&&(o.totalDueAfterFreeTrial=m.total_due_after_free_trial?Jt(m.total_due_after_free_trial):null),o},Dn="__clerk_satellite_url",No="suffixed_cookies",ai="__clerk_synced",la=["__clerk_status","__clerk_created_session","__clerk_invitation_token","__clerk_ticket","__clerk_modal_state","__clerk_handshake","__clerk_handshake_nonce","__clerk_help",xo,ai,Dn,No];function wr(m){return new URL(window.location.href).searchParams.get(m)||null}function yn(m){let o=new URL(window.location.href);o.searchParams.has(m)&&(o.searchParams.delete(m),window.history.replaceState(window.history.state,"",o))}function Ro(m){let o=new URLSearchParams(window.location.search),l=m||new URLSearchParams;for(let h of la){let _=o.get(h);_&&l.set(h,_)}return l}let Do=(m,o)=>!!(m.isSignedIn&&o?.authConfig.singleSessionMode),sn=(m,o)=>!o?.organizationSettings.enabled,Vi=(m,o)=>!o?.commerceSettings.billing.user.enabled&&!o?.commerceSettings.billing.organization.enabled,jo=(m,o)=>!o?.apiKeysSettings?.user_api_keys_enabled,Lo=(m,o)=>!o?.apiKeysSettings?.orgs_api_keys_enabled;function qi(m,o=""){return m.errors&&!!m.errors.find(l=>l.code===o)}let ci=(function({packageName:m,customMessages:o}){let l=m;function h(b,x){if(!x)return`${l}: ${b}`;let A=b;for(let E of b.matchAll(/{{([a-zA-Z0-9-_]+)}}/g)){let T=(x[E[1]]||"").toString();A=A.replace(`{{${E[1]}}}`,T)}return`${l}: ${A}`}let _={...Ye,...o};return{setPackageName({packageName:b}){return typeof b=="string"&&(l=b),this},setMessages({customMessages:b}){return Object.assign(_,b||{}),this},throwInvalidPublishableKeyError(b){throw Error(h(_.InvalidPublishableKeyErrorMessage,b))},throwInvalidProxyUrl(b){throw Error(h(_.InvalidProxyUrlErrorMessage,b))},throwMissingPublishableKeyError(){throw Error(h(_.MissingPublishableKeyErrorMessage))},throwMissingSecretKeyError(){throw Error(h(_.MissingSecretKeyErrorMessage))},throwMissingClerkProviderError(b){throw Error(h(_.MissingClerkProvider,b))},throw(b){throw Error(h(b))}}})({packageName:"@clerk/clerk-js"});var Sf=s(4763);let If=RegExp("/{1,}","g"),Sl=(m,o={})=>{if(m==null||!m||typeof m!="object")return"";let l=new URLSearchParams;return Object.keys(m).forEach(h=>{let _=o.keyEncoder?o.keyEncoder(h):h,b=m[h];if(Array.isArray(b))b.forEach(x=>x!==void 0&&l.append(_,x||""));else{if(b===void 0)return;typeof b=="object"&&b!==null?l.append(_,JSON.stringify(b)):l.append(_,String(b??""))}}),l.toString()},Fo="http://clerk-dummy",Tf=["javascript:"],{isDevOrStagingUrl:Ef}=(function(){let m=new Map;return{isDevOrStagingUrl:o=>{if(!o)return!1;let l=typeof o=="string"?o:o.hostname,h=m.get(l);return h===void 0&&(h=Cr.some(_=>l.endsWith(_)),m.set(l,h)),h}}})(),Il=new Map;function Tl(m){return m.replace("clerk.","")}function Rt(m,o={}){let{base:l,hashPath:h,hashSearch:_,searchParams:b,hashSearchParams:x,...A}=m,E=new URL(l||"",typeof window<"u"&&window.location?window.location.href:"http://react-native-fake-base-url");if(b instanceof URLSearchParams&&b.forEach((B,K)=>{B!=null&&E.searchParams.set(on(K),B)}),Object.assign(E,A),h||_||x){var T;let B=new URL(Fo+E.hash.substring(1));for(let[G,ae]of(T=B.pathname,B.pathname=[T,h||""].filter(pe=>pe).join("/").replace(If,"/"),Object.entries((pe=>{let Q={};return new URLSearchParams(pe).forEach((he,ke)=>{if(ke in Q){let Fe=Q[ke];Array.isArray(Fe)?Fe.push(he):Q[ke]=[Fe,he]}else Q[ke]=he}),Q})(_||""))))B.searchParams.append(G,ae);if(x)for(let G of Array.isArray(x)?x:[x])(G instanceof URLSearchParams||typeof G=="object")&&new URLSearchParams(G).forEach((ae,pe)=>{ae!=null&&B.searchParams.set(on(pe),ae)});let K=B.href.replace(Fo,"");K!=="/"&&(E.hash=K)}let{stringify:N,skipOrigin:j}=o;return N?j?E.href.replace(E.origin,""):E.href:E}function ua(m){return window.location===void 0&&typeof m=="string"?m:(m=new URL(m.toString(),window.location.origin)).href.replace(m.origin,"")}let El=m=>(m||"").replace(/\/+$/,"");function Al(m,o){try{return new URL(m)}catch{return new URL(m,o)}}let Af=[/\0/,/^\/\//,/[\x00-\x1F]/],Pl=["/oauth/authorize"],Pf=["/v1/verify","/v1/tickets/accept","/oauth/authorize-with-immediate-redirect","/oauth/end_session"];function Cl(m){var o;return o=m.replace(/_/g,"/").replace(/-/g,"+"),decodeURIComponent(s.g.atob(o).split("").map(l=>"%"+("00"+l.charCodeAt(0).toString(16)).slice(-2)).join(""))}function Ux(m){let o=(m||"").split("."),[l,h,_]=o;if(o.length!==3||!l||!h||!_)throw Error("JWT could not be decoded");let b=JSON.parse(Cl(h)),x={__raw:m};return Object.keys(b).forEach(A=>{x[A]=b[A]}),{encoded:{header:l,payload:h,signature:_},header:JSON.parse(Cl(l)),claims:x}}function da(){if(!f())return null;try{let m=navigator?.language;return!m||typeof m!="string"||m.trim()===""?null:m}catch{return null}}function Kt(){return globalThis.document!==void 0}function Cf(){if(!(function(){if(!Kt())return!1;try{return window.self!==window.top}catch{return!0}})())return!1;try{return window.top?.location.href,!1}catch{return!0}}class Mo{#r=[];#i={metamask:"MetaMask",okx_wallet:"OKX Wallet"};static#n=null;constructor(){typeof window>"u"||(window.addEventListener("eip6963:announceProvider",this.#a),window.dispatchEvent(new Event("eip6963:requestProvider")))}static getInstance(){return Mo.#n||(Mo.#n=new Mo),Mo.#n}get=o=>{let l=this.#r.find(h=>h.info.name===this.#i[o])?.provider;return l!==void 0?l:window.ethereum};#a=o=>{this.#r.some(l=>l.info.uuid===o.detail.info.uuid)||this.#r.push(o.detail)}}async function pa(m){let{provider:o}=m,l=await zx(o);if(!l)return"";let h=await l.request({method:"eth_requestAccounts"});return h&&h[0]||""}async function Ol(m){let{identifier:o,nonce:l,provider:h}=m,_=await zx(h);return _?await _.request({method:"personal_sign",params:[`0x${l.split("").map(b=>b.charCodeAt(0).toString(16).padStart(2,"0")).join("")}`,o]}):""}async function Ul(){return await pa({provider:"metamask"})}async function zl(){return await pa({provider:"coinbase_wallet"})}async function Nl(){return await pa({provider:"okx_wallet"})}async function Rl(){return await pa({provider:"base"})}async function fa(m){return await Ol({...m,provider:"metamask"})}async function ha(m){return await Ol({...m,provider:"coinbase_wallet"})}async function ma(m){return await Ol({...m,provider:"okx_wallet"})}async function ga(m){return await Ol({...m,provider:"base"})}async function zx(m){if(m==="coinbase_wallet")return(await s.e("368").then(s.bind(s,9373)).then(o=>o.createCoinbaseWalletSDK))({preference:{options:"all"}}).getProvider();if(m==="base")try{return(await s.e("692").then(s.bind(s,8692)).then(o=>o.createBaseAccountSDK))({appName:typeof window<"u"&&window.Clerk?.__unstable__environment?.displayConfig?.applicationName||typeof document<"u"&&document.title||"Web3 Application"}).getProvider()}catch{return null}return Mo.getInstance().get(m)}function Of(m){let o=["redirectUrl","afterSignInUrl","afterSignUpUrl","after_sign_in_url","after_sign_up_url"],l=Object.keys(m).find(h=>o.includes(h));l&&m[l]&&At(`Clerk: The prop "${l}" is deprecated and should be replaced with the new "fallbackRedirectUrl" or "forceRedirectUrl" props instead. Learn more: https://clerk.com/docs/guides/custom-redirects#redirect-url-props`)}let Nx="environment",uO=JSON.stringify,dO=JSON.parse;class Rx{static _key(o){return`__clerk_${o}`}static isExpired(o){return!!o.exp&&Date.now()>o.exp}static setItem(o,l,h){try{let _={value:l,...h&&{exp:Date.now()+h}};window.localStorage.setItem(this._key(o),uO(_))}catch{}}static getItem(o,l){try{let h=window.localStorage.getItem(this._key(o));if(!h)return l;let _=dO(h);return _?this.isExpired(_)?(this.removeItem(o),l):_?.value??l:l}catch{return l}}static removeItem(o){try{window.localStorage.removeItem(this._key(o))}catch{}}}let Mt="ClerkJS:";function Dx(m=""){throw Error(`${Mt} Something went wrong initializing Clerk in development mode.${m&&` ${m}`}`)}function jx(m){throw Error(`${Mt} Something went wrong initializing Clerk during the ${m} flow. Please contact support.`)}function Lx(m){throw Error(`${Mt} You need to start a ${m} flow by calling ${m}.create() first.`)}function Fx(m,o){throw Error(`${Mt} Strategy "${o}" is not a valid strategy for ${m}.`)}function Dl(m){throw Error(`${Mt} You need to start a ${m} flow by calling ${m}.create({ identifier: 'your web3 wallet address' }) first`)}function jl(m=""){throw Error(`${Mt} Missing '${m}' option`)}function Mx(m,o){throw Error(`${Mt} Response: ${m||0} not supported yet.
|
|
156
|
-
For more information contact us at ${o}`)}function Uf(m){throw Error(`${Mt} Missing publicKey. When calling 'navigator.credentials.${m}()' it is required to pass a publicKey object.`)}let pO={initialDelay:125,maxDelayBetweenRetries:0,factor:2,shouldRetry:(m,o)=>o<5,retryImmediately:!1,jitter:!0},Bx=async m=>new Promise(o=>setTimeout(o,m)),Zx=(m,o)=>o?m*(1+Math.random()):m,Ll=async(m,o={})=>{var l;let h,_=0,{shouldRetry:b,initialDelay:x,maxDelayBetweenRetries:A,factor:E,retryImmediately:T,jitter:N,onBeforeRetry:j}={...pO,...o},B=(l={initialDelay:x,maxDelayBetweenRetries:A,factor:E,jitter:N},h=0,async()=>{let K;await Bx((K=Zx(K=l.initialDelay*Math.pow(l.factor,h),l.jitter),Math.min(l.maxDelayBetweenRetries||K,K))),h++});for(;;)try{return await m()}catch(K){if(!b(K,++_))throw K;j&&await j(_),T&&_===1?await Bx(Zx(100,N)):await B()}};async function fO(m="",o){let{async:l,defer:h,beforeLoad:_,crossOrigin:b,nonce:x}=o||{};return Ll(()=>new Promise((A,E)=>{m||E(Error("loadScript cannot be called without a src")),document&&document.body||E(Error("loadScript cannot be called when document does not exist"));let T=document.createElement("script");b&&T.setAttribute("crossorigin",b),T.async=l||!1,T.defer=h||!1,T.addEventListener("load",()=>{T.remove(),A(T)}),T.addEventListener("error",N=>{T.remove(),E(N.error??Error(`failed to load script: ${m}`))}),T.src=m,T.nonce=x,_?.(T),document.body.appendChild(T)}),{shouldRetry:(A,E)=>E<=5})}let Fl="clerk-captcha",zf="clerk-invisible-captcha";async function hO(m){return window.turnstile||await mO(m).catch(()=>{throw{captchaError:"captcha_script_failed_to_load"}}),window.turnstile}async function mO(m){try{return await fO("https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",{defer:!0,nonce:m})}catch(o){throw console.warn("Clerk: Failed to load the CAPTCHA script from Cloudflare. If you see a CSP error in your browser, please add the necessary CSP rules to your app. Visit https://clerk.com/docs/security/clerk-csp for more information."),o}}function Wx(m){try{let o=m.getAttribute("data-cl-theme")||void 0,l=m.getAttribute("data-cl-language")||void 0,h=m.getAttribute("data-cl-size")||void 0;return{theme:o,language:l,size:h}}catch{return{theme:void 0,language:void 0,size:void 0}}}let gO=async m=>{let o,l,h,_,{siteKey:b,widgetType:x,invisibleSiteKey:A,nonce:E}=m,{modalContainerQuerySelector:T,modalWrapperQuerySelector:N,closeModal:j,openModal:B}=m,K=await hO(E),G=[],ae="",pe="",Q=b,he=0,ke=null,Fe="invisible";if(T&&N){ke=x,_=T,Fe="modal";try{await B?.()}catch{throw{captchaError:"modal_component_not_ready"}}let Oe=await new Promise(Te=>{if(document.querySelector(T))return Te(document.querySelector(T));let qe=new MutationObserver(()=>{document.querySelector(T)&&(qe.disconnect(),Te(document.querySelector(T)))});qe.observe(document.body,{childList:!0,subtree:!0})});if(Oe){let{theme:Te,language:qe,size:Je}=Wx(Oe);o=Te,h=qe,l=Je}}if(!_&&x==="smart"){let Oe=document.getElementById(Fl);if(Oe){Fe="smart",ke="smart",_=`#${Fl}`,Oe.style.maxHeight="0";let{theme:Te,language:qe,size:Je}=Wx(Oe);o=Te,h=qe,l=Je}else console.error("Cannot initialize Smart CAPTCHA widget because the `clerk-captcha` DOM element was not found; falling back to Invisible CAPTCHA widget. If you are using a custom flow, visit https://clerk.com/docs/guides/development/custom-flows/bot-sign-up-protection for instructions")}if(!_){Fe="invisible",Q=A,ke="invisible",_=`.${zf}`;let Oe=document.createElement("div");Oe.classList.add(zf),Oe.style.display="none",document.body.appendChild(Oe)}let ft=async()=>new Promise((Oe,Te)=>{try{let qe=K.render(_,{sitekey:Q,appearance:"interaction-only",theme:o||"auto",size:l||"normal",language:h||"auto",action:m.action,retry:"never","refresh-expired":"auto",callback:function(Je){j?.(),Oe([Je,qe])},"before-interactive-callback":()=>{if(N){let Je=document.querySelector(N);Je?.style.setProperty("visibility","visible"),Je?.style.setProperty("pointer-events","all")}else{let Je=document.getElementById(Fl);Je&&(Je.style.maxHeight="unset",Je.style.minHeight=l==="compact"?"140px":"68px",Je.style.marginBottom="1.5rem")}},"error-callback":function(Je){var We;if(G.push(Je),he<2&&(We=Je.toString(),["crashed","undefined_error","102","103","104","106","110600","300","600"].find(vt=>We.startsWith(vt))))return void setTimeout(()=>{K.reset(qe),he++},250);Te([G.join(","),qe])},"unsupported-callback":function(){return Te(["This browser is not supported by the CAPTCHA.",qe]),!0}})}catch(qe){Te([qe,void 0])}});try{[ae,pe]=await ft(),K.remove(pe)}catch([Oe,Te]){throw Te&&K.remove(Te),{captchaError:Oe}}finally{if(Fe==="modal"&&j?.(),Fe==="invisible"){let Oe=document.querySelector(`.${zf}`);Oe&&document.body.removeChild(Oe)}if(Fe==="smart"){let Oe=document.getElementById(Fl);Oe&&(Oe.style.maxHeight="0",Oe.style.minHeight="unset",Oe.style.marginBottom="unset")}}return{captchaToken:ae,captchaWidgetType:ke}},Vx=m=>gO(m),qx=m=>{let o=m.__unstable__environment,l=o?o.displayConfig.captchaProvider:"turnstile",h=m.__internal_getOption?.("nonce");return{captchaSiteKey:o?o.displayConfig.captchaPublicKey:null,captchaWidgetType:o?o.displayConfig.captchaWidgetType:null,captchaProvider:l,captchaPublicKeyInvisible:o?o.displayConfig.captchaPublicKeyInvisible:null,canUseCaptcha:o?o.userSettings.signUp.captcha_enabled&&m.isStandardBrowser:null,nonce:h||void 0}};class Ml{clerk;constructor(o){this.clerk=o}async invisible(o){let{captchaSiteKey:l,canUseCaptcha:h,captchaPublicKeyInvisible:_,nonce:b}=qx(this.clerk);return h&&l&&_?{...await Vx({action:o?.action,captchaProvider:"turnstile",invisibleSiteKey:_,nonce:o?.nonce||b||void 0,siteKey:_,widgetType:"invisible"}).catch(x=>x.captchaError?{captchaError:x.captchaError}:{captchaError:x?.message||x||"unexpected_captcha_error"}),captchaAction:o?.action}:{captchaError:"captcha_unavailable",captchaAction:o?.action}}async managedOrInvisible(o){let{captchaSiteKey:l,canUseCaptcha:h,captchaWidgetType:_,captchaProvider:b,captchaPublicKeyInvisible:x,nonce:A}=qx(this.clerk);if(h&&l&&x){let E=await Vx({captchaProvider:b,invisibleSiteKey:x,nonce:A||void 0,siteKey:l,widgetType:_,...o}).catch(T=>T.captchaError?{captchaError:T.captchaError}:o?.action==="verify"?{captchaError:T?.message||T||"unexpected_captcha_error"}:void 0);return o?.action==="verify"?{...E,captchaAction:"verify"}:E}return o?.action==="verify"?{captchaError:"captcha_unavailable",captchaAction:o?.action}:{}}async managedInModal(o){return this.managedOrInvisible({modalWrapperQuerySelector:"#cl-modal-captcha-wrapper",modalContainerQuerySelector:"#cl-modal-captcha-container",openModal:()=>this.clerk.__internal_openBlankCaptchaModal(),closeModal:()=>this.clerk.__internal_closeBlankCaptchaModal(),action:o?.action})}}class Bo{client;CaptchaChallengeImpl;static instance;inflightException=null;captchaRetryCount=0;MAX_RETRY_ATTEMPTS=3;static getInstance(){return Bo.instance||(Bo.instance=new Bo(Bt,Ml)),Bo.instance}constructor(o,l){this.client=o,this.CaptchaChallengeImpl=l}async execute(o,l){if(this.captchaAttemptsExceeded())throw new ye("Security verification failed. Please try again by refreshing the page, clearing your browser cookies, or using a different web browser.",{code:"captcha_client_attempts_exceeded"});try{return this.inflightException&&await this.inflightException,await l()}catch(h){let _;if(!Ce(h)||ve(h)&&h.code==="network_error"||h.errors[0]?.code!=="requires_captcha")throw h;if(this.inflightException)return await this.inflightException,await l();this.inflightException=new Promise(b=>_=b);try{let b=await this.managedChallenge(o);b?.captchaError!=="modal_component_not_ready"&&(await this.client.getOrCreateInstance().__internal_sendCaptchaToken(b),this.captchaRetryCount=0)}catch(b){throw this.captchaRetryCount++,b}finally{_(),this.inflightException=null}return await l()}}managedChallenge(o){return new this.CaptchaChallengeImpl(o).managedInModal({action:"verify"})}captchaAttemptsExceeded=()=>this.captchaRetryCount>=this.MAX_RETRY_ATTEMPTS}class J{static clerk;id;pathRoot="";static get fapiClient(){return J.clerk.getFapiClient()}async reload(o){let{rotatingTokenNonce:l}=o||{};return this._baseGet({forceUpdateClient:!0,rotatingTokenNonce:l})}isNew(){return!this.id}static async _fetch(o,l={}){return Bo.getInstance().execute(this.clerk,()=>this._baseFetch(o,l))}static async _baseFetch(o,l={}){let h;J.fapiClient||(function(){throw Error(`${Mt} Missing FAPI client in resources.`)})();let{fetchMaxTries:_}=l;try{h=await J.fapiClient.request(o,{fetchMaxTries:_})}catch(T){if(this.shouldRethrowOfflineNetworkErrors())throw new ye(T?.message||T,{code:"network_error"});if(!I())return Ve.warn("Network request failed while offline, returning null",{method:o.method,path:o.path},"baseResource"),null;throw T}let{payload:b,status:x,statusText:A,headers:E}=h;if(E){let T=E.get("x-country");this.clerk.__internal_setCountry(T?T.toLowerCase():null)}if((o.method!=="GET"||l.forceUpdateClient)&&this._updateClient(b),x>=200&&x<=299)return b;if(x>=400){let T=b?.errors,N=T?.[0]?.long_message,j=T?.[0]?.code;x===401&&j!=="requires_captcha"&&await J.clerk.handleUnauthenticated(),(function(K,G){var ae;if(!G||!G[0])return;let pe=G[0],Q=pe.long_message;if(pe.code==="origin_invalid"&&((ae=J.clerk.publishableKey).startsWith("live_")||ae.startsWith("pk_live_"))){let he=J.clerk.frontendApi.replace("clerk.","");throw new Ke(`Clerk: Production Keys are only allowed for domain "${he}".
|
|
157
|
-
API Error: ${Q}`,{data:G,status:K})}})(x,T);let B={data:T,status:x};if(x===429&&E){let K=E.get("retry-after");if(K){let G=parseInt(K,10);isNaN(G)||(B.retryAfter=G)}}throw new Ke(N||A,B)}return null}static _updateClient(o){if(!o)return;let l=o.client||o.meta?.client;l&&J.clerk&&J.clerk.updateClient(Bt.getOrCreateInstance().fromJSON(l))}path(o){let l=this.pathRoot;if(this.isNew())return l;let h=l.replace(/[^/]$/,"$&/")+encodeURIComponent(this.id);return o?h.replace(/[^/]$/,"$&/")+encodeURIComponent(o):h}withDefault(o,l){return o??l}async _baseGet(o={}){let l=await J._fetch({method:"GET",path:this.path(),rotatingTokenNonce:o.rotatingTokenNonce},o);return this.fromJSON(l?.response||l)}async _baseMutate(o){let{action:l,body:h,method:_,path:b}=o,x=await J._fetch({method:_,path:b||this.path(l),body:h});return this.fromJSON(x?.response||x)}async _baseMutateBypass(o){let{action:l,body:h,method:_,path:b}=o,x=await J._baseFetch({method:_,path:b||this.path(l),body:h});return this.fromJSON(x?.response||x)}async _basePost(o={}){return this._baseMutate({...o,method:"POST"})}async _basePostBypass(o={}){return this._baseMutateBypass({...o,method:"POST"})}async _basePut(o={}){return this._baseMutate({...o,method:"PUT"})}async _basePatch(o={}){return this._baseMutate({...o,method:"PATCH"})}async _baseDelete(o={}){await this._baseMutate({...o,method:"DELETE"})}static shouldRethrowOfflineNetworkErrors(){return J.clerk?.__internal_getOption?.("experimental")?.rethrowOfflineNetworkErrors||!1}}let li={enabled:!1,first_factors:[],name:"phone_number",required:!1,second_factors:[],used_for_first_factor:!1,used_for_second_factor:!1,verifications:[],verify_at_sign_up:!1};class Jx extends J{id=void 0;actions={create_organization:!1,delete_self:!1};attributes={email_address:{enabled:!0,first_factors:["email_code"],name:"email_address",required:!0,second_factors:[],used_for_first_factor:!0,used_for_second_factor:!1,verifications:["email_code"],verify_at_sign_up:!0},phone_number:{...li,name:"phone_number"},username:{...li,name:"username"},web3_wallet:{...li,name:"web3_wallet"},first_name:{...li,name:"first_name"},last_name:{...li,name:"last_name"},password:{enabled:!0,first_factors:[],name:"password",required:!0,second_factors:[],used_for_first_factor:!1,used_for_second_factor:!1,verifications:[],verify_at_sign_up:!1},authenticator_app:{...li,name:"authenticator_app"},backup_code:{...li,name:"backup_code"},passkey:{...li,name:"passkey"}};enterpriseSSO={enabled:!1};passkeySettings={allow_autofill:!1,show_sign_in_button:!1};passwordSettings={};saml={enabled:!1};signIn={second_factor:{required:!1,enabled:!1}};signUp={allowlist_only:!1,captcha_enabled:!1,legal_consent_enabled:!1,mode:"public",progressive:!0};social={};usernameSettings={};get authenticatableSocialStrategies(){return this.social?Object.entries(this.social).filter(([,o])=>o.enabled&&o.authenticatable).map(([,o])=>o.strategy).sort():[]}get enabledFirstFactorIdentifiers(){return this.attributes?Object.entries(this.attributes).filter(([o,l])=>l.used_for_first_factor&&!o.startsWith("web3")).map(([o])=>o):[]}get socialProviderStrategies(){return this.social?Object.entries(this.social).filter(([,o])=>o.enabled).map(([,o])=>o.strategy).sort():[]}get web3FirstFactors(){return this.attributes?Object.entries(this.attributes).filter(([o,l])=>l.used_for_first_factor&&o.startsWith("web3")).map(([,o])=>o.first_factors).flat():[]}get alternativePhoneCodeChannels(){return this.attributes?Object.entries(this.attributes).filter(([o,l])=>l.used_for_first_factor&&o==="phone_number").map(([,o])=>o?.channels?.filter(l=>l!=="sms")||[]).flat():[]}constructor(o=null){super(),this.fromJSON(o)}get instanceIsPasswordBased(){return!!(this.attributes?.password?.enabled&&this.attributes.password?.required)}get hasValidAuthFactor(){return!!(this.attributes?.email_address?.enabled||this.attributes?.phone_number?.enabled||this.attributes.password?.required&&this.attributes.username?.required)}fromJSON(o){return o&&(this.attributes=this.withDefault(o.attributes?Object.fromEntries(Object.entries(o.attributes).map(l=>[l[0],{...l[1],name:l[0]}])):null,this.attributes),this.actions=this.withDefault(o.actions,this.actions),this.enterpriseSSO=this.withDefault(o.enterprise_sso,this.enterpriseSSO),this.passkeySettings=this.withDefault(o.passkey_settings,this.passkeySettings),this.passwordSettings=o.password_settings?{...o.password_settings,min_length:Math.max(o.password_settings?.min_length??8,8),max_length:o.password_settings?.max_length===0?72:Math.min(o.password_settings?.max_length??72,72)}:this.passwordSettings,this.saml=this.withDefault(o.saml,this.saml),this.signIn=this.withDefault(o.sign_in,this.signIn),this.signUp=this.withDefault(o.sign_up,this.signUp),this.social=this.withDefault(o.social,this.social),this.usernameSettings=o.username_settings?{...o.username_settings,min_length:Math.max(o.username_settings?.min_length??4,4),max_length:Math.min(o.username_settings?.max_length??64,64)}:this.usernameSettings),this}__internal_toSnapshot(){return{actions:this.actions,attributes:this.attributes,passkey_settings:this.passkeySettings,password_settings:this.passwordSettings,saml:this.saml,sign_in:this.signIn,sign_up:this.signUp,social:this.social}}}class Kx extends J{billing={stripePublishableKey:null,organization:{enabled:!1,hasPaidPlans:!1},user:{enabled:!1,hasPaidPlans:!1}};constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.billing.stripePublishableKey=o.billing.stripe_publishable_key,this.billing.organization.enabled=o.billing.organization.enabled,this.billing.organization.hasPaidPlans=o.billing.organization.has_paid_plans,this.billing.user.enabled=o.billing.user.enabled,this.billing.user.hasPaidPlans=o.billing.user.has_paid_plans),this}__internal_toSnapshot(){return{billing:{stripe_publishable_key:this.billing.stripePublishableKey,organization:{enabled:this.billing.organization.enabled,has_paid_plans:this.billing.organization.hasPaidPlans},user:{enabled:this.billing.user.enabled,has_paid_plans:this.billing.user.hasPaidPlans}}}}}function de(m){let o=new Date(m||new Date);return o instanceof Date&&!isNaN(o.getTime())?o:new Date}class Gx extends J{claimedAt=null;reverification=!1;singleSessionMode=!1;preferredChannels=null;constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.claimedAt=this.withDefault(o.claimed_at?de(o.claimed_at):null,this.claimedAt),this.reverification=this.withDefault(o.reverification,this.reverification),this.singleSessionMode=this.withDefault(o.single_session_mode,this.singleSessionMode),this.preferredChannels=this.withDefault(o.preferred_channels,this.preferredChannels)),this}__internal_toSnapshot(){return{claimed_at:this.claimedAt?this.claimedAt.getTime():null,id:this.id??"",object:"auth_config",reverification:this.reverification,single_session_mode:this.singleSessionMode}}}let Bl={build:(m,o,l)=>[m,o,l].filter(Boolean).join("-"),parse:(m,o,l)=>{let h=Bl.extractTemplate(m,o,l);return{organizationId:l,sessionId:o,template:h}},extractTemplate:(m,o,l)=>{if(m===o||l&&m===`${o}-${l}`)return;let h=m.slice(o.length+1);return l&&h.endsWith(`-${l}`)&&(h=h.slice(0,-(l.length+1))),h||void 0}},_O="clerk",vO=10,Hx={broadcast:!0};class Zl{prefix;data;static fromKey(o){let[l,h,_=""]=o.split("::");return new Zl(l,{audience:_,tokenId:h})}constructor(o,l){this.prefix=o,this.data=l,this.prefix=o,this.data=l}toKey(){let{tokenId:o,audience:l}=this.data;return[this.prefix,o,l||""].join("::")}}let jn=((m=_O)=>{let o=new Map,l=Math.random().toString(36).slice(2),h=null;return{clear:()=>{o.forEach(_=>{_.timeoutId!==void 0&&clearTimeout(_.timeoutId)}),o.clear()},close:()=>{h&&(h.close(),h=null)},get:(_,b=vO)=>{let x=new Zl(m,_),A=o.get(x.toKey());if(!A)return;let E=Math.floor(Date.now()/1e3)-A.createdAt;if(A.expiresIn-E<(b||1)+5){A.timeoutId!==void 0&&clearTimeout(A.timeoutId),o.delete(x.toKey());return}return A.entry},set:_=>{((b,x=Hx)=>{let A=new Zl(m,{audience:b.audience,tokenId:b.tokenId}).toKey(),E=Math.floor(Date.now()/1e3),T={createdAt:b.createdAt??E,entry:b,expiresIn:void 0},N=()=>{let j=o.get(A);j===T&&(j.timeoutId!==void 0&&clearTimeout(j.timeoutId),o.delete(A))};b.tokenResolver.then(j=>{let B=j.jwt?.claims;if(!B||typeof B.exp!="number"||typeof B.iat!="number")return N();let K=B.exp-B.iat;T.expiresIn=K;let G=setTimeout(N,1e3*K);T.timeoutId=G,typeof G.unref=="function"&&G.unref();let ae=h;if(ae&&x.broadcast){let pe=j.getRawString();if(pe&&B.sid){let Q=B.sid,he=B.org_id||B.o?.id,ke=Bl.extractTemplate(b.tokenId,Q,he),Fe=Bl.build(Q,ke,he);if(b.tokenId===Fe){let ft=`bc_${Date.now()}_${Math.random().toString(36).substring(2,11)}`;Ve.info("Broadcasting token update to other tabs",{organizationId:he,sessionId:Q,tabId:l,template:ke,tokenId:b.tokenId,traceId:ft},"tokenCache");let Oe={organizationId:he,sessionId:Q,template:ke,tokenId:b.tokenId,tokenRaw:pe,traceId:ft};ae.postMessage(Oe)}}}}).catch(()=>{N()}),o.set(A,T)})(_,Hx)},size:()=>o.size}})();class Bt extends J{static instance;pathRoot="/client";sessions=[];signUp=new wt;signIn=new _t;lastActiveSessionId=null;captchaBypass=!1;cookieExpiresAt=null;lastAuthenticationStrategy=null;createdAt=null;updatedAt=null;static getOrCreateInstance(o=null){return Bt.instance||(Bt.instance=new Bt(o)),Bt.instance}static clearInstance(){Bt.instance=null}static isClientResource(o){return!!o&&o instanceof Bt}constructor(o=null){super(),this.fromJSON(o)}get signUpAttempt(){return this.signUp}get signInAttempt(){return this.signIn}get activeSessions(){return this.sessions.filter(o=>o.status==="active")}get signedInSessions(){return this.sessions.filter(o=>o.status==="active"||o.status==="pending")}create(){return this._basePut()}fetch({fetchMaxTries:o}={}){return this._baseGet({fetchMaxTries:o})}async destroy(){return this._baseDelete({path:"/client"}).then(()=>{jn.clear(),this.id="",this.sessions=[],this.signUp=new wt(null),this.signIn=new _t(null),this.lastActiveSessionId=null,this.lastAuthenticationStrategy=null,this.cookieExpiresAt=null,this.createdAt=null,this.updatedAt=null})}removeSessions(){return this._baseDelete({path:this.path()+"/sessions"}).then(o=>(jn.clear(),o))}clearCache(){return this.sessions.forEach(o=>o.clearCache())}isEligibleForTouch(){return!!this.cookieExpiresAt&&this.cookieExpiresAt.getTime()-Date.now()<=6912e5}buildTouchUrl({redirectUrl:o}){return J.fapiClient.buildUrl({method:"GET",path:"/client/touch",pathPrefix:"v1",search:{redirect_url:o.toString()}}).toString()}__internal_sendCaptchaToken(o){return this._basePostBypass({body:o,path:this.path()+"/verify"})}fromJSON(o){return o&&(this.id=o.id,this.sessions=(o.sessions||[]).map(l=>new Ki(l)),this.signUp=new wt(o.sign_up),this.signIn=new _t(o.sign_in),this.lastActiveSessionId=o.last_active_session_id,this.captchaBypass=o.captcha_bypass||!1,this.cookieExpiresAt=o.cookie_expires_at?de(o.cookie_expires_at):null,this.lastAuthenticationStrategy=o.last_authentication_strategy||null,this.createdAt=de(o.created_at||void 0),this.updatedAt=de(o.updated_at||void 0)),this}__internal_toSnapshot(){return{object:"client",id:this.id||"",sessions:this.sessions.map(o=>o.__internal_toSnapshot()),sign_up:this.signUp.__internal_toSnapshot(),sign_in:this.signIn.__internal_toSnapshot(),last_active_session_id:this.lastActiveSessionId,captcha_bypass:this.captchaBypass,cookie_expires_at:this.cookieExpiresAt?this.cookieExpiresAt.getTime():null,last_authentication_strategy:this.lastAuthenticationStrategy??null,created_at:this.createdAt?.getTime()??null,updated_at:this.updatedAt?.getTime()??null}}path(){return this.pathRoot}}function Ur(m){let{pageSize:o,initialPage:l,...h}=m||{},_=o??10;return new URLSearchParams({...Object.entries(h).reduce((b,[x,A])=>(A!==void 0&&(b[x]=A),b),{}),limit:_+"",offset:((l??1)-1)*_+""})}class Gt{static#r="/billing";static path(o,l){let{orgId:h}=l||{};return`${h?`/organizations/${h}`:"/me"}${Gt.#r}${o}`}getPlans=async o=>{let{for:l,...h}=o||{},_={...h,payer_type:l==="organization"?"org":"user"};return await J._fetch({path:`${Gt.#r}/plans`,method:"GET",search:Ur(_)}).then(b=>{let{data:x,total_count:A}=b;return{total_count:A,data:x.map(E=>new Vl(E))}})};getPlan=async o=>new Vl(await J._fetch({path:`${Gt.#r}/plans/${o.id}`,method:"GET"}));getSubscription=async o=>await J._fetch({path:Gt.path("/subscription",{orgId:o.orgId}),method:"GET"}).then(l=>new $O(l?.response));getStatements=async o=>{let{orgId:l,...h}=o;return await J._fetch({path:Gt.path("/statements",{orgId:l}),method:"GET",search:Ur(h)}).then(_=>{let{data:b,total_count:x}=_?.response;return{total_count:x,data:b.map(A=>new Xx(A))}})};getStatement=async o=>new Xx((await J._fetch({path:Gt.path(`/statements/${o.id}`,{orgId:o.orgId}),method:"GET"}))?.response);getPaymentAttempts=async o=>{let{orgId:l,...h}=o;return await J._fetch({path:Gt.path("/payment_attempts",{orgId:l}),method:"GET",search:Ur(h)}).then(_=>{let{data:b,total_count:x}=_;return{total_count:x,data:b.map(A=>new Nf(A))}})};getPaymentAttempt=async o=>new Nf(await J._fetch({path:Gt.path(`/payment_attempts/${o.id}`,{orgId:o.orgId}),method:"GET"}));startCheckout=async o=>{let{orgId:l,...h}=o;return new bO((await J._fetch({path:Gt.path("/checkouts",{orgId:l}),method:"POST",body:h}))?.response)}}class yO extends J{id;createdAt;updatedAt;imageUrl;userId=null;email;firstName;lastName;organizationId=null;organizationName;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,o.created_at&&(this.createdAt=de(o.created_at)),o.updated_at&&(this.updatedAt=de(o.updated_at)),this.imageUrl=o.image_url,this.userId=o.user_id,this.email=o.email,this.firstName=o.first_name,this.lastName=o.last_name,this.organizationId=o.organization_id,this.organizationName=o.organization_name),this}}class bO extends J{id;externalClientSecret;externalGatewayId;paymentMethod;plan;planPeriod;planPeriodStart;status;totals;isImmediatePlanChange;freeTrialEndsAt;payer;needsPaymentMethod;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.externalClientSecret=o.external_client_secret,this.externalGatewayId=o.external_gateway_id,this.paymentMethod=o.payment_method?new Wl(o.payment_method):void 0,this.plan=new Vl(o.plan),this.planPeriod=o.plan_period,this.planPeriodStart=o.plan_period_start,this.status=o.status,this.totals=zo(o.totals),this.isImmediatePlanChange=o.is_immediate_plan_change,o.free_trial_ends_at&&(this.freeTrialEndsAt=de(o.free_trial_ends_at)),this.payer=new yO(o.payer),this.needsPaymentMethod=o.needs_payment_method),this}confirm=o=>Ll(()=>this._basePatch({path:Gt.path(`/checkouts/${this.id}/confirm`,{orgId:this.payer.organizationId}),body:o}),{factor:1.1,maxDelayBetweenRetries:2e3,initialDelay:2e3,jitter:!1,shouldRetry(l,h){if(!Ce(l)||h>=4)return!1;let _=l?.status,b=_===409&&l.errors?.[0]?.code==="checkout_already_in_progress";return _>=500||b}})}class xO extends J{id;name;description=null;slug;avatarUrl=null;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.description=o.description,this.slug=o.slug,this.avatarUrl=o.avatar_url),this}}class Xx extends J{id;status;timestamp;totals;groups;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.timestamp=de(o.timestamp),this.totals=zo(o.totals),this.groups=o.groups.map(l=>new wO(l))),this}}class wO{id;timestamp;items;constructor(o){this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.timestamp=de(o.timestamp),this.items=o.items.map(l=>new Nf(l))),this}}class Nf extends J{id;amount;failedAt=null;paidAt=null;updatedAt;paymentMethod=null;subscriptionItem;chargeType;status;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.amount=Jt(o.amount),this.paidAt=o.paid_at?de(o.paid_at):null,this.failedAt=o.failed_at?de(o.failed_at):null,this.updatedAt=de(o.updated_at),this.paymentMethod=o.payment_method?new Wl(o.payment_method):null,this.subscriptionItem=new tw(o.subscription_item),this.chargeType=o.charge_type,this.status=o.status),this}}let Rf="/payment_methods",Yx=async m=>{let{orgId:o,...l}=m;return new kO((await J._fetch({path:Gt.path(`${Rf}/initialize`,{orgId:o}),method:"POST",body:l}))?.response)},Qx=async m=>{let{orgId:o,...l}=m;return new Wl((await J._fetch({path:Gt.path(Rf,{orgId:o}),method:"POST",body:l}))?.response)},ew=async m=>{let{orgId:o,...l}=m??{};return await J._fetch({path:Gt.path(Rf,{orgId:o}),method:"GET",search:Ur(l)}).then(h=>{let{data:_,total_count:b}=h?.response;return{total_count:b,data:_.map(x=>new Wl(x))}})};class Wl extends J{id;last4=null;paymentType;cardType=null;isDefault;isRemovable;status;walletType;expiryYear;expiryMonth;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.last4=o.last4,this.paymentType=o.payment_type,this.cardType=o.card_type,this.isDefault=o.is_default,this.isRemovable=o.is_removable,this.status=o.status,this.walletType=o.wallet_type,this.expiryYear=o.expiry_year,this.expiryMonth=o.expiry_month,this.createdAt=o.created_at==null?o.created_at:de(o.created_at),this.updatedAt=o.updated_at==null?o.updated_at:de(o.updated_at)),this}async remove(o){let{orgId:l}=o??{};return new _a((await J._fetch({path:Gt.path(`/payment_methods/${this.id}`,{orgId:l}),method:"DELETE"}))?.response)}async makeDefault(o){let{orgId:l}=o??{};return await J._fetch({path:Gt.path("/payers/default_payment_method",{orgId:l}),method:"PUT",body:{payment_method_id:this.id}}),null}}class kO extends J{externalClientSecret;externalGatewayId;paymentMethodOrder;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.externalClientSecret=o.external_client_secret,this.externalGatewayId=o.external_gateway_id,this.paymentMethodOrder=o.payment_method_order??["card"]),this}}class Vl extends J{id;name;fee;annualFee=null;annualMonthlyFee=null;description=null;isDefault;isRecurring;hasBaseFee;forPayerType;publiclyVisible;slug;avatarUrl=null;features;freeTrialDays;freeTrialEnabled;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.fee=Jt(o.fee),this.annualFee=o.annual_fee?Jt(o.annual_fee):null,this.annualMonthlyFee=o.annual_monthly_fee?Jt(o.annual_monthly_fee):null,this.description=o.description,this.isDefault=o.is_default,this.isRecurring=o.is_recurring,this.hasBaseFee=o.has_base_fee,this.forPayerType=o.for_payer_type,this.publiclyVisible=o.publicly_visible,this.slug=o.slug,this.avatarUrl=o.avatar_url,this.freeTrialDays=this.withDefault(o.free_trial_days,null),this.freeTrialEnabled=this.withDefault(o.free_trial_enabled,!1),this.features=(o.features||[]).map(l=>new xO(l))),this}}class $O extends J{id;status;activeAt;createdAt;pastDueAt;updatedAt;nextPayment;subscriptionItems;eligibleForFreeTrial;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.createdAt=de(o.created_at),this.updatedAt=o.updated_at?de(o.updated_at):null,this.activeAt=de(o.active_at),this.pastDueAt=o.past_due_at?de(o.past_due_at):null,o.next_payment&&(this.nextPayment={amount:Jt(o.next_payment.amount),date:de(o.next_payment.date)}),this.subscriptionItems=(o.subscription_items||[]).map(l=>new tw(l)),this.eligibleForFreeTrial=this.withDefault(o.eligible_for_free_trial,!1)),this}}class tw extends J{id;plan;planPeriod;status;createdAt;periodStart;periodEnd;canceledAt;pastDueAt;amount;credit;isFreeTrial;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.plan=new Vl(o.plan),this.planPeriod=o.plan_period,this.status=o.status,this.createdAt=de(o.created_at),this.pastDueAt=o.past_due_at?de(o.past_due_at):null,this.periodStart=de(o.period_start),this.periodEnd=o.period_end?de(o.period_end):null,this.canceledAt=o.canceled_at?de(o.canceled_at):null,this.amount=o.amount?Jt(o.amount):void 0,this.credit=o.credit&&o.credit.amount?{amount:Jt(o.credit.amount)}:void 0,this.isFreeTrial=this.withDefault(o.is_free_trial,!1)),this}async cancel(o){let{orgId:l}=o;return new _a((await J._fetch({path:Gt.path(`/subscription_items/${this.id}`,{orgId:l}),method:"DELETE"}))?.response)}}class _a{object="";id;slug;deleted=!1;constructor(o){this.fromJSON(o)}fromJSON(o){return o&&(this.object=o.object,this.id=o.id,this.slug=o.slug,this.deleted=o.deleted),this}}class rw extends J{afterCreateOrganizationUrl="";afterJoinWaitlistUrl="";afterLeaveOrganizationUrl="";afterSignInUrl="";afterSignOutAllUrl="";afterSignOutOneUrl="";afterSignOutUrl="";afterSignUpUrl="";afterSwitchSessionUrl="";applicationName="";backendHost="";branded=!1;captchaHeartbeat=!1;captchaHeartbeatIntervalMs;captchaOauthBypass=["oauth_google","oauth_microsoft","oauth_apple"];captchaProvider="turnstile";captchaPublicKey=null;captchaPublicKeyInvisible=null;captchaWidgetType=null;clerkJSVersion;createOrganizationUrl="";experimental__forceOauthFirst;faviconImageUrl="";googleOneTapClientId;homeUrl="";id="";instanceEnvironmentType="";logoImageUrl="";organizationProfileUrl="";preferredSignInStrategy="password";privacyPolicyUrl="";showDevModeWarning=!1;signInUrl="";signUpUrl="";supportEmail="";termsUrl="";theme={};userProfileUrl="";waitlistUrl="";constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.afterCreateOrganizationUrl=this.withDefault(o.after_create_organization_url,this.afterCreateOrganizationUrl),this.afterJoinWaitlistUrl=this.withDefault(o.after_join_waitlist_url,this.afterJoinWaitlistUrl),this.afterLeaveOrganizationUrl=this.withDefault(o.after_leave_organization_url,this.afterLeaveOrganizationUrl),this.afterSignInUrl=this.withDefault(o.after_sign_in_url,this.afterSignInUrl),this.afterSignOutAllUrl=this.withDefault(o.after_sign_out_all_url,this.afterSignOutAllUrl),this.afterSignOutOneUrl=this.withDefault(o.after_sign_out_one_url,this.afterSignOutOneUrl),this.afterSignUpUrl=this.withDefault(o.after_sign_up_url,this.afterSignUpUrl),this.afterSwitchSessionUrl=this.withDefault(o.after_switch_session_url,this.afterSwitchSessionUrl),this.applicationName=this.withDefault(o.application_name,this.applicationName),this.branded=this.withDefault(o.branded,this.branded),this.captchaHeartbeat=this.withDefault(o.captcha_heartbeat,this.captchaHeartbeat),this.captchaHeartbeatIntervalMs=this.withDefault(o.captcha_heartbeat_interval_ms,this.captchaHeartbeatIntervalMs),this.captchaOauthBypass=this.withDefault(o.captcha_oauth_bypass,this.captchaOauthBypass),this.captchaProvider=this.withDefault(o.captcha_provider,this.captchaProvider),this.captchaPublicKey=this.withDefault(o.captcha_public_key,this.captchaPublicKey),this.captchaPublicKeyInvisible=this.withDefault(o.captcha_public_key_invisible,this.captchaPublicKeyInvisible),this.captchaWidgetType=this.withDefault(o.captcha_widget_type,this.captchaWidgetType),this.clerkJSVersion=this.withDefault(o.clerk_js_version,this.clerkJSVersion),this.createOrganizationUrl=this.withDefault(o.create_organization_url,this.createOrganizationUrl),this.faviconImageUrl=this.withDefault(o.favicon_image_url,this.faviconImageUrl),this.googleOneTapClientId=this.withDefault(o.google_one_tap_client_id,this.googleOneTapClientId),this.homeUrl=this.withDefault(o.home_url,this.homeUrl),this.id=this.withDefault(o.id,this.id),this.instanceEnvironmentType=this.withDefault(o.instance_environment_type,this.instanceEnvironmentType),this.logoImageUrl=this.withDefault(o.logo_image_url,this.logoImageUrl),this.organizationProfileUrl=this.withDefault(o.organization_profile_url,this.organizationProfileUrl),this.preferredSignInStrategy=this.withDefault(o.preferred_sign_in_strategy,this.preferredSignInStrategy),this.privacyPolicyUrl=this.withDefault(o.privacy_policy_url,this.privacyPolicyUrl),this.showDevModeWarning=this.withDefault(o.show_devmode_warning,this.showDevModeWarning),this.signInUrl=this.withDefault(o.sign_in_url,this.signInUrl),this.signUpUrl=this.withDefault(o.sign_up_url,this.signUpUrl),this.supportEmail=this.withDefault(o.support_email,this.supportEmail),this.termsUrl=this.withDefault(o.terms_url,this.termsUrl),this.theme=this.withDefault(o.theme,this.theme),this.userProfileUrl=this.withDefault(o.user_profile_url,this.userProfileUrl),this.waitlistUrl=this.withDefault(o.waitlist_url,this.waitlistUrl)),this}__internal_toSnapshot(){return{object:"display_config",after_create_organization_url:this.afterCreateOrganizationUrl,after_join_waitlist_url:this.afterJoinWaitlistUrl,after_leave_organization_url:this.afterLeaveOrganizationUrl,after_sign_in_url:this.afterSignInUrl,after_sign_out_all_url:this.afterSignOutAllUrl,after_sign_out_one_url:this.afterSignOutOneUrl,after_sign_up_url:this.afterSignUpUrl,after_switch_session_url:this.afterSwitchSessionUrl,application_name:this.applicationName,branded:this.branded,captcha_heartbeat_interval_ms:this.captchaHeartbeatIntervalMs,captcha_heartbeat:this.captchaHeartbeat,captcha_oauth_bypass:this.captchaOauthBypass,captcha_provider:this.captchaProvider,captcha_public_key_invisible:this.captchaPublicKeyInvisible,captcha_public_key:this.captchaPublicKey,captcha_widget_type:this.captchaWidgetType,clerk_js_version:this.clerkJSVersion,create_organization_url:this.createOrganizationUrl,favicon_image_url:this.faviconImageUrl,google_one_tap_client_id:this.googleOneTapClientId,home_url:this.homeUrl,id:this.id,instance_environment_type:this.instanceEnvironmentType,logo_image_url:this.logoImageUrl,organization_profile_url:this.organizationProfileUrl,preferred_sign_in_strategy:this.preferredSignInStrategy,privacy_policy_url:this.privacyPolicyUrl,show_devmode_warning:this.showDevModeWarning,sign_in_url:this.signInUrl,sign_up_url:this.signUpUrl,support_email:this.supportEmail,terms_url:this.termsUrl,theme:this.theme,user_profile_url:this.userProfileUrl,waitlist_url:this.waitlistUrl}}}var nw=`const respond=r=>{self.postMessage(r)},workerToTabIds={};self.addEventListener("message",r=>{const e=r.data;switch(e.type){case"setTimeout":workerToTabIds[e.id]=setTimeout(()=>{respond({id:e.id}),delete workerToTabIds[e.id]},e.ms);break;case"clearTimeout":workerToTabIds[e.id]&&(clearTimeout(workerToTabIds[e.id]),delete workerToTabIds[e.id]);break;case"setInterval":workerToTabIds[e.id]=setInterval(()=>{respond({id:e.id})},e.ms);break;case"clearInterval":workerToTabIds[e.id]&&(clearInterval(workerToTabIds[e.id]),delete workerToTabIds[e.id]);break}});
|
|
158
|
-
`;let iw=(m,o={})=>{if(typeof Worker>"u")return null;try{let l=new Blob([m],{type:"application/javascript; charset=utf-8"}),h=globalThis.URL.createObjectURL(l);return new Worker(h,o)}catch{return console.warn("Clerk: Cannot create worker from blob. Consider adding worker-src blob:; to your CSP"),null}},Df=()=>{let m=0,o=()=>m++,l=new Map,h=(A,E)=>A?.postMessage(E),_=A=>{l.get(A.data.id)?.()},b=iw(nw,{name:"clerk-timers"});if(b?.addEventListener("message",_),!b)return{setTimeout:globalThis.setTimeout.bind(globalThis),setInterval:globalThis.setInterval.bind(globalThis),clearTimeout:globalThis.clearTimeout.bind(globalThis),clearInterval:globalThis.clearInterval.bind(globalThis),cleanup:pr};let x=()=>{b||(b=iw(nw,{name:"clerk-timers"}),b?.addEventListener("message",_))};return{setTimeout:(A,E)=>{x();let T=o();return l.set(T,()=>{A(),l.delete(T)}),h(b,{type:"setTimeout",id:T,ms:E}),T},setInterval:(A,E)=>{x();let T=o();return l.set(T,A),h(b,{type:"setInterval",id:T,ms:E}),T},clearTimeout:A=>{x(),l.delete(A),h(b,{type:"clearTimeout",id:A})},clearInterval:A=>{x(),l.delete(A),h(b,{type:"clearInterval",id:A})},cleanup:()=>{b&&(b.terminate(),b=null,l.clear())}}};function va({delayInMs:m}={delayInMs:1e3}){let o,l=Df(),h=!1,_=()=>{o&&(l.clearTimeout(o),l.cleanup()),h=!0},b=async x=>{h=!1,await x(_),h||(o=l.setTimeout(()=>{b(x)},m))};return{run:b,stop:_}}class jf extends J{id;emailAddress="";matchesSsoConnection=!1;linkedTo=[];verification;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}create(){return this._basePost({body:{email_address:this.emailAddress}})}prepareVerification=o=>this._basePost({action:"prepare_verification",body:{...o}});attemptVerification=o=>{let{code:l}=o||{};return this._basePost({action:"attempt_verification",body:{code:l}})};createEmailLinkFlow=()=>{let{run:o,stop:l}=va();return{startEmailLinkFlow:async({redirectUrl:h})=>(await this.prepareVerification({strategy:"email_link",redirectUrl:h}),new Promise((_,b)=>{o(()=>this.reload().then(x=>{x.verification.status==="verified"&&(l(),_(x))}).catch(x=>{l(),b(x)}))})),cancelEmailLinkFlow:l}};createEnterpriseSSOLinkFlow=()=>{let{run:o,stop:l}=va();return{startEnterpriseSSOLinkFlow:async({redirectUrl:h})=>{if(!(await this.prepareVerification({strategy:"enterprise_sso",redirectUrl:h})).verification.externalVerificationRedirectURL)throw Error("Unexpected: External verification redirect URL is missing");return new Promise((_,b)=>{o(()=>this.reload().then(x=>{x.verification.status==="verified"&&(l(),_(x))}).catch(x=>{l(),b(x)}))})},cancelEnterpriseSSOLinkFlow:l}};destroy=()=>this._baseDelete();toString=()=>this.emailAddress;fromJSON(o){return o&&(this.id=o.id,this.emailAddress=o.email_address,this.verification=new Ht(o.verification),this.matchesSsoConnection=o.matches_sso_connection,this.linkedTo=(o.linked_to||[]).map(l=>new fw(l))),this}__internal_toSnapshot(){return{object:"email_address",id:this.id,email_address:this.emailAddress,verification:this.verification.__internal_toSnapshot(),linked_to:this.linkedTo.map(o=>o.__internal_toSnapshot()),matches_sso_connection:this.matchesSsoConnection}}}let Zo="token:update",ya="user:signOut",ow="environment:update",sw="session:tokenResolved",xt=Z();class aw extends J{user_api_keys_enabled=!1;orgs_api_keys_enabled=!1;constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.user_api_keys_enabled=o.user_api_keys_enabled,this.orgs_api_keys_enabled=o.orgs_api_keys_enabled),this}__internal_toSnapshot(){return{user_api_keys_enabled:this.user_api_keys_enabled,orgs_api_keys_enabled:this.orgs_api_keys_enabled}}}class cw extends J{actions={adminDelete:!1};domains={enabled:!1,enrollmentModes:[],defaultRole:null};slug={disabled:!1};enabled=!1;maxAllowedMemberships=1;forceOrganizationSelection;constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(o.actions&&(this.actions.adminDelete=this.withDefault(o.actions.admin_delete,this.actions.adminDelete)),o.domains&&(this.domains.enabled=this.withDefault(o.domains.enabled,this.domains.enabled),this.domains.enrollmentModes=this.withDefault(o.domains.enrollment_modes,this.domains.enrollmentModes),this.domains.defaultRole=this.withDefault(o.domains.default_role,this.domains.defaultRole)),o.slug&&(this.slug.disabled=this.withDefault(o.slug.disabled,this.slug.disabled)),this.enabled=this.withDefault(o.enabled,this.enabled),this.maxAllowedMemberships=this.withDefault(o.max_allowed_memberships,this.maxAllowedMemberships),this.forceOrganizationSelection=this.withDefault(o.force_organization_selection,this.forceOrganizationSelection)),this}__internal_toSnapshot(){return{actions:{admin_delete:this.actions.adminDelete},domains:{enabled:this.domains.enabled,enrollment_modes:this.domains.enrollmentModes,default_role:this.domains.defaultRole},enabled:this.enabled,max_allowed_memberships:this.maxAllowedMemberships}}}class Zr extends J{static instance;authConfig=new Gx;displayConfig=new rw;maintenanceMode=!1;clientDebugMode=!1;pathRoot="/environment";userSettings=new Jx;organizationSettings=new cw;commerceSettings=new Kx;apiKeysSettings=new aw;protectConfig=new _w;static getInstance(){return Zr.instance||(Zr.instance=new Zr),Zr.instance}constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.authConfig=new Gx(o.auth_config),this.displayConfig=new rw(o.display_config),this.maintenanceMode=this.withDefault(o.maintenance_mode,this.maintenanceMode),this.clientDebugMode=this.withDefault(o.client_debug_mode,this.clientDebugMode),this.organizationSettings=new cw(o.organization_settings),this.userSettings=new Jx(o.user_settings),this.commerceSettings=new Kx(o.commerce_settings),this.apiKeysSettings=new aw(o.api_keys_settings),this.protectConfig=new _w(o.protect_config)),this}fetch({touch:o,fetchMaxTries:l}={touch:!1}){return(o?this._basePatch({}):this._baseGet({fetchMaxTries:l})).then(h=>(xt.emit(ow,null),h))}isDevelopmentOrStaging=()=>!this.isProduction();isProduction=()=>this.displayConfig.instanceEnvironmentType==="production";isSingleSession=()=>this.authConfig.singleSessionMode;onWindowLocationHost=()=>this.displayConfig.backendHost===window.location.host;__internal_toSnapshot(){return{object:"environment",auth_config:this.authConfig.__internal_toSnapshot(),display_config:this.displayConfig.__internal_toSnapshot(),id:this.id??"",maintenance_mode:this.maintenanceMode,client_debug_mode:this.clientDebugMode,organization_settings:this.organizationSettings.__internal_toSnapshot(),user_settings:this.userSettings.__internal_toSnapshot(),commerce_settings:this.commerceSettings.__internal_toSnapshot(),api_keys_settings:this.apiKeysSettings.__internal_toSnapshot(),protect_config:this.protectConfig.__internal_toSnapshot()}}}class ql{static encode(o){return btoa(String.fromCharCode(...new Uint8Array(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static decode(o){let l=atob(o.replace(/-/g,"+").replace(/_/g,"/")),h=l.length,_=new Uint8Array(h);for(let b=0;b<h;b++)_[b]=l.charCodeAt(b);return _.buffer}}async function SO(m){try{let l=await navigator.credentials.create({publicKey:m});return l?{publicKeyCredential:l,error:null}:{error:new tt("Browser failed to create credential",{code:"passkey_registration_failed"}),publicKeyCredential:null}}catch(l){var o;return{error:(o=l).name==="InvalidStateError"?new tt(o.message,{code:"passkey_already_exists"}):o.name==="NotAllowedError"?new tt(o.message,{code:"passkey_registration_cancelled"}):lw(o),publicKeyCredential:null}}}let IO=new class{controller;__abort(){if(!this.controller)return;let m=Error();m.name="AbortError",this.controller.abort(m)}createAbortSignal(){this.__abort();let m=new AbortController;return this.controller=m,m.signal}abort(){this.__abort(),this.controller=void 0}};async function Lf({publicKeyOptions:m,conditionalUI:o}){try{let h=await navigator.credentials.get({publicKey:m,mediation:o?"conditional":"optional",signal:IO.createAbortSignal()});return h?{publicKeyCredential:h,error:null}:{error:new tt("Browser failed to get credential",{code:"passkey_retrieval_failed"}),publicKeyCredential:null}}catch(h){var l;return{error:(l=h).name==="NotAllowedError"?new tt(l.message,{code:"passkey_retrieval_cancelled"}):lw(l),publicKeyCredential:null}}}function lw(m){return m.name==="AbortError"?new tt(m.message,{code:"passkey_operation_aborted"}):m.name==="SecurityError"?new tt(m.message,{code:"passkey_invalid_rpID_or_domain"}):m}function Ff(m){let o=ba(m.challenge),l=(m.allowCredentials||[]).map(h=>({...h,id:ba(h.id)}));return{...m,allowCredentials:l,challenge:o}}function uw(m){return{type:m.type,id:m.id,rawId:Ji(m.rawId),authenticatorAttachment:m.authenticatorAttachment}}function Mf(m){let o=m.response;return{...uw(m),response:{clientDataJSON:Ji(o.clientDataJSON),authenticatorData:Ji(o.authenticatorData),signature:Ji(o.signature),userHandle:o.userHandle?Ji(o.userHandle):null}}}let Ji=ql.encode.bind(ql),ba=ql.decode.bind(ql);class Ht extends J{pathRoot="";status=null;strategy=null;nonce=null;message=null;externalVerificationRedirectURL=null;attempts=null;expireAt=null;error=null;verifiedAtClient=null;channel;constructor(o){super(),this.fromJSON(o)}verifiedFromTheSameClient=()=>this.verifiedAtClient===J.clerk?.client?.id;fromJSON(o){return o&&(this.status=o.status,this.verifiedAtClient=o.verified_at_client,this.strategy=o.strategy,this.nonce=o.nonce||null,this.message=o.message||null,o.external_verification_redirect_url?this.externalVerificationRedirectURL=new URL(o.external_verification_redirect_url):this.externalVerificationRedirectURL=null,this.attempts=o.attempts,this.expireAt=de(o.expire_at||void 0),this.error=o.error?new Y(o.error):null,this.channel=o.channel||void 0),this}__internal_toSnapshot(){var o;return{object:"verification",id:this.id||"",status:this.status,strategy:this.strategy,nonce:this.nonce,message:this.message,external_verification_redirect_url:this.externalVerificationRedirectURL?.toString()||null,attempts:this.attempts,expire_at:this.expireAt?.getTime()||null,error:(o=this.error,{code:o?.code||"",message:o?.message||"",long_message:o?.longMessage,meta:{param_name:o?.meta?.paramName,session_id:o?.meta?.sessionId,email_addresses:o?.meta?.emailAddresses,identifiers:o?.meta?.identifiers,zxcvbn:o?.meta?.zxcvbn,plan:o?.meta?.plan,is_plan_upgrade_possible:o?.meta?.isPlanUpgradePossible}}),verified_at_client:this.verifiedAtClient}}}class TO extends Ht{publicKey=null;constructor(o){super(o),this.fromJSON(o)}fromJSON(o){return super.fromJSON(o),o?.nonce&&(this.publicKey=(function(l){let h=ba(l.user.id),_=ba(l.challenge),b=(l.excludeCredentials||[]).map(x=>({...x,id:ba(x.id)}));return{...l,excludeCredentials:b,challenge:_,user:{...l.user,id:h}}})(JSON.parse(o.nonce))),this}}class dw{emailAddress;phoneNumber;web3Wallet;externalAccount;constructor(o){o?(this.emailAddress=new Wo(o.email_address),this.phoneNumber=new Wo(o.phone_number),this.web3Wallet=new Wo(o.web3_wallet),this.externalAccount=new Ht(o.external_account)):(this.emailAddress=new Wo(null),this.phoneNumber=new Wo(null),this.web3Wallet=new Wo(null),this.externalAccount=new Ht(null))}__internal_toSnapshot(){return{email_address:this.emailAddress.__internal_toSnapshot(),phone_number:this.phoneNumber.__internal_toSnapshot(),web3_wallet:this.web3Wallet.__internal_toSnapshot(),external_account:this.externalAccount.__internal_toSnapshot()}}}class Wo extends Ht{nextAction;supportedStrategies;constructor(o){super(o),o?(this.nextAction=o.next_action,this.supportedStrategies=o.supported_strategies):(this.nextAction="",this.supportedStrategies=[])}__internal_toSnapshot(){return{...super.__internal_toSnapshot(),next_action:this.nextAction,supported_strategies:this.supportedStrategies}}}class pw extends J{id;identificationId;provider;providerUserId="";emailAddress="";approvedScopes="";firstName="";lastName="";imageUrl="";username="";phoneNumber="";publicMetadata={};label="";verification=null;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}reauthorize=o=>{let{additionalScopes:l,redirectUrl:h}=o||{};return this._basePatch({action:"reauthorize",body:{additional_scope:l,redirect_url:h}})};destroy=()=>this._baseDelete();fromJSON(o){return o&&(this.id=o.id,this.identificationId=o.identification_id,this.providerUserId=o.provider_user_id,this.approvedScopes=o.approved_scopes,this.imageUrl=o.image_url,this.emailAddress=o.email_address,this.firstName=o.first_name,this.lastName=o.last_name,this.provider=(o.provider||"").replace("oauth_",""),this.username=o.username,this.phoneNumber=o.phone_number,this.publicMetadata=o.public_metadata,this.label=o.label,o.verification&&(this.verification=new Ht(o.verification))),this}__internal_toSnapshot(){return{object:"external_account",id:this.id,identification_id:this.identificationId,provider:this.provider,provider_user_id:this.providerUserId,email_address:this.emailAddress,approved_scopes:this.approvedScopes,first_name:this.firstName,last_name:this.lastName,image_url:this.imageUrl,username:this.username,phone_number:this.phoneNumber,public_metadata:this.publicMetadata,label:this.label,verification:this.verification?.__internal_toSnapshot()||null}}providerSlug(){return this.provider}providerTitle(){return[(function(o){let l=o||"";return l.charAt(0).toUpperCase()+l.slice(1)})(this.providerSlug()),"Account"].join(" ")}accountIdentifier(){return this.username||this.emailAddress||this.label}}class EO extends J{id;protocol;provider;providerUserId=null;active;emailAddress="";firstName="";lastName="";publicMetadata={};verification=null;enterpriseConnection=null;lastAuthenticatedAt=null;enterpriseConnectionId=null;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.provider=o.provider,this.protocol=o.protocol,this.providerUserId=o.provider_user_id,this.active=o.active,this.emailAddress=o.email_address,this.firstName=o.first_name,this.lastName=o.last_name,this.publicMetadata=o.public_metadata,this.lastAuthenticatedAt=o.last_authenticated_at?de(o.last_authenticated_at):null,this.enterpriseConnectionId=o.enterprise_connection_id,o.verification&&(this.verification=new Ht(o.verification)),o.enterprise_connection&&(this.enterpriseConnection=new AO(o.enterprise_connection))),this}__internal_toSnapshot(){return{object:"enterprise_account",id:this.id,provider:this.provider,protocol:this.protocol,provider_user_id:this.providerUserId,active:this.active,email_address:this.emailAddress,first_name:this.firstName,last_name:this.lastName,public_metadata:this.publicMetadata,verification:this.verification?.__internal_toSnapshot()||null,enterprise_connection:this.enterpriseConnection?.__internal_toSnapshot()||null,last_authenticated_at:this.lastAuthenticatedAt?this.lastAuthenticatedAt.getTime():null,enterprise_connection_id:this.enterpriseConnectionId}}}class AO extends J{id;active;allowIdpInitiated;allowSubdomains;disableAdditionalIdentifications;domain;logoPublicUrl="";name;protocol;provider;syncUserAttributes;createdAt;updatedAt;enterpriseConnectionId="";constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.domain=o.domain,this.active=o.active,this.provider=o.provider,this.logoPublicUrl=o.logo_public_url,this.syncUserAttributes=o.sync_user_attributes,this.allowSubdomains=o.allow_subdomains,this.allowIdpInitiated=o.allow_idp_initiated,this.disableAdditionalIdentifications=o.disable_additional_identifications,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at),this.enterpriseConnectionId=o.enterprise_connection_id),this}__internal_toSnapshot(){return{object:"enterprise_account_connection",id:this.id,name:this.name,domain:this.domain,active:this.active,protocol:this.protocol,provider:this.provider,logo_public_url:this.logoPublicUrl,sync_user_attributes:this.syncUserAttributes,allow_subdomains:this.allowSubdomains,allow_idp_initiated:this.allowIdpInitiated,disable_additional_identifications:this.disableAdditionalIdentifications,enterprise_connection_id:this.enterpriseConnectionId,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}}class fw extends J{id;type;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.type=o.type),this}__internal_toSnapshot(){return{object:"identification_link",id:this.id,type:this.type}}}class xa extends J{id;name=null;publicUrl=null;static async create(o,l={}){let h,_=l;return typeof l.file=="string"?(_=l.file,h=new Headers({"Content-Type":"application/octet-stream"})):l.file&&(_=new FormData).append("file",l.file),new xa((await J._fetch({path:o,method:"POST",body:_,headers:h}))?.response)}static async delete(o){return new xa((await J._fetch({path:o,method:"DELETE"}))?.response)}constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.publicUrl=o.public_url),this}}class Bf extends J{id;phoneNumber="";reservedForSecondFactor=!1;defaultSecondFactor=!1;linkedTo=[];verification;backupCodes;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}create=()=>this._basePost({body:{phone_number:this.phoneNumber}});prepareVerification=()=>this._basePost({action:"prepare_verification",body:{strategy:"phone_code"}});attemptVerification=o=>{let{code:l}=o||{};return this._basePost({action:"attempt_verification",body:{code:l}})};setReservedForSecondFactor=o=>{let{reserved:l}=o||{};return this._basePatch({body:{reserved_for_second_factor:l}})};makeDefaultSecondFactor=()=>this._basePatch({body:{default_second_factor:!0}});destroy=()=>this._baseDelete();toString=()=>{let o=this.phoneNumber.match(/^(\d{3})(\d{3})(\d{4})$/);return o?"("+o[1]+") "+o[2]+"-"+o[3]:this.phoneNumber};fromJSON(o){return o&&(this.id=o.id,this.phoneNumber=o.phone_number,this.reservedForSecondFactor=o.reserved_for_second_factor,this.defaultSecondFactor=o.default_second_factor,this.verification=new Ht(o.verification),this.linkedTo=(o.linked_to||[]).map(l=>new fw(l)),this.backupCodes=o.backup_codes),this}__internal_toSnapshot(){return{object:"phone_number",id:this.id||"",phone_number:this.phoneNumber,reserved_for_second_factor:this.reservedForSecondFactor,default_second_factor:this.defaultSecondFactor,verification:this.verification.__internal_toSnapshot(),linked_to:this.linkedTo.map(o=>o.__internal_toSnapshot()),backup_codes:this.backupCodes}}}class wa extends J{id;name;organizationId;enrollmentMode;verification;affiliationEmailAddress;createdAt;updatedAt;totalPendingInvitations;totalPendingSuggestions;constructor(o){super(),this.fromJSON(o)}static async create(o,{name:l}){return new wa((await J._fetch({path:`/organizations/${o}/domains`,method:"POST",body:{name:l}}))?.response)}prepareAffiliationVerification=async o=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/prepare_affiliation_verification`,method:"POST",body:o});attemptAffiliationVerification=async o=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/attempt_affiliation_verification`,method:"POST",body:o});updateEnrollmentMode=o=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/update_enrollment_mode`,body:o});delete=()=>this._baseDelete({path:`/organizations/${this.organizationId}/domains/${this.id}`});fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.organizationId=o.organization_id,this.enrollmentMode=o.enrollment_mode,this.affiliationEmailAddress=o.affiliation_email_address,this.totalPendingSuggestions=o.total_pending_suggestions,this.totalPendingInvitations=o.total_pending_invitations,o.verification?this.verification={status:o.verification.status,strategy:o.verification.strategy,attempts:o.verification.attempts,expiresAt:de(o.verification.expires_at)}:this.verification=null),this}}class PO extends J{id;organizationId;status;publicUserData;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}accept=async()=>await this._basePost({path:`/organizations/${this.organizationId}/membership_requests/${this.id}/accept`});reject=async()=>await this._basePost({path:`/organizations/${this.organizationId}/membership_requests/${this.id}/reject`});fromJSON(o){return o&&(this.id=o.id,this.organizationId=o.organization_id,this.status=o.status,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at),o.public_user_data&&(this.publicUserData=new Vf(o.public_user_data))),this}}class CO extends J{id;key;name;description;type;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.key=o.key,this.name=o.name,this.description=o.description,this.type=o.type,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}}class OO extends J{id;key;name;description;permissions=[];createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.key=o.key,this.name=o.name,this.description=o.description,this.permissions=o.permissions.map(l=>new CO(l)),this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}}class ui extends J{pathRoot="/organizations";id;name;slug;imageUrl;hasImage;publicMetadata={};adminDeleteEnabled;createdAt;updatedAt;membersCount=0;pendingInvitationsCount=0;maxAllowedMemberships;constructor(o){super(),this.fromJSON(o)}static async create(o){return new ui((await J._fetch({path:"/organizations",method:"POST",body:o}))?.response)}static async get(o){return new ui((await J._fetch({path:`/organizations/${o}`,method:"GET"}))?.response)}update=async o=>this._basePatch({body:o});getRoles=async o=>await J._fetch({path:`/organizations/${this.id}/roles`,method:"GET",search:Ur(o)},{forceUpdateClient:!0}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new OO(b))}});getDomains=async o=>await J._fetch({path:`/organizations/${this.id}/domains`,method:"GET",search:Ur(o)},{forceUpdateClient:!0}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new wa(b))}});getDomain=async({domainId:o})=>new wa((await J._fetch({path:`/organizations/${this.id}/domains/${o}`,method:"GET"}))?.response);getMembershipRequests=async o=>await J._fetch({path:`/organizations/${this.id}/membership_requests`,method:"GET",search:Ur(o)}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new PO(b))}});createDomain=async o=>wa.create(this.id,{name:o});getMemberships=async o=>await J._fetch({path:`/organizations/${this.id}/memberships`,method:"GET",search:Ur({...o,paginated:!0})}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new di(b))}});getInvitations=async o=>await J._fetch({path:`/organizations/${this.id}/invitations`,method:"GET",search:Ur(o)},{forceUpdateClient:!0}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new Vo(b))}});addMember=async({userId:o,role:l})=>await J._fetch({method:"POST",path:`/organizations/${this.id}/memberships`,body:{userId:o,role:l}}).then(h=>new di(h?.response));inviteMember=async o=>Vo.create(this.id,o);inviteMembers=async o=>Vo.createBulk(this.id,o);updateMember=async({userId:o,role:l})=>await J._fetch({method:"PATCH",path:`/organizations/${this.id}/memberships/${o}`,body:{role:l}}).then(h=>new di(h?.response));removeMember=async o=>await J._fetch({method:"DELETE",path:`/organizations/${this.id}/memberships/${o}`}).then(l=>new di(l?.response));destroy=async()=>this._baseDelete();setLogo=async({file:o})=>{let l,h;return o===null?await J._fetch({path:`/organizations/${this.id}/logo`,method:"DELETE"}).then(_=>new ui(_?.response)):(typeof o=="string"?(l=o,h=new Headers({"Content-Type":"application/octet-stream"})):(l=new FormData).append("file",o),await J._fetch({path:`/organizations/${this.id}/logo`,method:"PUT",body:l,headers:h}).then(_=>new ui(_?.response)))};initializePaymentMethod=o=>Yx({...o,orgId:this.id});addPaymentMethod=o=>Qx({...o,orgId:this.id});getPaymentMethods=o=>ew({...o,orgId:this.id});fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.slug=o.slug,this.imageUrl=o.image_url||"",this.hasImage=o.has_image||!1,this.publicMetadata=o.public_metadata||{},this.membersCount=o.members_count||0,this.pendingInvitationsCount=o.pending_invitations_count||0,this.maxAllowedMemberships=o.max_allowed_memberships||0,this.adminDeleteEnabled=o.admin_delete_enabled||!1,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}__internal_toSnapshot(){return{object:"organization",id:this.id,name:this.name,slug:this.slug,image_url:this.imageUrl,has_image:this.hasImage,public_metadata:this.publicMetadata,members_count:this.membersCount,pending_invitations_count:this.pendingInvitationsCount,max_allowed_memberships:this.maxAllowedMemberships,admin_delete_enabled:this.adminDeleteEnabled,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}async reload(o){let{rotatingTokenNonce:l}=o||{},h=(await J._fetch({path:`/organizations/${this.id}`,method:"GET",rotatingTokenNonce:l},{forceUpdateClient:!0}))?.response;return this.fromJSON(h)}}class Vo extends J{id;emailAddress;organizationId;publicMetadata={};status;role;roleName;createdAt;updatedAt;static async create(o,{emailAddress:l,role:h}){return new Vo((await J._fetch({path:`/organizations/${o}/invitations`,method:"POST",body:{email_address:l,role:h}}))?.response)}static async createBulk(o,l){let{emailAddresses:h,role:_}=l;return((await J._fetch({path:`/organizations/${o}/invitations/bulk`,method:"POST",body:{email_address:h,role:_}}))?.response).map(b=>new Vo(b))}constructor(o){super(),this.fromJSON(o)}revoke=async()=>await this._basePost({path:`/organizations/${this.organizationId}/invitations/${this.id}/revoke`});fromJSON(o){return o&&(this.id=o.id,this.emailAddress=o.email_address,this.organizationId=o.organization_id,this.publicMetadata=o.public_metadata,this.role=o.role,this.roleName=o.role_name,this.status=o.status,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}}class di extends J{id;publicMetadata={};publicUserData;organization;permissions=[];role;roleName;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}static retrieve=async o=>await J._fetch({path:"/me/organization_memberships",method:"GET",search:Ur({...o,paginated:!0})}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new di(b))}});destroy=async()=>await this._baseDelete({path:`/organizations/${this.organization.id}/memberships/${this.publicUserData?.userId}`});update=async({role:o})=>await this._basePatch({path:`/organizations/${this.organization.id}/memberships/${this.publicUserData?.userId}`,body:{role:o}});fromJSON(o){return o&&(this.id=o.id,this.organization=new ui(o.organization),this.publicMetadata=o.public_metadata||{},o.public_user_data&&(this.publicUserData=new Vf(o.public_user_data)),this.permissions=Array.isArray(o.permissions)?[...o.permissions]:[],this.role=o.role,this.roleName=o.role_name,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}__internal_toSnapshot(){return{object:"organization_membership",id:this.id,organization:this.organization.__internal_toSnapshot(),public_metadata:this.publicMetadata,public_user_data:this.publicUserData?.__internal_toSnapshot(),permissions:this.permissions,role:this.role,role_name:this.roleName,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}reload(o){throw Error(`${Mt} Calling OrganizationMembership.reload is not currently supported. Please contact support.`)}}class Zf extends J{id;publicOrganizationData;status;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}static async retrieve(o){return await J._fetch({path:"/me/organization_suggestions",method:"GET",search:Ur(o)}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new Zf(b))}})}accept=async()=>await this._basePost({path:`/me/organization_suggestions/${this.id}/accept`});fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.publicOrganizationData={hasImage:o.public_organization_data.has_image,imageUrl:o.public_organization_data.image_url,name:o.public_organization_data.name,id:o.public_organization_data.id,slug:o.public_organization_data.slug},this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}}class UO extends J{id;provider="saml_custom";providerUserId=null;active=!1;emailAddress="";firstName="";lastName="";verification=null;samlConnection=null;lastAuthenticatedAt=null;enterpriseConnectionId=null;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.provider=o.provider,this.providerUserId=o.provider_user_id,this.active=o.active,this.emailAddress=o.email_address,this.firstName=o.first_name,this.lastName=o.last_name,this.enterpriseConnectionId=o.enterprise_connection_id,o.verification&&(this.verification=new Ht(o.verification)),o.saml_connection&&(this.samlConnection=new zO(o.saml_connection)),this.lastAuthenticatedAt=o.last_authenticated_at?de(o.last_authenticated_at):null),this}__internal_toSnapshot(){return{object:"saml_account",id:this.id,provider:this.provider,provider_user_id:this.providerUserId,active:this.active,email_address:this.emailAddress,first_name:this.firstName,last_name:this.lastName,verification:this.verification?.__internal_toSnapshot()||null,saml_connection:this.samlConnection?.__internal_toSnapshot(),enterprise_connection_id:this.enterpriseConnectionId,last_authenticated_at:this.lastAuthenticatedAt?this.lastAuthenticatedAt.getTime():null}}}class zO extends J{id;name;domain;active;provider;syncUserAttributes;allowSubdomains;allowIdpInitiated;disableAdditionalIdentifications;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.domain=o.domain,this.active=o.active,this.provider=o.provider,this.syncUserAttributes=o.sync_user_attributes,this.allowSubdomains=o.allow_subdomains,this.allowIdpInitiated=o.allow_idp_initiated,this.disableAdditionalIdentifications=o.disable_additional_identifications,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}__internal_toSnapshot(){return{object:"saml_account_connection",id:this.id,name:this.name,domain:this.domain,active:this.active,provider:this.provider,sync_user_attributes:this.syncUserAttributes,allow_subdomains:this.allowSubdomains,allow_idp_initiated:this.allowIdpInitiated,disable_additional_identifications:this.disableAdditionalIdentifications,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}}let NO={strict_mfa:{afterMinutes:10,level:"multi_factor"},strict:{afterMinutes:10,level:"second_factor"},moderate:{afterMinutes:60,level:"second_factor"},lax:{afterMinutes:1440,level:"second_factor"}},RO=new Set(["first_factor","second_factor","multi_factor"]),DO=new Set(["strict_mfa","strict","moderate","lax"]),Wf=m=>m.replace(/^(org:)*/,"org:"),hw=(m,o)=>{let{org:l,user:h}=mw(m),[_,b]=o.split(":"),x=b||_;return _==="org"?l.includes(x):_==="user"?h.includes(x):[...l,...h].includes(x)},mw=m=>{let o=m?m.split(",").map(l=>l.trim()):[];return{org:o.filter(l=>l.split(":")[0].includes("o")).map(l=>l.split(":")[1]),user:o.filter(l=>l.split(":")[0].includes("u")).map(l=>l.split(":")[1])}};function ka(){return y()&&typeof window.PublicKeyCredential=="function"}async function gw(){try{return ka()&&await window.PublicKeyCredential.isConditionalMediationAvailable()}catch{return!1}}async function jO(){try{return typeof window<"u"&&await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable()}catch{return!1}}class $a extends J{status;level;session;supportedFirstFactors=[];supportedSecondFactors=[];firstFactorVerification=new Ht(null);secondFactorVerification=new Ht(null);constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.session=new Ki(o.session),this.level=o.level,this.supportedFirstFactors=oi(o.supported_first_factors),this.supportedSecondFactors=oi(o.supported_second_factors),this.firstFactorVerification=new Ht(o.first_factor_verification),this.secondFactorVerification=new Ht(o.second_factor_verification)),this}}class Ki extends J{pathRoot="/client/sessions";id;status;lastActiveAt;lastActiveToken;lastActiveOrganizationId;actor;user;publicUserData;factorVerificationAge=null;tasks=null;expireAt;abandonAt;createdAt;updatedAt;static isSessionResource(o){return!!o&&o instanceof Ki}constructor(o){super(),this.fromJSON(o),this.#r(this.lastActiveToken)}end=()=>(jn.clear(),this._basePost({action:"end"}));remove=()=>(jn.clear(),this._basePost({action:"remove"}));touch=()=>this._basePost({action:"touch",body:{active_organization_id:this.lastActiveOrganizationId}}).then(o=>(o.lastActiveToken&&xt.emit(Zo,{token:o.lastActiveToken}),o));clearCache=()=>jn.clear();getToken=async o=>Ll(()=>this._getToken(o),{factor:1.55,initialDelay:3e3,maxDelayBetweenRetries:5e4,jitter:!1,shouldRetry:(l,h)=>!ce(l)&&h<=8});checkAuthorization=o=>{let l=(this.user?.organizationMemberships||[]).find(h=>h.organization.id===this.lastActiveOrganizationId);return(h=>_=>{if(!h.userId)return!1;let b=((E,T)=>{let{features:N,plans:j}=T;return E.feature&&N?hw(N,E.feature):E.plan&&j?hw(j,E.plan):null})(_,h),x=((E,T)=>{let{orgId:N,orgRole:j,orgPermissions:B}=T;return(E.role||E.permission)&&N&&j&&B?E.permission?B.includes(Wf(E.permission)):E.role?Wf(j)===Wf(E.role):null:null})(_,h),A=((E,{factorVerificationAge:T})=>{if(!E.reverification||!T)return null;let N=(Q=>{let he,ke;if(!Q)return!1;let Fe=typeof Q=="string"&&DO.has(Q),ft=typeof Q=="object"&&(he=Q.level,RO.has(he))&&typeof(ke=Q.afterMinutes)=="number"&&ke>0;return(!!Fe||!!ft)&&(Oe=>typeof Oe=="string"?NO[Oe]:Oe).bind(null,Q)})(E.reverification);if(!N)return null;let{level:j,afterMinutes:B}=N(),[K,G]=T,ae=K!==-1?B>K:null,pe=G!==-1?B>G:null;switch(j){case"first_factor":return ae;case"second_factor":return G!==-1?pe:ae;case"multi_factor":return G===-1?ae:ae&&pe}})(_,h);return[b||x,A].some(E=>E===null)?[b||x,A].some(E=>E===!0):[b||x,A].every(E=>E===!0)})({userId:this.user?.id,factorVerificationAge:this.factorVerificationAge,orgId:l?.id,orgRole:l?.role,orgPermissions:l?.permissions,features:this.lastActiveToken?.jwt?.claims.fea||"",plans:this.lastActiveToken?.jwt?.claims.pla||""})(o)};#r=o=>{if(!o)return;let l=this.#i();jn.get({tokenId:l})||jn.set({tokenId:l,tokenResolver:Promise.resolve(o)})};#i(o,l){let h=l===void 0?this.lastActiveOrganizationId:l;return Bl.build(this.id,o,h)}startVerification=async({level:o})=>new $a((await J._fetch({method:"POST",path:`/client/sessions/${this.id}/verify`,body:{level:o}}))?.response);prepareFirstFactorVerification=async o=>{let l;switch(o.strategy){case"email_code":l={emailAddressId:o.emailAddressId};break;case"phone_code":l={phoneNumberId:o.phoneNumberId,default:o.default};break;case"passkey":l={};break;case"enterprise_sso":l={emailAddressId:o.emailAddressId,enterpriseConnectionId:o.enterpriseConnectionId,redirectUrl:o.redirectUrl};break;default:Fx("Session.prepareFirstFactorVerification",o.strategy)}return new $a((await J._fetch({method:"POST",path:`/client/sessions/${this.id}/verify/prepare_first_factor`,body:{...l,strategy:o.strategy}}))?.response)};attemptFirstFactorVerification=async o=>{let l;return l=o.strategy==="passkey"?{publicKeyCredential:JSON.stringify(Mf(o.publicKeyCredential))}:{...o},new $a((await J._fetch({method:"POST",path:`/client/sessions/${this.id}/verify/attempt_first_factor`,body:{...l,strategy:o.strategy}}))?.response)};verifyWithPasskey=async()=>{let{nonce:o=null}=(await this.prepareFirstFactorVerification({strategy:"passkey"})).firstFactorVerification,l=Ki.clerk.__internal_isWebAuthnSupported||ka,h=Ki.clerk.__internal_getPublicCredentials||Lf;if(!l())throw new tt("Passkeys are not supported",{code:"passkey_not_supported"});let _=o?Ff(JSON.parse(o)):null;_||Uf("get");let{publicKeyCredential:b,error:x}=await h({publicKeyOptions:_,conditionalUI:!1});if(!b)throw x;return this.attemptFirstFactorVerification({strategy:"passkey",publicKeyCredential:b})};prepareSecondFactorVerification=async o=>new $a((await J._fetch({method:"POST",path:`/client/sessions/${this.id}/verify/prepare_second_factor`,body:o}))?.response);attemptSecondFactorVerification=async o=>new $a((await J._fetch({method:"POST",path:`/client/sessions/${this.id}/verify/attempt_second_factor`,body:o}))?.response);fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.expireAt=de(o.expire_at),this.abandonAt=de(o.abandon_at),this.factorVerificationAge=o.factor_verification_age,this.lastActiveAt=de(o.last_active_at||void 0),this.lastActiveOrganizationId=o.last_active_organization_id,this.actor=o.actor||null,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at),this.user=new Jl(o.user),this.tasks=o.tasks||null,o.public_user_data&&(this.publicUserData=new Vf(o.public_user_data)),this.lastActiveToken=o.last_active_token?new Sa(o.last_active_token):null),this}__internal_toSnapshot(){return{object:"session",id:this.id,status:this.status,expire_at:this.expireAt.getTime(),abandon_at:this.abandonAt.getTime(),factor_verification_age:this.factorVerificationAge,last_active_at:this.lastActiveAt.getTime(),last_active_organization_id:this.lastActiveOrganizationId,actor:this.actor,tasks:this.tasks,user:this.user?.__internal_toSnapshot()||null,public_user_data:this.publicUserData.__internal_toSnapshot(),last_active_token:this.lastActiveToken?.__internal_toSnapshot()||null,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}async _getToken(o){if(!this.user)return null;let{leewayInSeconds:l,template:h,skipCache:_=!1}=o||{},b=o?.organizationId===void 0?this.lastActiveOrganizationId:o?.organizationId;if(!h&&Number(l)>=60)throw Error("Leeway can not exceed the token lifespan (60 seconds)");let x=this.#i(h,b),A=_?void 0:jn.get({tokenId:x},l),E=!h&&b===this.lastActiveOrganizationId;if(A){Ve.debug("Using cached token (no fetch needed)",{tokenId:x},"session");let B=await A.tokenResolver;return E&&xt.emit(Zo,{token:B}),B.getRawString()||null}Ve.info("Fetching new token from API",{organizationId:b,template:h,tokenId:x},"session");let T=h?`${this.path()}/tokens/${h}`:`${this.path()}/tokens`,N=h?{}:{organizationId:b},j=Sa.create(T,N,_);return jn.set({tokenId:x,tokenResolver:j}),j.then(B=>(E&&(xt.emit(Zo,{token:B}),B.jwt&&(this.lastActiveToken=B,xt.emit(sw,null))),B.getRawString()||null))}get currentTask(){let[o]=this.tasks??[];return o}}class pi extends J{id;pathRoot="/me/passkeys";verification=null;name=null;lastUsedAt=null;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}static async create(){return J._fetch({path:"/me/passkeys",method:"POST"}).then(o=>new pi(o?.response))}static async attemptVerification(o,l){let h=(function(_){let b=_.response;return{...uw(_),response:{clientDataJSON:Ji(b.clientDataJSON),attestationObject:Ji(b.attestationObject),transports:b.getTransports()}}})(l);return J._fetch({path:`/me/passkeys/${o}/attempt_verification`,method:"POST",body:{strategy:"passkey",publicKeyCredential:JSON.stringify(h)}}).then(_=>new pi(_?.response))}static async registerPasskey(){let o=pi.clerk.__internal_isWebAuthnSupported||ka,l=pi.clerk.__internal_createPublicCredentials||SO,h=pi.clerk.__internal_isWebAuthnPlatformAuthenticatorSupported||jO;if(!o())throw new tt("Passkeys are not supported on this device.",{code:"passkey_not_supported"});let _=await this.create(),{verification:b}=_,x=b?.publicKey;if(x||Uf("create"),x.authenticatorSelection?.authenticatorAttachment==="platform"&&!await h())throw new tt("Registration requires a platform authenticator but the device does not support it.",{code:"passkey_pa_not_supported"});let{publicKeyCredential:A,error:E}=await l(x);if(!A)throw E;return this.attemptVerification(_.id,A)}update=o=>this._basePatch({body:o});delete=async()=>new _a((await J._fetch({path:this.path(),method:"DELETE"}))?.response);fromJSON(o){return o&&(this.id=o.id,this.name=o.name,this.lastUsedAt=o.last_used_at?de(o.last_used_at):null,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at),o.verification&&(this.verification=new TO(o.verification))),this}__internal_toSnapshot(){return{object:"passkey",id:this.id,name:this.name,verification:this.verification?.__internal_toSnapshot()||null,last_used_at:this.lastUsedAt?.getTime()||null,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}}class _w extends J{id="";loaders;rollout;constructor(o=null){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=this.withDefault(o.id,this.id),this.loaders=this.withDefault(o.loaders,this.loaders)),this}__internal_toSnapshot(){return{object:"protect_config",id:this.id,loaders:this.loaders}}}class Vf{firstName;lastName;imageUrl;hasImage;identifier;userId;constructor(o){this.fromJSON(o)}fromJSON(o){return o&&(this.firstName=o.first_name||null,this.lastName=o.last_name||null,this.imageUrl=o.image_url||"",this.hasImage=o.has_image||!1,this.identifier=o.identifier||"",this.userId=o.user_id),this}__internal_toSnapshot(){return{first_name:this.firstName,last_name:this.lastName,image_url:this.imageUrl,has_image:this.hasImage,identifier:this.identifier,user_id:this.userId}}}class qf extends J{pathRoot="";id;status;abandonAt;expireAt;lastActiveAt;latestActivity;actor;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}static retrieve(){let o=J.clerk.session?.id;return this.clerk.getFapiClient().request({method:"GET",path:"/me/sessions/active",sessionId:o}).then(l=>l.payload.map(h=>new qf(h,"/me/sessions"))).catch(()=>[])}revoke(){return this._basePost({action:"revoke",body:{}})}fromJSON(o){let l;return o?(this.id=o.id,this.status=o.status,this.expireAt=de(o.expire_at),this.abandonAt=de(o.abandon_at),this.lastActiveAt=de(o.last_active_at||void 0),this.latestActivity={id:(l=o.latest_activity??{}).id,deviceType:l.device_type,browserName:l.browser_name,browserVersion:l.browser_version,country:l.country,city:l.city,isMobile:l.is_mobile,ipAddress:l.ip_address},this.actor=o.actor,this):this}}function Jf(m){return m?`https://${m.replace(/clerk\.accountsstage\./,"accountsstage.").replace(/clerk\.accounts\.|clerk\./,"accounts.")}`:""}async function vw(m,o,l,h,_){if(!m.client||!h.popup)return;let b=Jf(m.frontendApi),{redirectUrl:x}=h,A=new URL(x);A.searchParams.set("sign_in_force_redirect_url",h.redirectUrlComplete),A.searchParams.set("sign_up_force_redirect_url",h.redirectUrlComplete),A.searchParams.set("intent",o);let E=m.buildUrlWithAuth(A.toString()),T=m.buildUrlWithAuth(`${b}/popup-callback`),N=m.buildUrlWithAuth(`${b}/popup-callback?return_url=${encodeURIComponent(E)}`),j=async B=>{if(B.origin!==b)return;let K=!1;if(B.data.session){if(!m.client?.sessions.find(G=>G.id===B.data.session))try{await m.client?.reload()}catch(G){console.error(G)}await m.setActive({session:B.data.session,redirectUrl:h.redirectUrlComplete}),K=!0}else B.data.return_url&&(m.navigate(B.data.return_url),K=!0);K&&window.removeEventListener("message",j)};window.addEventListener("message",j),await l({...h,redirectUrlComplete:T,redirectUrl:N},_)}function yw(m,{redirectCallbackUrl:o,redirectUrl:l}){let h=Jf(m.frontendApi),_=new URL(o);_.searchParams.set("sign_in_force_redirect_url",l),_.searchParams.set("sign_up_force_redirect_url",l);let b=m.buildUrlWithAuth(_.toString()),x=m.buildUrlWithAuth(`${h}/popup-callback`);return{redirectCallbackUrl:m.buildUrlWithAuth(`${h}/popup-callback?return_url=${encodeURIComponent(b)}`),redirectUrl:x}}function bw(m,o){return new Promise((l,h)=>{if(!m.client||!o.popup)return void h();let _=async b=>{b.origin===Jf(m.frontendApi)&&(b.data.session||b.data.return_url?(window.removeEventListener("message",_),l()):h())};window.addEventListener("message",_),o.popup.location.href=o.externalVerificationRedirectURL.toString()})}let xw=(m,o)=>{let{onValidation:l=pr,onValidationComplexity:h=pr}=o||{},{show_zxcvbn:_,validatePassword:b}=m,x=T=>((N,j)=>{let{max_length:B,min_length:K,require_special_char:G,require_lowercase:ae,require_numbers:pe,require_uppercase:Q}=j,he=(ft=>{let Oe;if(ft.allowed_special_characters){let Te=ft.allowed_special_characters.replace("[","\\[");Te=Te.replace("]","\\]"),Oe=RegExp(`[${Te}]`)}else Oe=/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/;return(Te,{minLength:qe,maxLength:Je})=>({max_length:Te.length<Je,min_length:Te.length>=qe,require_numbers:/\d/.test(Te),require_lowercase:/[a-z]/.test(Te),require_uppercase:/[A-Z]/.test(Te),require_special_char:Oe.test(Te)})})(j)(N,{maxLength:j.max_length,minLength:j.min_length}),ke={max_length:B,min_length:K,require_special_char:G,require_lowercase:ae,require_numbers:pe,require_uppercase:Q},Fe=new Map;for(let ft in ke)ke[ft]&&!he[ft]&&Fe.set(ft,!0);return Object.freeze(Object.fromEntries(Fe))})(T,m),A=(({min_zxcvbn_strength:T,onResult:N})=>j=>B=>{let K=j(B);return N?.(K),K.score>=T&&K.score<3?{state:"pass",keys:["unstable__errors.zxcvbn.couldBeStronger"],result:K}:K.score>=T?{state:"excellent",result:K}:{state:"fail",keys:["unstable__errors.zxcvbn.notEnough",...K.feedback.suggestions.map(G=>`unstable__errors.zxcvbn.suggestions.${G}`)],result:K}})(m),E={};return(T,N)=>{let{onValidation:j=l,onValidationComplexity:B=h}=N||{};if(!b)return;let K=x(T);B(Object.keys(K).length===0),E={...E,complexity:K},_&&Promise.all([s.e("890").then(s.bind(s,384)),s.e("377").then(s.bind(s,7706))]).then(([G,ae])=>{let{zxcvbnOptions:pe,zxcvbn:Q}=G,{dictionary:he,adjacencyGraphs:ke}=ae;return pe.setOptions({dictionary:{...he},graphs:ke}),Q}).then(G=>{let ae=A(G)(T);j({...E={...E,strength:ae},strength:ae})}),E.complexity&&Object.keys(E.complexity).length===0&&_||j(E)}};async function rt(m,o){xt.emit("resource:error",{resource:m,error:null}),xt.emit("resource:fetch",{resource:m,status:"fetching"});try{return{result:await o(),error:null}}catch(l){return xt.emit("resource:error",{resource:m,error:l}),{error:l}}finally{xt.emit("resource:fetch",{resource:m,status:"idle"})}}class _t extends J{pathRoot="/client/sign_ins";id;_status=null;supportedIdentifiers=[];supportedFirstFactors=[];supportedSecondFactors=null;firstFactorVerification=new Ht(null);secondFactorVerification=new Ht(null);identifier=null;createdSessionId=null;userData=new ww(null);clientTrustState;get status(){return this._status}set status(o){let l=this._status;this._status=o,o&&l!==o&&Ve.debug("SignIn.status",{id:this.id,from:l,to:o})}__internal_future=new LO(this);__internal_basePost=this._basePost.bind(this);__internal_baseGet=this._baseGet.bind(this);constructor(o=null){super(),this.fromJSON(o)}create=o=>{Ve.debug("SignIn.create",{id:this.id,strategy:"strategy"in o?o.strategy:void 0});let l=da();return this._basePost({path:this.pathRoot,body:l?{locale:l,...o}:o})};resetPassword=o=>this._basePost({body:o,action:"reset_password"});prepareFirstFactor=o=>{let l;switch(Ve.debug("SignIn.prepareFirstFactor",{id:this.id,strategy:o.strategy}),o.strategy){case"passkey":l={};break;case"email_link":l={emailAddressId:o.emailAddressId,redirectUrl:o.redirectUrl};break;case"email_code":case"reset_password_email_code":l={emailAddressId:o.emailAddressId};break;case"phone_code":l={phoneNumberId:o.phoneNumberId,default:o.default,channel:o.channel};break;case"web3_metamask_signature":case"web3_base_signature":case"web3_coinbase_wallet_signature":case"web3_okx_wallet_signature":l={web3WalletId:o.web3WalletId};break;case"reset_password_phone_code":l={phoneNumberId:o.phoneNumberId};break;case"saml":l={redirectUrl:o.redirectUrl,actionCompleteRedirectUrl:o.actionCompleteRedirectUrl};break;case"enterprise_sso":l={redirectUrl:o.redirectUrl,actionCompleteRedirectUrl:o.actionCompleteRedirectUrl,oidcPrompt:o.oidcPrompt,enterpriseConnectionId:o.enterpriseConnectionId};break;default:Fx("SignIn.prepareFirstFactor",o.strategy)}return this._basePost({body:{...l,strategy:o.strategy},action:"prepare_first_factor"})};attemptFirstFactor=o=>{let l;return Ve.debug("SignIn.attemptFirstFactor",{id:this.id,strategy:o.strategy}),l=o.strategy==="passkey"?{publicKeyCredential:JSON.stringify(Mf(o.publicKeyCredential))}:{...o},this._basePost({body:{...l,strategy:o.strategy},action:"attempt_first_factor"})};createEmailLinkFlow=()=>{let{run:o,stop:l}=va();return{startEmailLinkFlow:async({emailAddressId:h,redirectUrl:_})=>{this.id||Lx("SignIn");let b={strategy:"email_link",emailAddressId:h,redirectUrl:_},x=this.status==="needs_second_factor",A=x?"secondFactorVerification":"firstFactorVerification";return x?await this.prepareSecondFactor(b):await this.prepareFirstFactor(b),new Promise((E,T)=>{o(()=>this.reload().then(N=>{let j=N[A].status;(j==="verified"||j==="expired")&&(l(),E(N))}).catch(N=>{l(),T(N)}))})},cancelEmailLinkFlow:l}};prepareSecondFactor=o=>(Ve.debug("SignIn.prepareSecondFactor",{id:this.id,strategy:o.strategy}),this._basePost({body:o,action:"prepare_second_factor"}));attemptSecondFactor=o=>(Ve.debug("SignIn.attemptSecondFactor",{id:this.id,strategy:o.strategy}),this._basePost({body:o,action:"attempt_second_factor"}));authenticateWithRedirectOrPopup=async(o,l)=>{let{strategy:h,redirectUrlComplete:_,identifier:b,oidcPrompt:x,continueSignIn:A,enterpriseConnectionId:E}=o||{},T=_t.clerk.buildUrlWithAuth(o.redirectUrl);this.id&&A||await this.create({strategy:h,identifier:b,redirectUrl:T,actionCompleteRedirectUrl:_}),(h==="saml"||h==="enterprise_sso")&&await this.prepareFirstFactor({strategy:h,redirectUrl:T,actionCompleteRedirectUrl:_,oidcPrompt:x,enterpriseConnectionId:E});let{status:N,externalVerificationRedirectURL:j}=this.firstFactorVerification;N==="unverified"&&j?l(j):Mx(N,_t.fapiClient.buildEmailAddress("support"))};authenticateWithRedirect=async o=>this.authenticateWithRedirectOrPopup(o,vn);authenticateWithPopup=async o=>{let{popup:l}=o||{};return l||jl("popup"),vw(_t.clerk,"signIn",this.authenticateWithRedirectOrPopup,o,h=>{l.location.href=h.toString()})};authenticateWithWeb3=async o=>{let l,{identifier:h,generateSignature:_,strategy:b="web3_metamask_signature"}=o||{},x=b.replace("web3_","").replace("_signature","");typeof _!="function"&&jl("generateSignature"),await this.create({identifier:h});let A=this.supportedFirstFactors?.find(T=>T.strategy===b);A||Dl("SignIn"),await this.prepareFirstFactor(A);let{message:E}=this.firstFactorVerification;E||Dl("SignIn");try{l=await _({identifier:h,nonce:E,provider:x})}catch(T){if(x==="coinbase_wallet"&&T.code===4001)l=await _({identifier:h,nonce:E,provider:x});else throw T}return this.attemptFirstFactor({signature:l,strategy:b})};authenticateWithMetamask=async()=>{let o=await Ul();return this.authenticateWithWeb3({identifier:o,generateSignature:fa,strategy:"web3_metamask_signature"})};authenticateWithCoinbaseWallet=async()=>{let o=await zl();return this.authenticateWithWeb3({identifier:o,generateSignature:ha,strategy:"web3_coinbase_wallet_signature"})};authenticateWithBase=async()=>{let o=await Rl();return this.authenticateWithWeb3({identifier:o,generateSignature:ga,strategy:"web3_base_signature"})};authenticateWithOKXWallet=async()=>{let o=await Nl();return this.authenticateWithWeb3({identifier:o,generateSignature:ma,strategy:"web3_okx_wallet_signature"})};authenticateWithPasskey=async o=>{let{flow:l}=o||{},h=_t.clerk.__internal_isWebAuthnSupported||ka,_=_t.clerk.__internal_getPublicCredentials||Lf,b=_t.clerk.__internal_isWebAuthnAutofillSupported||gw;if(!h())throw new tt("Passkeys are not supported",{code:"passkey_not_supported"});if(l==="autofill"||l==="discoverable")await this.create({strategy:"passkey"});else{let j=this.supportedFirstFactors.find(B=>B.strategy==="passkey");j||(function(){throw Error(`${Mt} You need to start a SignIn flow by calling SignIn.create({ strategy: 'passkey' }) first`)})(),await this.prepareFirstFactor(j)}let{nonce:x}=this.firstFactorVerification,A=x?Ff(JSON.parse(x)):null;A||Uf("get");let E=!1;l==="autofill"&&(E=await b());let{publicKeyCredential:T,error:N}=await _({publicKeyOptions:A,conditionalUI:E});if(!T)throw N;return this.attemptFirstFactor({publicKeyCredential:T,strategy:"passkey"})};validatePassword=(o,l)=>{if(_t.clerk.__unstable__environment?.userSettings.passwordSettings)return xw({..._t.clerk.__unstable__environment?.userSettings.passwordSettings,validatePassword:!0})(o,l)};fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.supportedIdentifiers=o.supported_identifiers,this.identifier=o.identifier,this.supportedFirstFactors=oi(o.supported_first_factors),this.supportedSecondFactors=oi(o.supported_second_factors),this.firstFactorVerification=new Ht(o.first_factor_verification),this.secondFactorVerification=new Ht(o.second_factor_verification),this.createdSessionId=o.created_session_id,this.userData=new ww(o.user_data),this.clientTrustState=o.client_trust_state??void 0),xt.emit("resource:update",{resource:this}),this}__internal_toSnapshot(){return{object:"sign_in",id:this.id||"",status:this.status||null,supported_identifiers:this.supportedIdentifiers,supported_first_factors:Io(this.supportedFirstFactors),supported_second_factors:Io(this.supportedSecondFactors),first_factor_verification:this.firstFactorVerification.__internal_toSnapshot(),second_factor_verification:this.secondFactorVerification.__internal_toSnapshot(),identifier:this.identifier,created_session_id:this.createdSessionId,user_data:this.userData.__internal_toSnapshot()}}}class LO{resource;emailCode={sendCode:this.sendEmailCode.bind(this),verifyCode:this.verifyEmailCode.bind(this)};emailLink={sendLink:this.sendEmailLink.bind(this),waitForVerification:this.waitForEmailLinkVerification.bind(this),get verification(){if(!f())return null;let o=wr("__clerk_status"),l=wr("__clerk_created_session");if(!o||!l)return null;let h=o==="verified"&&_t.clerk.client!==void 0&&_t.clerk.client.sessions.some(_=>_.id===l);return{status:o,createdSessionId:l,verifiedFromTheSameClient:h}}};resetPasswordEmailCode={sendCode:this.sendResetPasswordEmailCode.bind(this),verifyCode:this.verifyResetPasswordEmailCode.bind(this),submitPassword:this.submitResetPassword.bind(this)};phoneCode={sendCode:this.sendPhoneCode.bind(this),verifyCode:this.verifyPhoneCode.bind(this)};mfa={sendPhoneCode:this.sendMFAPhoneCode.bind(this),verifyPhoneCode:this.verifyMFAPhoneCode.bind(this),verifyTOTP:this.verifyTOTP.bind(this),verifyBackupCode:this.verifyBackupCode.bind(this)};constructor(o){this.resource=o}get id(){return this.resource.id}get identifier(){return this.resource.identifier}get createdSessionId(){return this.resource.createdSessionId}get userData(){return this.resource.userData}get status(){return this.resource.status||"needs_identifier"}get supportedFirstFactors(){return this.resource.supportedFirstFactors??[]}get supportedSecondFactors(){return this.resource.supportedSecondFactors??[]}get isTransferable(){return this.resource.firstFactorVerification.status==="transferable"}get existingSession(){if(this.resource.firstFactorVerification.status==="failed"&&this.resource.firstFactorVerification.error?.code==="identifier_already_signed_in"&&this.resource.firstFactorVerification.error?.meta?.sessionId)return{sessionId:this.resource.firstFactorVerification.error?.meta?.sessionId}}get firstFactorVerification(){return this.resource.firstFactorVerification}get secondFactorVerification(){return this.resource.secondFactorVerification}async sendResetPasswordEmailCode(){if(!this.resource.id)throw Error("Cannot reset password without a sign in.");return rt(this.resource,async()=>{let o=this.resource.supportedFirstFactors?.find(h=>h.strategy==="reset_password_email_code");if(!o)throw new ye("Reset password email code factor not found",{code:"factor_not_found"});let{emailAddressId:l}=o;await this.resource.__internal_basePost({body:{emailAddressId:l,strategy:"reset_password_email_code"},action:"prepare_first_factor"})})}async verifyResetPasswordEmailCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"reset_password_email_code"},action:"attempt_first_factor"})})}async submitResetPassword(o){let{password:l,signOutOfOtherSessions:h=!0}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{password:l,signOutOfOtherSessions:h},action:"reset_password"})})}async _create(o){let l=da();await this.resource.__internal_basePost({path:this.resource.pathRoot,body:l?{locale:l,...o}:o})}async create(o){return rt(this.resource,async()=>{await this._create(o)})}async password(o){if([o.identifier,o.emailAddress,o.phoneNumber].filter(Boolean).length>1)throw Error("Only one of identifier, emailAddress, or phoneNumber can be provided");return rt(this.resource,async()=>{let l=o.identifier||o.emailAddress||o.phoneNumber,h=this.resource.identifier,_=da();await this.resource.__internal_basePost({path:this.resource.pathRoot,body:{identifier:l||h,password:o.password,..._?{locale:_}:{}}})})}async sendEmailCode(o={}){let{emailAddress:l,emailAddressId:h}=o;if(!this.resource.id&&h)throw Error("signIn.emailCode.sendCode() cannot be called with an emailAddressId if an existing signIn does not exist.");if(!this.resource.id&&!l)throw Error("signIn.emailCode.sendCode() cannot be called without an emailAddress if an existing signIn does not exist.");return rt(this.resource,async()=>{l&&await this._create({identifier:l});let _=this.selectFirstFactor({strategy:"email_code",emailAddressId:h});if(!_)throw new ye("Email code factor not found",{code:"factor_not_found"});await this.resource.__internal_basePost({body:{emailAddressId:_.emailAddressId,strategy:"email_code"},action:"prepare_first_factor"})})}async verifyEmailCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"email_code"},action:"attempt_first_factor"})})}async sendEmailLink(o){let{emailAddress:l,verificationUrl:h,emailAddressId:_}=o;if(!this.resource.id&&_)throw Error("signIn.emailLink.sendLink() cannot be called with an emailAddressId if an existing signIn does not exist.");if(!this.resource.id&&!l)throw Error("signIn.emailLink.sendLink() cannot be called without an emailAddress if an existing signIn does not exist.");return rt(this.resource,async()=>{l&&await this._create({identifier:l});let b=this.selectFirstFactor({strategy:"email_link",emailAddressId:_});if(!b)throw new ye("Email link factor not found",{code:"factor_not_found"});let x=h;try{new URL(h)}catch{x=window.location.origin+h}await this.resource.__internal_basePost({body:{emailAddressId:b.emailAddressId,redirectUrl:x,strategy:"email_link"},action:"prepare_first_factor"})})}async waitForEmailLinkVerification(){return rt(this.resource,async()=>{let{run:o,stop:l}=va();await new Promise((h,_)=>{o(async()=>{try{let b=await this.resource.__internal_baseGet(),x=b.firstFactorVerification.status;(x==="verified"||x==="expired")&&(l(),h(b))}catch(b){l(),_(b)}})})})}async sendPhoneCode(o={}){let{phoneNumber:l,phoneNumberId:h,channel:_="sms"}=o;if(!this.resource.id&&h)throw Error("signIn.phoneCode.sendCode() cannot be called with an phoneNumberId if an existing signIn does not exist.");if(!this.resource.id&&!l)throw Error("signIn.phoneCode.sendCode() cannot be called without an phoneNumber if an existing signIn does not exist.");return rt(this.resource,async()=>{l&&await this._create({identifier:l});let b=this.selectFirstFactor({strategy:"phone_code",phoneNumberId:h});if(!b)throw new ye("Phone code factor not found",{code:"factor_not_found"});await this.resource.__internal_basePost({body:{phoneNumberId:b.phoneNumberId,strategy:"phone_code",channel:_},action:"prepare_first_factor"})})}async verifyPhoneCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"phone_code"},action:"attempt_first_factor"})})}async sso(o){let{strategy:l,redirectUrl:h,redirectCallbackUrl:_,popup:b,oidcPrompt:x,enterpriseConnectionId:A,identifier:E}=o;return rt(this.resource,async()=>{let T=h;try{new URL(h)}catch{T=window.location.origin+h}let N={redirectUrl:_t.clerk.buildUrlWithAuth(_),actionCompleteRedirectUrl:T};if(b){let K=yw(_t.clerk,{redirectCallbackUrl:N.redirectUrl,redirectUrl:T});N.redirectUrl=K.redirectCallbackUrl,N.actionCompleteRedirectUrl=K.redirectUrl}await this._create({strategy:l,...N,identifier:E}),l==="enterprise_sso"&&await this.resource.__internal_basePost({body:{...N,oidcPrompt:x,enterpriseConnectionId:A,strategy:"enterprise_sso"},action:"prepare_first_factor"});let{status:j,externalVerificationRedirectURL:B}=this.resource.firstFactorVerification;j==="unverified"&&B&&(b?(await bw(_t.clerk,{popup:b,externalVerificationRedirectURL:B}),await this.resource.reload()):vn(B))})}async web3(o){let{strategy:l}=o,h=l.replace("web3_","").replace("_signature","");return rt(this.resource,async()=>{let _,b,x;switch(h){case"metamask":_=await Ul(),b=fa;break;case"coinbase_wallet":_=await zl(),b=ha;break;case"base":_=await Rl(),b=ga;break;case"okx_wallet":_=await Nl(),b=ma;break;default:throw Error(`Unsupported Web3 provider: ${h}`)}await this._create({identifier:_});let A=this.resource.supportedFirstFactors?.find(T=>T.strategy===l);if(!A)throw new ye("Web3 first factor not found",{code:"factor_not_found"});await this.resource.__internal_basePost({body:{web3WalletId:A.web3WalletId,strategy:l},action:"prepare_first_factor"});let{message:E}=this.firstFactorVerification;if(!E)throw new ye("Web3 nonce not found",{code:"web3_nonce_not_found"});try{x=await b({identifier:_,nonce:E})}catch(T){if(h==="coinbase_wallet"&&T.code===4001)x=await b({identifier:_,nonce:E});else throw T}await this.resource.__internal_basePost({body:{signature:x,strategy:l},action:"attempt_first_factor"})})}async passkey(o){let{flow:l}=o||{},h=_t.clerk.__internal_isWebAuthnSupported||ka,_=_t.clerk.__internal_getPublicCredentials||Lf,b=_t.clerk.__internal_isWebAuthnAutofillSupported||gw;if(!h())throw new tt("Passkeys are not supported",{code:"passkey_not_supported"});return rt(this.resource,async()=>{if(l==="autofill"||l==="discoverable")await this._create({strategy:"passkey"});else{if(!this.supportedFirstFactors.find(j=>j.strategy==="passkey"))throw new ye("Passkey factor not found",{code:"factor_not_found"});await this.resource.__internal_basePost({body:{strategy:"passkey"},action:"prepare_first_factor"})}let{nonce:x}=this.firstFactorVerification,A=x?Ff(JSON.parse(x)):null;if(!A)throw new ye("Missing public key options",{code:"missing_public_key_options"});let E=!1;l==="autofill"&&(E=await b());let{publicKeyCredential:T,error:N}=await _({publicKeyOptions:A,conditionalUI:E});if(!T)throw new tt(N.message,{code:"passkey_retrieval_failed"});await this.resource.__internal_basePost({body:{publicKeyCredential:JSON.stringify(Mf(T)),strategy:"passkey"},action:"attempt_first_factor"})})}async sendMFAPhoneCode(){return rt(this.resource,async()=>{let o=this.resource.supportedSecondFactors?.find(h=>h.strategy==="phone_code");if(!o)throw new ye("Phone code factor not found",{code:"factor_not_found"});let{phoneNumberId:l}=o;await this.resource.__internal_basePost({body:{phoneNumberId:l,strategy:"phone_code"},action:"prepare_second_factor"})})}async verifyMFAPhoneCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"phone_code"},action:"attempt_second_factor"})})}async verifyTOTP(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"totp"},action:"attempt_second_factor"})})}async verifyBackupCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{code:l,strategy:"backup_code"},action:"attempt_second_factor"})})}async ticket(o){let l=o?.ticket??wr("__clerk_ticket");return this.create({ticket:l??void 0})}async finalize(o){let{navigate:l}=o||{};if(!this.resource.createdSessionId)throw Error("Cannot finalize sign-in without a created session.");return rt(this.resource,async()=>{await _t.clerk.client?.reload(),await _t.clerk.setActive({session:this.resource.createdSessionId,navigate:l})})}selectFirstFactor({strategy:o,emailAddressId:l,phoneNumberId:h}){if(!this.resource.supportedFirstFactors)return null;if(l){let x=this.resource.supportedFirstFactors.find(A=>A.strategy===o&&A.emailAddressId===l);if(x)return x}if(h){let x=this.resource.supportedFirstFactors.find(A=>A.strategy===o&&A.phoneNumberId===h);if(x)return x}let _=this.resource.supportedFirstFactors.find(x=>x.strategy===o&&x.safeIdentifier===this.resource.identifier);return _||this.resource.supportedFirstFactors.find(x=>x.strategy===o)||null}}class ww{firstName;lastName;imageUrl;hasImage;constructor(o){this.fromJSON(o)}fromJSON(o){return o&&(this.firstName=o.first_name,this.lastName=o.last_name,this.imageUrl=o.image_url??void 0,this.hasImage=o.has_image??void 0),this}__internal_toSnapshot(){return{first_name:this.firstName,last_name:this.lastName,image_url:this.imageUrl||null,has_image:this.hasImage||null}}}function qo(m){let{unsafeMetadata:o}={...m},l=o?typeof o=="object"?JSON.stringify(o):o:"";return{...m,...o?{unsafeMetadata:l}:{}}}class wt extends J{pathRoot="/client/sign_ups";id;_status=null;requiredFields=[];missingFields=[];optionalFields=[];unverifiedFields=[];verifications=new dw(null);username=null;firstName=null;lastName=null;emailAddress=null;phoneNumber=null;web3wallet=null;externalAccount;hasPassword=!1;unsafeMetadata={};createdSessionId=null;createdUserId=null;abandonAt=null;legalAcceptedAt=null;locale=null;get status(){return this._status}set status(o){let l=this._status;this._status=o,o&&l!==o&&Ve.debug("SignUp.status",{id:this.id,from:l,to:o})}__internal_future=new FO(this);__internal_basePost=this._basePost.bind(this);__internal_basePatch=this._basePatch.bind(this);constructor(o=null){super(),this.fromJSON(o)}create=async o=>{Ve.debug("SignUp.create",{id:this.id,strategy:o.strategy});let l={...o};if(!l.locale){let h=da();h&&(l.locale=h)}if(!this.clientBypass()&&!this.shouldBypassCaptchaForAttempt(o)){let h=new Ml(wt.clerk),_=await h.managedOrInvisible({action:"signup"});if(!_)throw new ye("",{code:"captcha_unavailable"});l={...l,..._}}if(l.transfer&&this.shouldBypassCaptchaForAttempt(l)){let h=wt.clerk.client?.signIn.firstFactorVerification.strategy;h&&(l={...l,strategy:h})}return this._basePost({path:this.pathRoot,body:qo(l)})};prepareVerification=o=>(Ve.debug("SignUp.prepareVerification",{id:this.id,strategy:o.strategy}),this._basePost({body:o,action:"prepare_verification"}));attemptVerification=o=>(Ve.debug("SignUp.attemptVerification",{id:this.id,strategy:o.strategy}),this._basePost({body:o,action:"attempt_verification"}));prepareEmailAddressVerification=o=>this.prepareVerification(o||{strategy:"email_code"});attemptEmailAddressVerification=o=>this.attemptVerification({...o,strategy:"email_code"});createEmailLinkFlow=()=>{let{run:o,stop:l}=va();return{startEmailLinkFlow:async({redirectUrl:h})=>(this.id||Lx("SignUp"),await this.prepareEmailAddressVerification({strategy:"email_link",redirectUrl:h}),new Promise((_,b)=>{o(()=>this.reload().then(x=>{let A=x.verifications.emailAddress.status;(A==="verified"||A==="expired")&&(l(),_(x))}).catch(x=>{l(),b(x)}))})),cancelEmailLinkFlow:l}};preparePhoneNumberVerification=o=>this.prepareVerification(o||{strategy:"phone_code"});attemptPhoneNumberVerification=o=>this.attemptVerification({...o,strategy:"phone_code"});prepareWeb3WalletVerification=o=>this.prepareVerification({strategy:"web3_metamask_signature",...o});attemptWeb3WalletVerification=async o=>{let{signature:l,strategy:h="web3_metamask_signature"}=o;return this.attemptVerification({signature:l,strategy:h})};authenticateWithWeb3=async o=>{let l,{generateSignature:h,identifier:_,unsafeMetadata:b,strategy:x="web3_metamask_signature",legalAccepted:A}=o||{},E=x.replace("web3_","").replace("_signature","");typeof h!="function"&&jl("generateSignature");let T=_||this.web3wallet;await this.create({web3Wallet:T,unsafeMetadata:b,legalAccepted:A}),await this.prepareWeb3WalletVerification({strategy:x});let{message:N}=this.verifications.web3Wallet;N||Dl("SignUp");try{l=await h({identifier:_,nonce:N,provider:E})}catch(j){if(E==="coinbase_wallet"&&j.code===4001)l=await h({identifier:_,nonce:N,provider:E});else throw j}return this.attemptWeb3WalletVerification({signature:l,strategy:x})};authenticateWithMetamask=async o=>{let l=await Ul();return this.authenticateWithWeb3({identifier:l,generateSignature:fa,unsafeMetadata:o?.unsafeMetadata,strategy:"web3_metamask_signature",legalAccepted:o?.legalAccepted})};authenticateWithCoinbaseWallet=async o=>{let l=await zl();return this.authenticateWithWeb3({identifier:l,generateSignature:ha,unsafeMetadata:o?.unsafeMetadata,strategy:"web3_coinbase_wallet_signature",legalAccepted:o?.legalAccepted})};authenticateWithBase=async o=>{let l=await Rl();return this.authenticateWithWeb3({identifier:l,generateSignature:ga,unsafeMetadata:o?.unsafeMetadata,strategy:"web3_base_signature",legalAccepted:o?.legalAccepted})};authenticateWithOKXWallet=async o=>{let l=await Nl();return this.authenticateWithWeb3({identifier:l,generateSignature:ma,unsafeMetadata:o?.unsafeMetadata,strategy:"web3_okx_wallet_signature",legalAccepted:o?.legalAccepted})};authenticateWithRedirectOrPopup=async(o,l)=>{let{redirectUrl:h,redirectUrlComplete:_,strategy:b,continueSignUp:x=!1,unsafeMetadata:A,emailAddress:E,legalAccepted:T,oidcPrompt:N,enterpriseConnectionId:j}=o,B=wt.clerk.buildUrlWithAuth(h),K=()=>{let he={strategy:b,redirectUrl:B,actionCompleteRedirectUrl:_,unsafeMetadata:A,emailAddress:E,legalAccepted:T,oidcPrompt:N,enterpriseConnectionId:j};return x&&this.id?this.update(he):this.create(he)},{verifications:G}=await K().catch(async he=>{if(Ce(he)&&oe(he))return await wt.clerk.__unstable__environment.reload(),K();throw he}),{externalAccount:ae}=G,{status:pe,externalVerificationRedirectURL:Q}=ae;pe==="unverified"&&Q?l(Q):Mx(pe,wt.fapiClient.buildEmailAddress("support"))};authenticateWithRedirect=async o=>this.authenticateWithRedirectOrPopup(o,vn);authenticateWithPopup=async o=>{let{popup:l}=o||{};return l||jl("popup"),vw(wt.clerk,"signUp",this.authenticateWithRedirectOrPopup,o,h=>{l.location.href=h instanceof URL?h.toString():h})};update=o=>this._basePatch({body:qo(o)});upsert=o=>this.id?this.update(o):this.create(o);validatePassword=(o,l)=>{if(wt.clerk.__unstable__environment?.userSettings.passwordSettings)return xw({...wt.clerk.__unstable__environment?.userSettings.passwordSettings,validatePassword:!0})(o,l)};fromJSON(o){return o&&(this.id=o.id,this.status=o.status,this.requiredFields=o.required_fields,this.optionalFields=o.optional_fields,this.missingFields=o.missing_fields,this.unverifiedFields=o.unverified_fields,this.verifications=new dw(o.verifications),this.username=o.username,this.firstName=o.first_name,this.lastName=o.last_name,this.emailAddress=o.email_address,this.phoneNumber=o.phone_number,this.hasPassword=o.has_password,this.unsafeMetadata=o.unsafe_metadata,this.createdSessionId=o.created_session_id,this.createdUserId=o.created_user_id,this.abandonAt=o.abandon_at,this.web3wallet=o.web3_wallet,this.legalAcceptedAt=o.legal_accepted_at,this.locale=o.locale),xt.emit("resource:update",{resource:this}),this}__internal_toSnapshot(){return{object:"sign_up",id:this.id||"",status:this.status||null,required_fields:this.requiredFields,optional_fields:this.optionalFields,missing_fields:this.missingFields,unverified_fields:this.unverifiedFields,verifications:this.verifications.__internal_toSnapshot(),username:this.username,first_name:this.firstName,last_name:this.lastName,email_address:this.emailAddress,phone_number:this.phoneNumber,has_password:this.hasPassword,unsafe_metadata:this.unsafeMetadata,created_session_id:this.createdSessionId,created_user_id:this.createdUserId,abandon_at:this.abandonAt,web3_wallet:this.web3wallet,legal_accepted_at:this.legalAcceptedAt,locale:this.locale,external_account:this.externalAccount,external_account_strategy:this.externalAccount?.strategy}}clientBypass(){return wt.clerk.client?.captchaBypass}shouldBypassCaptchaForAttempt(o){if(!o.strategy)return!1;let l=wt.clerk.__unstable__environment.displayConfig.captchaOauthBypass;return!!(l.some(h=>h===o.strategy)||o.transfer&&l.some(h=>h===wt.clerk.client.signIn.firstFactorVerification.strategy))}__experimental_getEnterpriseConnections=()=>J._fetch({path:`/client/sign_ups/${this.id}/enterprise_connections`,method:"GET"}).then(o=>(o?.response).map(l=>new MO(l)))}class FO{resource;verifications={sendEmailCode:this.sendEmailCode.bind(this),verifyEmailCode:this.verifyEmailCode.bind(this),sendPhoneCode:this.sendPhoneCode.bind(this),verifyPhoneCode:this.verifyPhoneCode.bind(this)};constructor(o){this.resource=o}get id(){return this.resource.id}get requiredFields(){return this.resource.requiredFields}get optionalFields(){return this.resource.optionalFields}get missingFields(){return this.resource.missingFields}get status(){return this.resource.status||"missing_requirements"}get username(){return this.resource.username}get firstName(){return this.resource.firstName}get lastName(){return this.resource.lastName}get emailAddress(){return this.resource.emailAddress}get phoneNumber(){return this.resource.phoneNumber}get web3Wallet(){return this.resource.web3wallet}get hasPassword(){return this.resource.hasPassword}get unsafeMetadata(){return this.resource.unsafeMetadata}get createdSessionId(){return this.resource.createdSessionId}get createdUserId(){return this.resource.createdUserId}get abandonAt(){return this.resource.abandonAt}get legalAcceptedAt(){return this.resource.legalAcceptedAt}get locale(){return this.resource.locale}get unverifiedFields(){return this.resource.unverifiedFields}get isTransferable(){return this.resource.verifications.externalAccount.status==="transferable"&&this.resource.verifications.externalAccount.error?.code==="external_account_exists"}get existingSession(){if((this.resource.verifications.externalAccount.status==="failed"||this.resource.verifications.externalAccount.status==="unverified")&&this.resource.verifications.externalAccount.error?.code==="identifier_already_signed_in"&&this.resource.verifications.externalAccount.error?.meta?.sessionId)return{sessionId:this.resource.verifications.externalAccount.error?.meta?.sessionId}}async getCaptchaToken(){let o=new Ml(wt.clerk),l=await o.managedOrInvisible({action:"signup"});if(!l)throw Error("Captcha challenge failed");let{captchaError:h,captchaToken:_,captchaWidgetType:b}=l;return{captchaToken:_,captchaWidgetType:b,captchaError:h}}async _create(o){let{captchaToken:l,captchaWidgetType:h,captchaError:_}=await this.getCaptchaToken(),b={transfer:o.transfer,captchaToken:l,captchaWidgetType:h,captchaError:_,...o,unsafeMetadata:o.unsafeMetadata?qo(o.unsafeMetadata):void 0,locale:o.locale??da()};await this.resource.__internal_basePost({path:this.resource.pathRoot,body:b})}async create(o){return rt(this.resource,async()=>{await this._create(o)})}async update(o){return rt(this.resource,async()=>{let l={...o,unsafeMetadata:o.unsafeMetadata?qo(o.unsafeMetadata):void 0};await this.resource.__internal_basePatch({path:this.resource.pathRoot,body:l})})}async password(o){return rt(this.resource,async()=>{let{captchaToken:l,captchaWidgetType:h,captchaError:_}=await this.getCaptchaToken(),b={strategy:"password",captchaToken:l,captchaWidgetType:h,captchaError:_,...o,unsafeMetadata:o.unsafeMetadata?qo(o.unsafeMetadata):void 0};await this.resource.__internal_basePost({path:this.resource.pathRoot,body:b})})}async sendEmailCode(){return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{strategy:"email_code"},action:"prepare_verification"})})}async verifyEmailCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{strategy:"email_code",code:l},action:"attempt_verification"})})}async sendPhoneCode(o){let{phoneNumber:l,channel:h="sms"}=o;return rt(this.resource,async()=>{if(!this.resource.id){let{captchaToken:_,captchaWidgetType:b,captchaError:x}=await this.getCaptchaToken();await this.resource.__internal_basePost({path:this.resource.pathRoot,body:{phoneNumber:l,captchaToken:_,captchaWidgetType:b,captchaError:x}})}await this.resource.__internal_basePost({body:{strategy:"phone_code",channel:h},action:"prepare_verification"})})}async verifyPhoneCode(o){let{code:l}=o;return rt(this.resource,async()=>{await this.resource.__internal_basePost({body:{strategy:"phone_code",code:l},action:"attempt_verification"})})}async sso(o){let{strategy:l,redirectUrl:h,redirectCallbackUrl:_,unsafeMetadata:b,legalAccepted:x,oidcPrompt:A,enterpriseConnectionId:E,emailAddress:T,popup:N}=o;return rt(this.resource,async()=>{let{captchaToken:j,captchaWidgetType:B,captchaError:K}=await this.getCaptchaToken(),G=h;try{new URL(h)}catch{G=window.location.origin+h}let ae={redirectUrl:wt.clerk.buildUrlWithAuth(_),actionCompleteRedirectUrl:G};if(N){let ke=yw(wt.clerk,{redirectCallbackUrl:ae.redirectUrl,redirectUrl:G});ae.redirectUrl=ke.redirectCallbackUrl,ae.actionCompleteRedirectUrl=ke.redirectUrl}let pe=()=>this.resource.__internal_basePost({path:this.resource.pathRoot,body:{strategy:l,...ae,unsafeMetadata:b,legalAccepted:x,oidcPrompt:A,enterpriseConnectionId:E,emailAddress:T,captchaToken:j,captchaWidgetType:B,captchaError:K}});await pe().catch(async ke=>{if(Ce(ke)&&oe(ke))return await wt.clerk.__unstable__environment.reload(),pe();throw ke});let{status:Q,externalVerificationRedirectURL:he}=this.resource.verifications.externalAccount;Q==="unverified"&&he&&(N?(await bw(wt.clerk,{popup:N,externalVerificationRedirectURL:he}),await this.resource.reload()):vn(he))})}async web3(o){let{strategy:l,unsafeMetadata:h,legalAccepted:_}=o,b=l.replace("web3_","").replace("_signature","");return rt(this.resource,async()=>{let x,A,E;switch(b){case"metamask":x=await Ul(),A=fa;break;case"coinbase_wallet":x=await zl(),A=ha;break;case"base":x=await Rl(),A=ga;break;case"okx_wallet":x=await Nl(),A=ma;break;default:throw Error(`Unsupported Web3 provider: ${b}`)}let T=x||this.resource.web3wallet;await this._create({web3Wallet:T,unsafeMetadata:h,legalAccepted:_}),await this.resource.__internal_basePost({body:{strategy:l},action:"prepare_verification"});let{message:N}=this.resource.verifications.web3Wallet;N||Dl("SignUp");try{E=await A({identifier:x,nonce:N})}catch(j){if(b==="coinbase_wallet"&&j.code===4001)E=await A({identifier:x,nonce:N});else throw j}await this.resource.__internal_basePost({body:{signature:E,strategy:l},action:"attempt_verification"})})}async ticket(o){let l=o?.ticket??wr("__clerk_ticket");return this.create({...o,ticket:l??void 0})}async finalize(o){let{navigate:l}=o||{};return rt(this.resource,async()=>{if(!this.resource.createdSessionId)throw Error("Cannot finalize sign-up without a created session.");await wt.clerk.setActive({session:this.resource.createdSessionId,navigate:l})})}}class MO extends J{id;name;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.name=o.name),this}}class Sa extends J{pathRoot="tokens";jwt;static async create(o,l={},h=!1){return new Sa(await J._fetch({body:l,method:"POST",path:o,search:h?"debug=skip_cache":void 0}),o)}constructor(o,l){super(),l&&(this.pathRoot=l),o?.jwt&&(this.jwt=Ux(o.jwt))}getRawString=()=>this.jwt?.claims.__raw||"";fromJSON(o){return o&&(this.jwt=Ux(o.jwt)),this}__internal_toSnapshot(){return{object:"token",id:this.id||"",jwt:this.getRawString()}}}class kw extends J{pathRoot="/me";id="";secret;uri;verified=!1;backupCodes;updatedAt=null;createdAt=null;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.secret=o.secret,this.uri=o.uri,this.verified=o.verified,this.backupCodes=o.backup_codes,this.updatedAt=de(o.updated_at),this.createdAt=de(o.created_at)),this}}class BO extends J{pathRoot="/me";id;codes=[];updatedAt=null;createdAt=null;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.codes=o.codes,this.updatedAt=de(o.updated_at),this.createdAt=de(o.created_at)),this}}class Jl extends J{pathRoot="/me";id="";externalId=null;username=null;emailAddresses=[];phoneNumbers=[];web3Wallets=[];externalAccounts=[];enterpriseAccounts=[];passkeys=[];samlAccounts=[];organizationMemberships=[];passwordEnabled=!1;firstName=null;lastName=null;fullName=null;primaryEmailAddressId=null;primaryEmailAddress=null;primaryPhoneNumberId=null;primaryPhoneNumber=null;primaryWeb3WalletId=null;primaryWeb3Wallet=null;imageUrl="";hasImage=!1;twoFactorEnabled=!1;totpEnabled=!1;backupCodeEnabled=!1;publicMetadata={};unsafeMetadata={};createOrganizationEnabled=!1;createOrganizationsLimit=null;deleteSelfEnabled=!1;lastSignInAt=null;legalAcceptedAt=null;updatedAt=null;createdAt=null;cachedSessionsWithActivities=null;static isUserResource(o){return!!o&&o instanceof Jl}constructor(o){super(),this.fromJSON(o)}path(){return this.pathRoot}isPrimaryIdentification=o=>{switch(o.constructor){case jf:return this.primaryEmailAddressId===o.id;case Bf:return this.primaryPhoneNumberId===o.id;case Gf:return this.primaryWeb3WalletId===o.id;default:return!1}};createEmailAddress=o=>{let{email:l}=o||{};return new jf({email_address:l},this.path()+"/email_addresses/").create()};createPasskey=()=>pi.registerPasskey();createPhoneNumber=o=>{let{phoneNumber:l}=o||{};return new Bf({phone_number:l},this.path()+"/phone_numbers/").create()};createWeb3Wallet=o=>{let{web3Wallet:l}=o||{};return new Gf({web3_wallet:l},this.path()+"/web3_wallets/").create()};createExternalAccount=async o=>{let{strategy:l,redirectUrl:h,additionalScopes:_}=o||{};return new pw((await J._fetch({path:"/me/external_accounts",method:"POST",body:{strategy:l,redirect_url:h,additional_scope:_}}))?.response,this.path()+"/external_accounts")};createTOTP=async()=>new kw((await J._fetch({path:"/me/totp",method:"POST"}))?.response);verifyTOTP=async({code:o})=>new kw((await J._fetch({path:"/me/totp/attempt_verification",method:"POST",body:{code:o}}))?.response);disableTOTP=async()=>new _a((await J._fetch({path:"/me/totp",method:"DELETE"}))?.response);createBackupCode=async()=>new BO((await J._fetch({path:this.path()+"/backup_codes/",method:"POST"}))?.response);update=o=>this._basePatch({body:qo(o)});updatePassword=o=>this._basePost({body:o,path:`${this.path()}/change_password`});removePassword=o=>this._basePost({body:o,path:`${this.path()}/remove_password`});delete=()=>this._baseDelete({path:"/me"}).then(o=>(xt.emit(ya,null),o));getSessions=async()=>{if(this.cachedSessionsWithActivities)return this.cachedSessionsWithActivities;let o=await qf.retrieve();return this.cachedSessionsWithActivities=o,o};setProfileImage=o=>{let{file:l}=o||{};return l===null?xa.delete(`${this.path()}/profile_image`):xa.create(`${this.path()}/profile_image`,{file:l})};getOrganizationInvitations=o=>Kf.retrieve(o);getOrganizationSuggestions=o=>Zf.retrieve(o);getOrganizationMemberships=o=>di.retrieve(o);leaveOrganization=async o=>new _a((await J._fetch({path:`${this.path()}/organization_memberships/${o}`,method:"DELETE"}))?.response);initializePaymentMethod=o=>Yx(o);addPaymentMethod=o=>Qx(o);getPaymentMethods=o=>ew(o);get verifiedExternalAccounts(){return this.externalAccounts.filter(o=>o.verification?.status=="verified")}get unverifiedExternalAccounts(){return this.externalAccounts.filter(o=>o.verification?.status!="verified")}get verifiedWeb3Wallets(){return this.web3Wallets.filter(o=>o.verification?.status=="verified")}get hasVerifiedEmailAddress(){return this.emailAddresses.filter(o=>o.verification.status==="verified").length>0}get hasVerifiedPhoneNumber(){return this.phoneNumbers.filter(o=>o.verification.status==="verified").length>0}fromJSON(o){return o&&(this.id=o.id,this.externalId=o.external_id||null,this.firstName=o.first_name||null,this.lastName=o.last_name||null,(this.firstName||this.lastName)&&(this.fullName=(({firstName:l,lastName:h,name:_})=>_||[l,h].join(" ").trim()||"")({firstName:this.firstName,lastName:this.lastName})),this.imageUrl=o.image_url||"",this.hasImage=o.has_image||!1,this.username=o.username||null,this.passwordEnabled=o.password_enabled||!1,this.emailAddresses=(o.email_addresses||[]).map(l=>new jf(l,this.path()+"/email_addresses")),this.primaryEmailAddressId=o.primary_email_address_id||null,this.primaryEmailAddress=this.emailAddresses.find(({id:l})=>l===this.primaryEmailAddressId)||null,this.phoneNumbers=(o.phone_numbers||[]).map(l=>new Bf(l,this.path()+"/phone_numbers")),this.primaryPhoneNumberId=o.primary_phone_number_id||null,this.primaryPhoneNumber=this.phoneNumbers.find(({id:l})=>l===this.primaryPhoneNumberId)||null,this.web3Wallets=(o.web3_wallets||[]).map(l=>new Gf(l,this.path()+"/web3_wallets")),this.primaryWeb3WalletId=o.primary_web3_wallet_id||null,this.primaryWeb3Wallet=this.web3Wallets.find(({id:l})=>l===this.primaryWeb3WalletId)||null,this.externalAccounts=(o.external_accounts||[]).map(l=>new pw(l,this.path()+"/external_accounts")),this.passkeys=(o.passkeys||[]).map(l=>new pi(l)),this.organizationMemberships=(o.organization_memberships||[]).map(l=>new di(l)),this.samlAccounts=(o.saml_accounts||[]).map(l=>new UO(l,this.path()+"/saml_accounts")),this.enterpriseAccounts=(o.enterprise_accounts||[]).map(l=>new EO(l,this.path()+"/enterprise_accounts")),this.publicMetadata=o.public_metadata||{},this.unsafeMetadata=o.unsafe_metadata||{},this.totpEnabled=o.totp_enabled||!1,this.backupCodeEnabled=o.backup_code_enabled||!1,this.twoFactorEnabled=o.two_factor_enabled||!1,this.createOrganizationEnabled=o.create_organization_enabled||!1,this.createOrganizationsLimit=o.create_organizations_limit||null,this.deleteSelfEnabled=o.delete_self_enabled||!1,o.last_sign_in_at&&(this.lastSignInAt=de(o.last_sign_in_at)),o.legal_accepted_at&&(this.legalAcceptedAt=de(o.legal_accepted_at)),this.updatedAt=de(o.updated_at||void 0),this.createdAt=de(o.created_at||void 0)),this}__internal_toSnapshot(){return{object:"user",id:this.id,external_id:this.externalId,first_name:this.firstName,last_name:this.lastName,username:this.username,public_metadata:this.publicMetadata,unsafe_metadata:this.unsafeMetadata,image_url:this.imageUrl,has_image:this.hasImage,email_addresses:this.emailAddresses.map(o=>o.__internal_toSnapshot()),phone_numbers:this.phoneNumbers.map(o=>o.__internal_toSnapshot()),web3_wallets:this.web3Wallets.map(o=>o.__internal_toSnapshot()),external_accounts:this.externalAccounts.map(o=>o.__internal_toSnapshot()),passkeys:this.passkeys.map(o=>o.__internal_toSnapshot()),organization_memberships:this.organizationMemberships.map(o=>o.__internal_toSnapshot()),saml_accounts:this.samlAccounts.map(o=>o.__internal_toSnapshot()),enterprise_accounts:this.enterpriseAccounts.map(o=>o.__internal_toSnapshot()),totp_enabled:this.totpEnabled,backup_code_enabled:this.backupCodeEnabled,two_factor_enabled:this.twoFactorEnabled,create_organization_enabled:this.createOrganizationEnabled,create_organizations_limit:this.createOrganizationsLimit,delete_self_enabled:this.deleteSelfEnabled,primary_email_address_id:this.primaryEmailAddressId,primary_phone_number_id:this.primaryPhoneNumberId,primary_web3_wallet_id:this.primaryWeb3WalletId,password_enabled:this.passwordEnabled,profile_image_id:this.imageUrl,last_sign_in_at:this.lastSignInAt?.getTime()||null,legal_accepted_at:this.legalAcceptedAt?.getTime()||null,updated_at:this.updatedAt?.getTime()||null,created_at:this.createdAt?.getTime()||null}}}class Kf extends J{id;emailAddress;publicOrganizationData;publicMetadata={};status;role;createdAt;updatedAt;static async retrieve(o){return await J._fetch({path:"/me/organization_invitations",method:"GET",search:Ur(o)}).then(l=>{let{data:h,total_count:_}=l?.response;return{total_count:_,data:h.map(b=>new Kf(b))}})}constructor(o){super(),this.fromJSON(o)}accept=async()=>await this._basePost({path:`/me/organization_invitations/${this.id}/accept`});fromJSON(o){return o&&(this.id=o.id,this.emailAddress=o.email_address,this.publicOrganizationData={hasImage:o.public_organization_data.has_image,imageUrl:o.public_organization_data.image_url,name:o.public_organization_data.name,id:o.public_organization_data.id,slug:o.public_organization_data.slug},this.publicMetadata=o.public_metadata,this.role=o.role,this.status=o.status,this.createdAt=de(o.created_at),this.updatedAt=de(o.updated_at)),this}}class Gf extends J{id;web3Wallet="";verification;constructor(o,l){super(),this.pathRoot=l,this.fromJSON(o)}create(){return this._basePost({body:{web3_wallet:this.web3Wallet}})}prepareVerification=o=>this._basePost({action:"prepare_verification",body:{...o}});attemptVerification=o=>{let{signature:l}=o;return this._basePost({action:"attempt_verification",body:{signature:l}})};destroy(){return this._baseDelete()}toString(){return this.web3Wallet}fromJSON(o){return o&&(this.id=o.id,this.web3Wallet=o.web3_wallet,this.verification=new Ht(o.verification)),this}__internal_toSnapshot(){return{object:"web3_wallet",id:this.id,web3_wallet:this.web3Wallet,verification:this.verification.__internal_toSnapshot()}}}class Hf extends J{pathRoot="/waitlist";id="";updatedAt=null;createdAt=null;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.updatedAt=de(o.updated_at),this.createdAt=de(o.created_at)),this}static async join(o){return new Hf((await J._fetch({path:"/waitlist",method:"POST",body:o}))?.response)}}class Xf extends J{pathRoot="/api_keys";id;type;name;subject;scopes;claims;revoked;revocationReason;expired;expiration;createdBy;description;secret;lastUsedAt;createdAt;updatedAt;constructor(o){super(),this.fromJSON(o)}fromJSON(o){return o&&(this.id=o.id,this.type=o.type,this.name=o.name,this.subject=o.subject,this.scopes=o.scopes,this.claims=o.claims,this.revoked=o.revoked,this.revocationReason=o.revocation_reason,this.expired=o.expired,this.expiration=o.expiration?de(o.expiration):null,this.createdBy=o.created_by,this.description=o.description,this.secret=o.secret,this.lastUsedAt=o.last_used_at?de(o.last_used_at):null,this.updatedAt=de(o.updated_at),this.createdAt=de(o.created_at)),this}__internal_toSnapshot(){return{object:"api_key",id:this.id,type:this.type,name:this.name,subject:this.subject,scopes:this.scopes,claims:this.claims,revoked:this.revoked,revocation_reason:this.revocationReason,expired:this.expired,expiration:this.expiration?this.expiration.getTime():null,created_by:this.createdBy,description:this.description,last_used_at:this.lastUsedAt?this.lastUsedAt.getTime():null,created_at:this.createdAt.getTime(),updated_at:this.updatedAt.getTime()}}}function $w(m,o){var l,h;return m.id!==o.id||m.updatedAt.getTime()<o.updatedAt.getTime()||(l=o,h=m,l.organizationMemberships.length!==h.organizationMemberships.length||l.organizationMemberships[0]?.updatedAt!==h.organizationMemberships[0]?.updatedAt)}function Kl(m,o){return(function(l,h){if(!l&&h||l&&!h)return!0;if(!l&&l===h)return!1;if(!l||!h)return!0;try{if(Bt.isClientResource(l))return l.id!==h.id||l.updatedAt.getTime()<h.updatedAt.getTime()||l.sessions.length!==h.sessions.length;if(Ki.isSessionResource(l)){var _,b;return l.id!==h.id||l.updatedAt.getTime()<h.updatedAt.getTime()||l.lastActiveToken?.jwt?.claims?.__raw!==h.lastActiveToken?.jwt?.claims?.__raw||(function(x,A){if(x.lastActiveOrganizationId!==A.lastActiveOrganizationId)return!0;let E=x.user?.organizationMemberships?.find(N=>N.organization.id===x.lastActiveOrganizationId),T=A.user?.organizationMemberships?.find(N=>N.organization.id===x.lastActiveOrganizationId);return E?.permissions?.length!==T?.permissions?.length})(l,h)||(_=l,b=h,!!_.user!=!!b.user||!!_.user&&!!b.user&&$w(_.user,b.user))}if(Jl.isUserResource(l))return $w(l,h)}catch{}return!0})(m,o)?o:m}let Yf=(m,o)=>{let l={};for(let h in m)l[h]=o(m[h],h);return l},Qf=(m,o)=>{let l={};for(let h in m)m[h]&&o(m[h])&&(l[h]=m[h]);return l};class fi{static keys=["signInForceRedirectUrl","signInFallbackRedirectUrl","signUpForceRedirectUrl","signUpFallbackRedirectUrl","afterSignInUrl","afterSignUpUrl","redirectUrl"];static preserved=["redirectUrl"];options;fromOptions;fromProps;fromSearchParams;mode;constructor(o,l={},h={},_){this.options=o,this.fromOptions=this.#s(o||{}),this.fromProps=this.#s(l||{}),this.fromSearchParams=this.#p(h||{}),this.mode=_}getAfterSignInUrl(){return this.#a("signIn")}getAfterSignUpUrl(){return this.#a("signUp")}getPreservedSearchParams(){return this.#r(this.#i())}toSearchParams(){return this.#r(this.#n())}#r(o){return new URLSearchParams(Object.entries(Object.fromEntries(Object.entries(o).map(([l,h])=>[on(l),h]))).reduce((l,[h,_])=>(_!=null&&(l[h]=_),l),{}))}#i(){return Object.fromEntries(Object.entries({...this.fromSearchParams}).filter(([o])=>fi.preserved.includes(o)))}#n(){let o=this.fromSearchParams.signUpForceRedirectUrl||this.fromProps.signUpForceRedirectUrl||this.fromOptions.signUpForceRedirectUrl,l=this.fromSearchParams.signUpFallbackRedirectUrl||this.fromProps.signUpFallbackRedirectUrl||this.fromOptions.signUpFallbackRedirectUrl,h=this.fromSearchParams.signInForceRedirectUrl||this.fromProps.signInForceRedirectUrl||this.fromOptions.signInForceRedirectUrl,_=this.fromSearchParams.signInFallbackRedirectUrl||this.fromProps.signInFallbackRedirectUrl||this.fromOptions.signInFallbackRedirectUrl,b=this.fromSearchParams.afterSignInUrl||this.fromProps.afterSignInUrl||this.fromOptions.afterSignInUrl,x={signUpForceRedirectUrl:o,signUpFallbackRedirectUrl:l,signInFallbackRedirectUrl:_,signInForceRedirectUrl:h,afterSignInUrl:b,afterSignUpUrl:this.fromSearchParams.afterSignUpUrl||this.fromProps.afterSignUpUrl||this.fromOptions.afterSignUpUrl,redirectUrl:this.fromSearchParams.redirectUrl||this.fromProps.redirectUrl||this.fromOptions.redirectUrl};return o&&delete x.signUpFallbackRedirectUrl,h&&delete x.signInFallbackRedirectUrl,x}#a(o){var l,h;let _,b,x=`${o}ForceRedirectUrl`,A=`${o}FallbackRedirectUrl`,E=`after${o[0].toUpperCase()}${o.slice(1)}Url`;(b=this.fromSearchParams[x]||this.fromProps[x]||this.fromOptions[x])&&(_=x),(b||=this.fromSearchParams.redirectUrl)&&(_="redirectUrl"),(b||=this.fromSearchParams[A]||this.fromProps[A]||this.fromOptions[A])&&(_=A);let T=this.fromSearchParams[E]||this.fromProps[E]||this.fromProps.redirectUrl||this.fromOptions[E];return l=_,(h=b)&&T&&At(`Clerk: The "${l}" prop ("${h}") has priority over the legacy "${E}" (or "redirectUrl") ("${T}"), which will be completely ignored in this case. "${E}" (or "redirectUrl" prop) should be replaced with the new "fallbackRedirectUrl" or "forceRedirectUrl" props instead. Learn more: https://clerk.com/docs/guides/custom-redirects#redirect-url-props`),(b||=T)||this.mode!=="modal"?b||"/":window.location.href}#s(o){Of(o);let l={};return fi.keys.forEach(h=>{l[h]=o[h]}),Yf(this.#u(this.#d(Qf(l,Boolean))),h=>h.toString())}#p(o){Of(o);let l={};return fi.keys.forEach(h=>{o instanceof URLSearchParams?l[h]=o.get(on(h)):l[h]=o[on(h)]}),Yf(this.#u(this.#d(Qf(l,Boolean))),h=>h.toString())}#d(o){return Yf(o,l=>Al(l,window.location.origin))}#u=o=>Qf(o,((l,h)=>_=>{let b=_;if(typeof b=="string"&&(b=Al(b,h)),!l)return!0;let x=h===b.origin,A=!(function(E){if((function(T){if(!(function(j){if(!j)return!1;try{return new URL(j),!0}catch{return!1}})(T))return!1;let N=new URL(T).protocol;return Tf.some(j=>j===N)})(E))return!0;for(let T of Af)if(T.test(E.pathname))return!0;return!1})(b)&&(x||l.map(E=>typeof E=="string"?(T=>{try{return Sf(T)}catch(N){throw Error(`Invalid pattern: ${T}.
|
|
159
|
-
Consult the documentation of glob-to-regexp here: https://www.npmjs.com/package/glob-to-regexp.
|
|
160
|
-
${N.message}`)}})(El(E)):E).some(E=>E.test(El(b.origin))));return A||At(`Clerk: Redirect URL ${b} is not on one of the allowedRedirectOrigins, falling back to the default redirect URL.`),A})(this.options?.allowedRedirectOrigins,window.location.origin))}let Gi="__clerk_db_jwt";function Sw(m,o){let l=new URL(m),h=l.searchParams.get(Gi);l.searchParams.delete(Gi);let _=h||o;return _&&l.searchParams.set(Gi,_),l}let Iw=m=>ZO(WO(m)),ZO=m=>{let o=new URL(m);return o.searchParams.delete(Gi),o},WO=m=>{let o=new URL(m);return o.searchParams.delete("__dev_session"),o.hash=decodeURI(o.hash).replace(/__clerk_db_jwt\[(.*)\]/,""),o.href.endsWith("#")&&(o.hash=""),o};function Gl(m){for(var o=1;o<arguments.length;o++){var l=arguments[o];for(var h in l)m[h]=l[h]}return m}var eh=(function m(o,l){function h(_,b,x){if(typeof document<"u"){typeof(x=Gl({},l,x)).expires=="number"&&(x.expires=new Date(Date.now()+864e5*x.expires)),x.expires&&(x.expires=x.expires.toUTCString()),_=encodeURIComponent(_).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var A="";for(var E in x)x[E]&&(A+="; "+E,x[E]!==!0&&(A+="="+x[E].split(";")[0]));return document.cookie=_+"="+o.write(b,_)+A}}return Object.create({set:h,get:function(_){if(typeof document<"u"&&(!arguments.length||_)){for(var b=document.cookie?document.cookie.split("; "):[],x={},A=0;A<b.length;A++){var E=b[A].split("="),T=E.slice(1).join("=");try{var N=decodeURIComponent(E[0]);if(x[N]=o.read(T,N),_===N)break}catch{}}return _?x[_]:x}},remove:function(_,b){h(_,"",Gl({},b,{expires:-1}))},withAttributes:function(_){return m(this.converter,Gl({},this.attributes,_))},withConverter:function(_){return m(Gl({},this.converter,_),this.attributes)}},{attributes:{value:Object.freeze(l)},converter:{value:Object.freeze(o)}})})({read:function(m){return m[0]==='"'&&(m=m.slice(1,-1)),m.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(m){return encodeURIComponent(m).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function hi(m){return{get:()=>eh.get(m),set(o,l={}){eh.set(m,o,l)},remove(o){eh.remove(m,o)}}}let Hl=m=>window.location.protocol==="https:"||m==="None"&&window.safari===void 0&&(window.isSecureContext!==void 0?window.isSecureContext:window.location.hostname==="localhost");function th(m,o){let l=(function(h){try{return new Date(h||new Date)}catch{return new Date}})(m);return l.setFullYear(l.getFullYear()+o),l}let VO=hi("__clerk_test_etld"),Tw="__client_uat",Ew="__session",Aw=()=>{let m=Cf()?"None":"Lax",o=Hl(m);return{sameSite:m,secure:o,partitioned:!1}};async function qO(m){let o;try{o=await mn(m)}catch(h){var l;l=`Suffixed cookie failed due to ${h.message} (secure-context: ${window.isSecureContext}, url: ${window.location.href})`,Br.has(l)||(console.log(l),Br.add(l));let{default:_}=await s.e("199").then(s.t.bind(s,394,23)),{default:b}=await s.e("199").then(s.t.bind(s,7202,23)),x=_(m);o=b.stringify(x).replace(/\+/gi,"-").replace(/\//gi,"_").substring(0,8)}return o}let Pw=()=>{let m=Cf()?"None":"Lax",o=Hl(m);return{sameSite:m,secure:o}};var JO=s(2788),KO=s.n(JO);class GO{lock=(function(o){let l=new(KO());return window.addEventListener("beforeunload",async()=>{await l.releaseLock(o)}),{acquireLockAndRun:async h=>{if("locks"in navigator&&isSecureContext){let _=new AbortController,b=setTimeout(()=>_.abort(),4999);return await navigator.locks.request(o,{signal:_.signal},async()=>(clearTimeout(b),await h())).catch(()=>!1)}if(await l.acquireLock(o,5e3))try{return await h()}finally{await l.releaseLock(o)}}}})("clerk.lock.refreshSessionToken");workerTimers=Df();timerId=null;initiated=!1;startPollingForSessionToken(o){if(this.timerId||this.initiated)return;let l=async()=>{this.initiated=!0,await this.lock.acquireLockAndRun(o),this.timerId=this.workerTimers.setTimeout(l,5e3)};l()}stopPollingForSessionToken(){this.timerId!=null&&(this.workerTimers.clearTimeout(this.timerId),this.timerId=null),this.initiated=!1}}class rh{clerk;instanceType;clerkEventBus;poller=null;clientUat;sessionCookie;activeCookie;devBrowser;static async create(o,l,h,_){let b=await qO(o.publishableKey),x=new rh(o,l,b,h,_);return await x.setup(),x}constructor(o,l,h,_,b){this.clerk=o,this.instanceType=_,this.clerkEventBus=b,xt.on(Zo,({token:x})=>{this.updateSessionCookie(x&&x.getRawString()),this.setClientUatCookieForDevelopmentInstances()}),xt.on(ya,()=>this.handleSignOut()),this.refreshTokenOnFocus(),this.startPollingForToken(),this.clientUat=(x=>{let A=hi(Tw),E=hi(gn(Tw,x));return{set:T=>{let N=th(Date.now(),1),j=Cf()?"None":"Strict",B=Hl(j),K=(function(ae=window.location.hostname,pe=VO){if(c)return c;if(["localhost","127.0.0.1","0.0.0.0"].includes(ae))return ae;let Q=ae.split(".");if(Q.length===1)return ae;for(let he=Q.length-2;he>=0;he--){let ke=Q.slice(he).join(".");if(pe.set("1",{domain:ke}),pe.get()==="1")return pe.remove({domain:ke}),c=ke,ke;pe.remove({domain:ke})}})(),G="0";T&&T.updatedAt&&T.signedInSessions.length>0&&(G=Math.floor(T.updatedAt.getTime()/1e3).toString()),E.remove(),A.remove(),E.set(G,{domain:K,expires:N,partitioned:!1,sameSite:j,secure:B}),A.set(G,{domain:K,expires:N,partitioned:!1,sameSite:j,secure:B})},get:()=>parseInt(E.get()||A.get()||"0",10)}})(h),this.sessionCookie=(x=>{let A=hi(Ew),E=hi(gn(Ew,x)),T=()=>{let N=Aw();A.remove(N),E.remove(N)};return{set:N=>{let j=th(Date.now(),1),{sameSite:B,secure:K,partitioned:G}=Aw();G&&T(),A.set(N,{expires:j,sameSite:B,secure:K,partitioned:G}),E.set(N,{expires:j,sameSite:B,secure:K,partitioned:G})},remove:T,get:()=>E.get()||A.get()}})(h),this.activeCookie=(()=>{let x=hi("clerk_active_context"),A={secure:Hl("None")};return{set:E=>{x.set(E,A)},get:()=>x.get(),remove:()=>x.remove(A)}})(),this.devBrowser=(function({cookieSuffix:x,frontendApi:A,fapiClient:E}){let T=(K=>{let G=hi(Gi),ae=hi(gn(Gi,K));return{get:()=>ae.get()||G.get(),set:pe=>{let Q=th(Date.now(),1),{sameSite:he,secure:ke}=Pw();ae.set(pe,{expires:Q,sameSite:he,secure:ke}),G.set(pe,{expires:Q,sameSite:he,secure:ke})},remove:()=>{let pe=Pw();ae.remove(pe),G.remove(pe)}}})(x);function N(){return T.get()}function j(K){T.set(K)}function B(){T.remove()}return{clear:function(){B()},setup:async function(){if(!Ef(A))return;E.onBeforeRequest(Q=>{let he=N();he&&Q?.url&&(Q.url=Sw(Q.url,he))}),E.onAfterResponse((Q,he)=>{let ke=he?.headers?.get("Clerk-Db-Jwt");ke&&j(ke)});let K=(function(Q){let he=Q.searchParams.get(Gi)||"";return Iw(Q).href!==Q.href&&globalThis.history!==void 0&&globalThis.history.replaceState(null,"",Iw(Q)),he})(new URL(window.location.href));if(K)return void j(K);if(T.get())return;let G=E.buildUrl({path:"/dev_browser"}),ae=await fetch(G.toString(),{method:"POST"});if(!ae.ok){let Q=(function(he=[]){return he.length>0?he.map(ke=>new Y(ke)):[]})((await ae.json()).errors);Q[0]?Dx(Q[0].longMessage):Dx()}let pe=await ae.json();j(pe?.id)},getDevBrowserJWT:N,setDevBrowserJWT:j,removeDevBrowserJWT:B}})({frontendApi:o.frontendApi,fapiClient:l,cookieSuffix:h})}async setup(){return this.instanceType==="production"?this.setupProduction():this.setupDevelopment()}isSignedOut(){return this.clerk.loaded?!!this.clerk.user:0>=this.clientUat.get()}async handleUnauthenticatedDevBrowser(){this.devBrowser.clear(),await this.devBrowser.setup()}decorateUrlWithDevBrowserToken(o){let l=this.devBrowser.getDevBrowserJWT();if(!l)throw Error(`${Mt} Missing dev browser jwt. Please contact support.`);return Sw(o,l)}async setupDevelopment(){await this.devBrowser.setup()}setupProduction(){this.devBrowser.clear()}startPollingForToken(){this.poller||(this.poller=new GO,this.poller.startPollingForSessionToken(()=>this.refreshSessionToken()))}stopPollingForToken(){this.poller&&(this.poller.stopPollingForSessionToken(),this.poller=null)}refreshTokenOnFocus(){window.addEventListener("focus",()=>{document.visibilityState==="visible"&&this.refreshSessionToken({updateCookieImmediately:!0})})}async refreshSessionToken({updateCookieImmediately:o=!1}={}){if(this.clerk.session)try{let l=await this.clerk.session.getToken();o&&this.updateSessionCookie(l)}catch(l){return this.handleGetTokenError(l)}}updateSessionCookie(o){if(document.hasFocus()||this.isCurrentContextActive())return o||I()||Ve.warn("Removing session cookie (offline)",{sessionId:this.clerk.session?.id},"authCookieService"),this.setActiveContextInStorage(),o?this.sessionCookie.set(o):this.sessionCookie.remove()}setClientUatCookieForDevelopmentInstances(){this.instanceType!=="production"&&this.inCustomDevelopmentDomain()&&this.clientUat.set(this.clerk.client)}inCustomDevelopmentDomain(){let o=this.clerk.frontendApi.replace("clerk.","");return!window.location.host.endsWith(o)}handleGetTokenError(o){if(Ce(o)||ve(o)||(`${o.message}${o.name}`||"").toLowerCase().replace(/\s+/g,"").includes("networkerror")){if(ce(o))return void this.clerk.handleUnauthenticated().catch(pr);this.clerkEventBus.emit(M,"degraded")}}handleSignOut(){this.activeCookie.remove(),this.sessionCookie.remove(),this.setClientUatCookieForDevelopmentInstances()}setActiveContextInStorage(){let o=this.clerk.session?.id||"",l=this.clerk.organization?.id||"",h=`${o}:${l}`;h!==":"?this.activeCookie.set(h):this.activeCookie.remove()}isCurrentContextActive(){let o=this.activeCookie.get();if(!o)return!0;let[l,h]=o.split(":"),_=this.clerk.session?.id||"",b=this.clerk.organization?.id||"";return l===_&&h===b}getSessionCookie(){return this.sessionCookie.get()}}class HO{clerk;captchaChallenge;timers;constructor(o,l=new Ml(o),h=Df()){this.clerk=o,this.captchaChallenge=l,this.timers=h}async start(){this.isEnabled()&&(await this.challengeAndSend(),this.timers.setInterval(()=>{this.challengeAndSend()},this.intervalInMs()))}async challengeAndSend(){if(!(!this.clerk.client||this.clientBypass()))try{let o=await this.captchaChallenge.invisible({action:"heartbeat"});await this.clerk.client.__internal_sendCaptchaToken(o)}catch{}}isEnabled(){return!!this.clerk.__unstable__environment?.displayConfig?.captchaHeartbeat}clientBypass(){return this.clerk.client?.captchaBypass}intervalInMs(){return this.clerk.__unstable__environment?.displayConfig?.captchaHeartbeatIntervalMs??6e5}}let XO=["/client","/waitlist"];class YO{async getBaseFapiProxyOptions(){let o=await J.clerk.session?.getToken();if(!o)throw new ye("No valid session token available",{code:"no_session_token"});return{pathPrefix:"",headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json"},credentials:"same-origin"}}async getAll(o){return J._fetch({...await this.getBaseFapiProxyOptions(),method:"GET",path:"/api_keys",search:Ur({...o,subject:o?.subject??J.clerk.organization?.id??J.clerk.user?.id??"",query:o?.query??""})}).then(l=>{let{data:h,total_count:_}=l;return{total_count:_,data:h.map(b=>new Xf(b))}})}async create(o){return new Xf(await J._fetch({...await this.getBaseFapiProxyOptions(),path:"/api_keys",method:"POST",body:JSON.stringify({type:"api_key",name:o.name,subject:o.subject??J.clerk.organization?.id??J.clerk.user?.id??"",description:o.description,seconds_until_expiration:o.secondsUntilExpiration})}))}async revoke(o){return new Xf(await J._fetch({...await this.getBaseFapiProxyOptions(),method:"POST",path:`/api_keys/${o.apiKeyID}/revoke`,body:JSON.stringify({revocation_reason:o.revocationReason})}))}}let Ia={cache:new Map,listeners:new Map,pendingOperations:new Map,safeGet:(o,l)=>(l.has(o)||l.set(o,new Set),l.get(o)),safeGetOperations(o){return this.pendingOperations.has(o)||this.pendingOperations.set(o,new Map),this.pendingOperations.get(o)}},Cw="completed";function Ow(m){let o=m.isStarting||m.isConfirming?"fetching":m.error?"error":"idle",l=m.checkout?.status===Cw?Cw:m.checkout?"needs_confirmation":"needs_initialization";return{...m,fetchStatus:o,status:l}}let Uw=Object.freeze(Ow({isStarting:!1,isConfirming:!1,error:null,checkout:null}));class QO{#r=!1;load(o){let l=o?.protectConfig;if(l?.loaders&&Array.isArray(l.loaders)&&l.loaders.length!==0&&!this.#r&&f())for(let h of(this.#r=!0,l.loaders))try{this.applyLoader(h)}catch(_){At(`[protect] failed to apply loader: ${_}`)}}applyLoader(o){if(o.rollout!==void 0){let b=o.rollout;if(typeof b!="number"||b<0)return void At(`[protect] loader rollout value is invalid: ${b}`);if(b===0||Math.random()>b)return}let l=o.type||"script",h=o.target||"body",_=document.createElement(l);if(o.attributes)for(let[b,x]of Object.entries(o.attributes))switch(typeof x){case"string":case"number":case"boolean":_.setAttribute(b,String(x));break;default:At(`[protect] loader attribute is invalid type: ${b}=${x}`)}switch(o.textContent&&typeof o.textContent=="string"&&(_.textContent=o.textContent),h){case"head":document.head.appendChild(_);break;case"body":document.body.appendChild(_);break;default:if(h?.startsWith("#")){let b=document.getElementById(h.substring(1));if(!b)return void At(`[protect] loader target element not found: ${h}`);b.appendChild(_);return}At(`[protect] loader target is invalid: ${h}`)}}}let e2={"choose-organization":"choose-organization"},zw=m=>`/tasks/${e2[m.key]}`;function Nw(m,{navigate:o,baseUrl:l}){let h=m.currentTask;if(h)return o((function(_,b){let x=Ro();return Rt({base:b.base,hashPath:zw(_),searchParams:x},{stringify:!0})})(h,{base:l}))}(ee=fe||(fe={}))[ee.None=0]="None",ee[ee.Mutable=1]="Mutable",ee[ee.Watching=2]="Watching",ee[ee.RecursedCheck=4]="RecursedCheck",ee[ee.Recursed=8]="Recursed",ee[ee.Dirty=16]="Dirty",ee[ee.Pending=32]="Pending";let nh=[],{link:Ta,unlink:ih,propagate:t2,checkDirty:Rw,endTracking:Dw,startTracking:jw,shallowPropagate:Lw}=(function({update:m,notify:o,unwatched:l}){let h=0;return{link:function(x,A){let E,T=A.depsTail;if(T!==void 0&&T.dep===x)return;if(4&A.flags&&(E=T!==void 0?T.nextDep:A.deps)!==void 0&&E.dep===x){E.version=h,A.depsTail=E;return}let N=x.subsTail;if(N!==void 0&&N.version===h&&N.sub===A)return;let j=A.depsTail=x.subsTail={version:h,dep:x,sub:A,prevDep:T,nextDep:E,prevSub:N,nextSub:void 0};E!==void 0&&(E.prevDep=j),T!==void 0?T.nextDep=j:A.deps=j,N!==void 0?N.nextSub=j:x.subs=j},unlink:_,propagate:function(x){let A,E=x.nextSub;e:for(;;){let T=x.sub,N=T.flags;if(3&N&&(60&N?12&N?4&N?!(48&N)&&(function(j,B){let K=B.depsTail;if(K!==void 0){let G=B.deps;do{if(G===j)return!0;if(G===K)break;G=G.nextDep}while(G!==void 0)}return!1})(x,T)?(T.flags=40|N,N&=1):N=0:T.flags=-9&N|32:N=0:T.flags=32|N,2&N&&o(T),1&N)){let j=T.subs;if(j!==void 0){x=j,j.nextSub!==void 0&&(A={value:E,prev:A},E=x.nextSub);continue}}if((x=E)!==void 0){E=x.nextSub;continue}for(;A!==void 0;)if(x=A.value,A=A.prev,x!==void 0){E=x.nextSub;continue e}break}},checkDirty:function(x,A){let E,T=0;e:for(;;){let N=x.dep,j=N.flags,B=!1;if(16&A.flags)B=!0;else if((17&j)==17){if(m(N)){let K=N.subs;K.nextSub!==void 0&&b(K),B=!0}}else if((33&j)==33){(x.nextSub!==void 0||x.prevSub!==void 0)&&(E={value:x,prev:E}),x=N.deps,A=N,++T;continue}if(!B&&x.nextDep!==void 0){x=x.nextDep;continue}for(;T;){--T;let K=A.subs,G=K.nextSub!==void 0;if(G?(x=E.value,E=E.prev):x=K,B){if(m(A)){G&&b(K),A=x.sub;continue}}else A.flags&=-33;if(A=x.sub,x.nextDep!==void 0){x=x.nextDep;continue e}B=!1}return B}},endTracking:function(x){let A=x.depsTail,E=A!==void 0?A.nextDep:x.deps;for(;E!==void 0;)E=_(E,x);x.flags&=-5},startTracking:function(x){++h,x.depsTail=void 0,x.flags=-57&x.flags|4},shallowPropagate:b};function _(x,A=x.sub){let E=x.dep,T=x.prevDep,N=x.nextDep,j=x.nextSub,B=x.prevSub;return N!==void 0?N.prevDep=T:A.depsTail=T,T!==void 0?T.nextDep=N:A.deps=N,j!==void 0?j.prevSub=B:E.subsTail=B,B!==void 0?B.nextSub=j:(E.subs=j)===void 0&&l(E),N}function b(x){do{let A=x.sub,E=x.nextSub,T=A.flags;(48&T)==32&&(A.flags=16|T,2&T&&o(A)),x=E}while(x!==void 0)}})({update:m=>"getter"in m?Fw(m):Mw(m,m.value),notify:function m(o){let l=o.flags;if(!(64&l)){o.flags=64|l;let h=o.subs;h!==void 0?m(h.sub):nh[oh++]=o}},unwatched(m){if("getter"in m){let o=m.deps;if(o!==void 0){m.flags=17;do o=ih(o,m);while(o!==void 0)}}else"previousValue"in m||Bw.call(m)}}),Xl=0,oh=0;function Jo(m){let o=u;return u=m,o}function Ko(m){return i2.bind({previousValue:m,value:m,subs:void 0,subsTail:void 0,flags:1})}function sh(m){return n2.bind({value:void 0,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:17,getter:m})}function r2(m){let o={fn:m,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:2};u!==void 0?Ta(o,u):p!==void 0&&Ta(o,p);let l=Jo(o);try{o.fn()}finally{Jo(l)}return Bw.bind(o)}function Fw(m){let o=Jo(m);jw(m);try{let l=m.value;return l!==(m.value=m.getter(l))}finally{Jo(o),Dw(m)}}function Mw(m,o){return m.flags=1,m.previousValue!==(m.previousValue=o)}function n2(){let m=this.flags;if(16&m||32&m&&Rw(this.deps,this)){if(Fw(this)){let o=this.subs;o!==void 0&&Lw(o)}}else 32&m&&(this.flags=-33&m);return u!==void 0?Ta(this,u):p!==void 0&&Ta(this,p),this.value}function i2(...m){if(m.length){let o=m[0];if(this.value!==(this.value=o)){this.flags=17;let l=this.subs;l!==void 0&&(t2(l),(function(){for(;Xl<oh;){let h=nh[Xl];nh[Xl++]=void 0,(function _(b,x){if(16&x||32&x&&Rw(b.deps,b)){let E=Jo(b);jw(b);try{b.fn()}finally{Jo(E),Dw(b)}return}32&x&&(b.flags=-33&x);let A=b.deps;for(;A!==void 0;){let E=A.dep,T=E.flags;64&T&&_(E,E.flags=-65&T),A=A.nextDep}})(h,h.flags&=-65)}Xl=0,oh=0})())}}else{let o=this.value;if(16&this.flags&&Mw(this,o)){let l=this.subs;l!==void 0&&Lw(l)}return u!==void 0&&Ta(this,u),o}}function Bw(){let m=this.deps;for(;m!==void 0;)m=ih(m,this);let o=this.subs;o!==void 0&&ih(o),this.flags=0}let Zw=Ko({resource:null}),Ww=Ko({error:null}),Vw=Ko({status:"idle"}),o2=sh(()=>{let m=Zw().resource,o=Ww().error,l=Vw().status;return{errors:Gw(o,{identifier:null,password:null,code:null}),fetchStatus:l,signIn:m?m.__internal_future:null}}),qw=Ko({resource:null}),Jw=Ko({error:null}),Kw=Ko({status:"idle"}),s2=sh(()=>{let m=qw().resource,o=Jw().error,l=Kw().status;return{errors:Gw(o,{firstName:null,lastName:null,emailAddress:null,phoneNumber:null,password:null,username:null,code:null,captcha:null,legalAccepted:null}),fetchStatus:l,signUp:m?m.__internal_future:null}});function Gw(m,o){let l={fields:{...o},raw:null,global:null};return m&&(Ce(m)?m.errors.some(h=>"meta"in h&&h.meta&&"paramName"in h.meta)?m.errors.forEach(h=>{if(l.raw?l.raw.push(h):l.raw=[h],"meta"in h&&h.meta&&"paramName"in h.meta){let _=$o(h.meta.paramName);_ in l.fields&&(l.fields[_]=h)}}):(l.raw=[m],l.global=[ur(m)]):(l.raw=[m],l.global=[ur(m)])),l}class a2{signInResourceSignal=Zw;signInErrorSignal=Ww;signInFetchSignal=Vw;signInSignal=o2;signUpResourceSignal=qw;signUpErrorSignal=Jw;signUpFetchSignal=Kw;signUpSignal=s2;__internal_effect=r2;__internal_computed=sh;constructor(){xt.on("resource:update",this.onResourceUpdated),xt.on("resource:error",this.onResourceError),xt.on("resource:fetch",this.onResourceFetch)}onResourceError=o=>{o.resource instanceof _t&&this.signInErrorSignal({error:o.error}),o.resource instanceof wt&&this.signUpErrorSignal({error:o.error})};onResourceUpdated=o=>{o.resource instanceof _t&&this.signInResourceSignal({resource:o.resource}),o.resource instanceof wt&&this.signUpResourceSignal({resource:o.resource})};onResourceFetch=o=>{o.resource instanceof _t&&this.signInFetchSignal({status:o.status}),o.resource instanceof wt&&this.signUpFetchSignal({status:o.status})}}let ah=m=>`\u{1F512} Clerk:
|
|
161
|
-
${m.trim()}
|
|
162
|
-
(This notice only appears in development)`,kt={cannotRenderComponentWhenSessionExists:"The <SignUp/> and <SignIn/> components cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the Home URL instead.",cannotRenderSignUpComponentWhenSessionExists:"The <SignUp/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the value set in `afterSignUp` URL instead.",cannotRenderSignUpComponentWhenTaskExists:"The <SignUp/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenTaskDoesNotExist:"<TaskChooseOrganization/> cannot render unless a session task is pending. Clerk is redirecting to the value set in `redirectUrlComplete` instead.",cannotRenderSignInComponentWhenSessionExists:"The <SignIn/> component cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the `afterSignIn` URL instead.",cannotRenderSignInComponentWhenTaskExists:"The <SignIn/> component cannot render when a user has a pending task, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the task instead.",cannotRenderComponentWhenUserDoesNotExist:"<UserProfile/> cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotRenderComponentWhenOrgDoesNotExist:"<OrganizationProfile/> cannot render unless an organization is active. Since no organization is currently active, this is no-op.",cannotRenderAnyOrganizationComponent:m=>ah(`The <${m}/> cannot be rendered when the feature is turned off. Visit 'dashboard.clerk.com' to enable the feature. Since the feature is turned off, this is no-op.`),cannotRenderAnyBillingComponent:m=>ah(`The <${m}/> component cannot be rendered when billing is disabled. Visit 'https://dashboard.clerk.com/last-active?path=billing/settings' to follow the necessary steps to enable billing. Since billing is disabled, this is no-op.`),cannotOpenUserProfile:"The UserProfile modal cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenCheckout:"The Checkout drawer cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenSignInOrSignUp:"The SignIn or SignUp modals do not render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, this is no-op.",cannotRenderAPIKeysComponent:"The <APIKeys/> component cannot be rendered when API keys are disabled. Since API keys are disabled, this is no-op.",cannotRenderAPIKeysComponentForUserWhenDisabled:"The <APIKeys/> component cannot be rendered when user API keys are disabled. Since user API keys are disabled, this is no-op.",cannotRenderAPIKeysComponentForOrgWhenDisabled:"The <APIKeys/> component cannot be rendered when organization API keys are disabled. Since organization API keys are disabled, this is no-op."};for(let m of Object.keys(kt)){let o=kt[m];typeof o!="function"&&(kt[m]=ah(o))}let ch="cannot_render_billing_disabled",Yl="cannot_render_user_missing",Hi="cannot_render_organizations_disabled",Hw="cannot_render_organization_missing",Xw="cannot_render_single_session_enabled",c2={polling:!0,standardBrowser:!0,touchSession:!0,isSatellite:!1,signInUrl:void 0,signUpUrl:void 0,afterSignOutUrl:void 0,signInFallbackRedirectUrl:void 0,signUpFallbackRedirectUrl:void 0,signInForceRedirectUrl:void 0,signUpForceRedirectUrl:void 0,newSubscriptionRedirectUrl:void 0};class Dt{static mountComponentRenderer;static version="5.109.2";static sdkMetadata={name:"@clerk/clerk-js",version:"5.109.2"};static _billing;static _apiKeys;_checkout;client;session;organization;user;__internal_country;telemetry;__internal_state=new a2;internal_last_error=null;environment;#r;#i="";#n;#a;#s;#p;#d;#u=null;#e;#c;#o;#g="loading";#f=[];#h=[];#t={};#b=null;#x=0;#l=Z();get __internal_queryClient(){return this.#r||s.e("437").then(s.bind(s,1522)).then(o=>o.QueryClient).then(o=>{this.#r||(this.#r=new o,this.#l.emit("queryClientStatus","ready"))}),this.#r?{__tag:"clerk-rq-client",client:this.#r}:void 0}__internal_getCachedResources;__internal_createPublicCredentials;__internal_getPublicCredentials;__internal_isWebAuthnSupported;__internal_isWebAuthnAutofillSupported;__internal_isWebAuthnPlatformAuthenticatorSupported;__internal_setActiveInProgress=!1;get publishableKey(){return this.#i}get version(){return Dt.version}set sdkMetadata(o){Dt.sdkMetadata=o}get sdkMetadata(){return Dt.sdkMetadata}get loaded(){return this.status==="degraded"||this.status==="ready"}get status(){return this.#g}get isSatellite(){return!!Kt()&&Bi(this.#t.isSatellite,new URL(window.location.href),!1)}get domain(){if(Kt()){let o=(function(l=""){return(l||"").replace(/^.+:\/\//,"")})(Bi(this.#n,new URL(window.location.href)));if(this.#o==="production"){let l;if(!o)return"";if(o.match(/^(clerk\.)+\w*$/))l=/(clerk\.)*(?=clerk\.)/;else{if(o.match(/\.clerk.accounts/))return o;l=/^(clerk\.)*/gi}return`clerk.${o.replace(l,"")}`}return o}return""}get proxyUrl(){if(Kt()){let o=Bi(this.#a,new URL(window.location.href));return!o||wo(o)||ko(o)||ci.throwInvalidProxyUrl({url:o}),o?ko(o)?new URL(o,window.location.origin).toString():o:""}return""}get frontendApi(){let o=Nt(this.publishableKey);return o?o.frontendApi:ci.throwInvalidPublishableKeyError({key:this.publishableKey})}get instanceType(){return this.#o}get isStandardBrowser(){return this.#t.standardBrowser||!1}get billing(){return Dt._billing||(Dt._billing=new Gt),Dt._billing}get apiKeys(){return Dt._apiKeys||(Dt._apiKeys=new YO),Dt._apiKeys}__experimental_checkout(o){return this._checkout||(this._checkout=l=>(function(h,_){let{for:b,planId:x,planPeriod:A}=_;if(!h.isSignedIn||!h.user)throw Error("Clerk: User is not authenticated");if(b==="organization"&&!h.organization)throw Error("Clerk: Use `setActive` to set the organization");let E=(function(T){let N=Ia.safeGet(T,Ia.listeners),j=Ia.safeGetOperations(T),B=()=>Ia.cache.get(T)||Uw,K=G=>{let ae=Ow({...B(),...G});Ia.cache.set(T,Object.freeze(ae)),N.forEach(pe=>pe(B()))};return{subscribe:G=>(N.add(G),()=>{N.delete(G)}),getCacheState:B,async executeOperation(G,ae){let pe=`${T}-${G}`,Q=G==="start"?"isStarting":"isConfirming",he=j.get(pe);if(he)return await he;let ke=(async()=>{let Fe=null,ft=null;try{K({[Q]:!0,error:null,...G==="start"?{checkout:null}:{}});let Oe=await ae();K({[Q]:!1,error:null,checkout:Oe}),Fe=Oe}catch(Oe){ft=Oe,K({[Q]:!1,error:Oe})}finally{j.delete(pe)}return{data:Fe,error:ft}})();return j.set(pe,ke),ke},clearCheckout(){j.size===0&&K(Uw)}}})((function(T){let{userId:N,orgId:j,planId:B,planPeriod:K}=T;return`${N}-${j||"user"}-${B}-${K}`})({userId:h.user.id,orgId:b==="organization"?h.organization?.id:void 0,planId:x,planPeriod:A}));return{start:async()=>E.executeOperation("start",async()=>await h.billing?.startCheckout({...b==="organization"?{orgId:h.organization?.id}:{},planId:x,planPeriod:A})),confirm:async T=>E.executeOperation("confirm",async()=>{let N=E.getCacheState().checkout;if(!N)throw Error("Clerk: Call `start` before `confirm`");return N.confirm(T)}),finalize:T=>{let{navigate:N}=T||{};return h.setActive({session:h.session?.id,navigate:N})},clear:()=>E.clearCheckout(),subscribe:T=>E.subscribe(T),getState:E.getCacheState}})(this,l)),this._checkout(o)}__internal_getOption(o){return this.#t[o]}get isSignedIn(){return this?.session?.status!=="pending"&&!!this.session}constructor(o,l){if(!(o=(o||"").trim()))return ci.throwMissingPublishableKeyError();let h=Nt(o);if(!h)return ci.throwInvalidPublishableKeyError({key:o});this.#n=l?.domain,this.#a=l?.proxyUrl,this.environment=Zr.getInstance(),this.#o=h.instanceType,this.#i=o,this.#c=(function(_){let b=[],x=[];async function A(B){for await(let K of[typeof window<"u"&&window.__unstable__onBeforeRequest,...b].filter(G=>G))if(await K(B)===!1)return!1;return!0}async function E(B,K){for await(let G of[typeof window<"u"&&window.__unstable__onAfterResponse,...x].filter(ae=>ae))if(await G(B,K)===!1)return!1;return!0}function T({method:B,path:K,sessionId:G,search:ae,rotatingTokenNonce:pe}){let Q=new URLSearchParams(ae);return Q.append("__clerk_api_version","2025-11-10"),Q.append("_clerk_js_version","5.109.2"),pe&&Q.append("rotating_token_nonce",pe),_.domain&&_.instanceType==="development"&&_.isSatellite&&Q.append("__domain",_.domain),B&&B!=="GET"&&B!=="POST"&&Q.append("_method",B),K&&!XO.some(he=>K.startsWith(he))&&G&&Q.append("_clerk_session_id",G),Sl([...Q.entries()].reduce((he,[ke,Fe])=>(he[ke]=Fe.includes(",")?Fe.split(","):Fe,he),{}))}function N(B){let{path:K,pathPrefix:G="v1"}=B;if(_.proxyUrl){let pe=new URL(_.proxyUrl),Q=pe.pathname.slice(1);return Q.endsWith("/")&&(Q=Q.slice(0,-1)),Rt({base:pe.origin,pathname:`${Q}/${G}${K}`,search:T(B)},{stringify:!1})}let ae=_.instanceType==="production"?_.domain:"";return Rt({base:`https://${ae||_.frontendApi}`,pathname:`${G}${K}`,search:T(B)},{stringify:!1})}async function j(B,K){let G,ae={...B},{method:pe="GET",body:Q}=ae;!Q||typeof Q!="object"||Q instanceof FormData||(ae.body=(function(qe){if(!qe||typeof qe!="object"||Object.getPrototypeOf(qe)!==Object.prototype)return qe;let Je={};for(let[We,vt]of Object.entries(qe))vt!==void 0&&(Je[We]=vt);return Je})(Q)),ae.url=N({...ae,sessionId:_.getSessionId()}),ae.headers=new Headers(ae.headers),pe==="GET"||Q instanceof FormData||ae.headers.has("content-type")||ae.headers.set("content-type","application/x-www-form-urlencoded"),ae.headers.get("content-type")==="application/x-www-form-urlencoded"&&(ae.body=Q&&Sl(Q,{keyEncoder:on}));let he=await A(ae),ke=pe==="GET"?"GET":"POST",Fe=ae.url,ft={...ae,method:ke,credentials:ae.credentials||"include"};try{if(he){let qe=K?.fetchMaxTries??(k()?4:11);G=await Ll(()=>fetch(Fe,ft),{retryImmediately:!0,initialDelay:700,maxDelayBetweenRetries:5e3,shouldRetry:(Je,We)=>ke==="GET"&&We<qe,onBeforeRetry:Je=>{Fe.searchParams.set("_clerk_retry_attempt",Je.toString())}})}else G=new Response("{}",ae)}catch(qe){let Je=Fe.toString();throw Ve.error("network error",{error:qe,url:Je,method:pe},"fapiClient"),Error(`${Mt} Network error at "${Je}" - ${qe}. Please try again.`)}let Oe=G.status!==204?await G.json():null,Te=Object.assign(G,{payload:Oe});return G.ok||Ve.error("request failed",{method:pe,path:ae.path,status:G.status},"fapiClient"),await E(ae,Te),Te}return{buildEmailAddress:function(B){return(function({localPart:K,frontendApi:G}){let ae=G?G.replace("clerk.",""):"clerk.com";return`${K}@${ae}`})({localPart:B,frontendApi:_.frontendApi})},buildUrl:N,onAfterResponse:function(B){x.push(B)},onBeforeRequest:function(B){b.push(B)},request:j}})({domain:this.domain,frontendApi:this.frontendApi,instanceType:this.instanceType,isSatellite:this.isSatellite,getSessionId:()=>this.session?.id,proxyUrl:this.proxyUrl}),this.#l.emit(M,"loading"),this.#l.prioritizedOn(M,_=>this.#g=_),J.clerk=this,this.#p=new QO}getFapiClient=()=>this.#c;load=async o=>{if(Ve.info("load() start",{},"clerk"),!this.loaded){if(this.#o==="development"&&At("Clerk: Clerk has been loaded with development keys. Development instances have strict usage limits and should not be used when deploying your application to production. Learn more: https://clerk.com/docs/deployments/overview"),this.#t=this.#S(o),this.#o==="development"&&(this.#t.routerPush||this.#t.routerReplace)&&(!this.#t.routerPush||!this.#t.routerReplace)){let l=this.#t.routerPush?"routerReplace":"routerPush";At(`Clerk: Both \`routerPush\` and \`routerReplace\` need to be defined, but \`${l}\` is not defined. This may cause issues with navigation in your application.`)}xt.on(sw,()=>{this.#_(this.session),this.#m()}),Of(this.#t),this.#t.sdkMetadata&&(Dt.sdkMetadata=this.#t.sdkMetadata),this.#t.telemetry!==!1&&(this.telemetry=new ia({clerkVersion:Dt.version,samplingRate:1,perEventSampling:!this.#t.__internal_keyless_claimKeylessApplicationUrl&&void 0,publishableKey:this.publishableKey,...this.#t.telemetry}),this.#t.appearance&&this.telemetry.record({event:"THEME_USAGE",eventSamplingRate:1,payload:(function(l){let h;if(!l||typeof l!="object")return{};let _=l.theme||l.baseTheme;if(!_)return{};if(Array.isArray(_))for(let b of _){let x=Co(b);if(x){h=x;break}}else h=Co(_);return{themeName:h}})(this.#t.appearance)}));try{this.#t.standardBrowser?await this.#z():await this.#N();let l=this.#t.telemetry,h=l!==!1&&!l?.disabled,_=!!this.#t.__internal_keyless_claimKeylessApplicationUrl,b=!!this.environment?.clientDebugMode,x=this.environment?.isProduction?.()??!1,A=b||_&&!x,E=_&&!b?"error":void 0;A&&(function(T={}){if(Oo)return;let{enabled:N=!1,...j}=T;N&&(Zi=!0,Oo=!0,aa(j))})({enabled:!0,...E?{logLevel:E}:{},...h&&this.telemetry?{telemetryCollector:this.telemetry}:{}}),this.#p?.load(this.environment),Ve.info("load() complete",{},"clerk")}catch(l){throw this.#l.emit(M,"error"),Ve.error("load() failed",{error:l},"clerk"),l}}};#v(){let o;return!!(!this.#t.signUpUrl&&this.#t.signInUrl&&(o=this.#t.signInUrl,!sa.test(o)))}signOut=async(o,l)=>{if(!this.client||this.client.sessions.length===0)return;let h=typeof window<"u"&&typeof window.__unstable__onBeforeSetActive=="function"?window.__unstable__onBeforeSetActive:pr,_=typeof window<"u"&&typeof window.__unstable__onAfterSetActive=="function"?window.__unstable__onAfterSetActive:pr,b=o&&typeof o=="object"?o:l||{},x=b?.redirectUrl||this.buildAfterSignOutUrl();Ve.debug("signOut() start",{hasClient:!!this.client,multiSessionCount:this.client?.signedInSessions.length??0,redirectUrl:x,sessionTarget:b?.sessionId??null},"clerk");let A=typeof o=="function"?o:void 0,E=async()=>{let j=Uo(this.#t.standardBrowser);xt.emit(ya,null),this.#y(),await j.track(async()=>{A?await A():await this.navigate(x)}),j.isUnloading()||(this.#_(),this.#m(),await _())};if(await h(),!b.sessionId||this.client.signedInSessions.length===1){this.#t.experimental?.persistClient??!0?await this.client.removeSessions():await this.client.destroy(),await E(),Ve.info("signOut() complete",{redirectUrl:ua(x)},"clerk");return}let T=this.client.signedInSessions.find(j=>j.id===b.sessionId),N=T?.id&&this.session?.id===T.id;await T?.remove(),N&&(await E(),Ve.info("signOut() complete",{redirectUrl:ua(x)},"clerk"))};openGoogleOneTap=o=>{let l="GoogleOneTap";this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:l}).then(h=>h.openModal("googleOneTap",o||{})),this.telemetry?.record(Or(l,o))};closeGoogleOneTap=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("googleOneTap"))};openSignIn=o=>{if(this.assertComponentsReady(this.#e),Do(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotOpenSignInOrSignUp,{code:Xw});return}let l="SignIn";this.#e.ensureMounted({preloadHint:l}).then(_=>_.openModal("signIn",o||{}));let h={withSignUp:o?.withSignUp??this.#v()};this.telemetry?.record(Or(l,o,h))};closeSignIn=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("signIn"))};__internal_openCheckout=o=>{if(this.assertComponentsReady(this.#e),Vi(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyBillingComponent("Checkout"),{code:ch});return}if(!this.user){if(this.#o==="development")throw new ye(kt.cannotOpenCheckout,{code:Yl});return}this.#e.ensureMounted({preloadHint:"Checkout"}).then(l=>l.openDrawer("checkout",o||{}))};__internal_closeCheckout=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeDrawer("checkout"))};__internal_openPlanDetails=o=>{if(this.assertComponentsReady(this.#e),Vi(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyBillingComponent("PlanDetails"),{code:ch});return}let l="PlanDetails";this.#e.ensureMounted({preloadHint:l}).then(h=>h.openDrawer("planDetails",o||{})),this.telemetry?.record(Or(l,o))};__internal_closePlanDetails=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeDrawer("planDetails"))};__internal_openSubscriptionDetails=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:"SubscriptionDetails"}).then(l=>l.openDrawer("subscriptionDetails",o||{}))};__internal_closeSubscriptionDetails=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeDrawer("subscriptionDetails"))};__internal_openReverification=o=>{if(this.assertComponentsReady(this.#e),!this.user){if(this.#o==="development")throw new ye(kt.cannotOpenUserProfile,{code:Yl});return}this.#e.ensureMounted({preloadHint:"UserVerification"}).then(l=>l.openModal("userVerification",o||{})),this.telemetry?.record(Or("UserVerification",o))};__internal_closeReverification=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("userVerification"))};__internal_openBlankCaptchaModal=()=>(this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:"BlankCaptchaModal"}).then(o=>o.openModal("blankCaptcha",{})));__internal_closeBlankCaptchaModal=()=>(this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:"BlankCaptchaModal"}).then(o=>o.closeModal("blankCaptcha")));__internal_loadStripeJs=async()=>{let{loadStripe:o}=await s.e("553").then(s.bind(s,8823));return o};openSignUp=o=>{if(this.assertComponentsReady(this.#e),Do(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotOpenSignInOrSignUp,{code:Xw});return}this.#e.ensureMounted({preloadHint:"SignUp"}).then(l=>l.openModal("signUp",o||{})),this.telemetry?.record(Or("SignUp",o))};closeSignUp=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("signUp"))};openUserProfile=o=>{if(this.assertComponentsReady(this.#e),!this.user){if(this.#o==="development")throw new ye(kt.cannotOpenUserProfile,{code:Yl});return}this.#e.ensureMounted({preloadHint:"UserProfile"}).then(h=>h.openModal("userProfile",o||{}));let l=(o?.customPages?.length||0)>0?{customPages:!0}:void 0;this.telemetry?.record(Or("UserProfile",o,l))};closeUserProfile=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("userProfile"))};openOrganizationProfile=o=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("OrganizationProfile"),{code:Hi});return}if(!this.organization){if(this.#o==="development")throw new ye(kt.cannotRenderComponentWhenOrgDoesNotExist,{code:Hw});return}this.#e.ensureMounted({preloadHint:"OrganizationProfile"}).then(l=>l.openModal("organizationProfile",o||{})),this.telemetry?.record(Or("OrganizationProfile",o))};closeOrganizationProfile=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("organizationProfile"))};openCreateOrganization=o=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("CreateOrganization"),{code:Hi});return}this.#e.ensureMounted({preloadHint:"CreateOrganization"}).then(l=>l.openModal("createOrganization",o||{})),this.telemetry?.record(Or("CreateOrganization",o))};closeCreateOrganization=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("createOrganization"))};openWaitlist=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:"Waitlist"}).then(l=>l.openModal("waitlist",o||{})),this.telemetry?.record(Or("Waitlist",o))};closeWaitlist=()=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(o=>o.closeModal("waitlist"))};mountSignIn=(o,l)=>{this.assertComponentsReady(this.#e);let h="SignIn";this.#e.ensureMounted({preloadHint:h}).then(b=>b.mountComponent({name:h,appearanceKey:"signIn",node:o,props:l}));let _={withSignUp:l?.withSignUp??this.#v()};this.telemetry?.record(tr(h,l,_))};unmountSignIn=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountUserAvatar=(o,l)=>{this.assertComponentsReady(this.#e);let h="UserAvatar";this.#e.ensureMounted({preloadHint:h}).then(_=>_.mountComponent({name:h,appearanceKey:"userAvatar",node:o,props:l})),this.telemetry?.record(tr(h,l))};unmountUserAvatar=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountSignUp=(o,l)=>{this.assertComponentsReady(this.#e);let h="SignUp";this.#e.ensureMounted({preloadHint:h}).then(_=>_.mountComponent({name:h,appearanceKey:"signUp",node:o,props:l})),this.telemetry?.record(tr(h,l))};unmountSignUp=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountUserProfile=(o,l)=>{if(this.assertComponentsReady(this.#e),!this.user){if(this.#o==="development")throw new ye(kt.cannotRenderComponentWhenUserDoesNotExist,{code:Yl});return}let h="UserProfile";this.#e.ensureMounted({preloadHint:h}).then(b=>b.mountComponent({name:h,appearanceKey:"userProfile",node:o,props:l}));let _=(l?.customPages?.length||0)>0?{customPages:!0}:void 0;this.telemetry?.record(tr(h,l,_))};unmountUserProfile=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountOrganizationProfile=(o,l)=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("OrganizationProfile"),{code:Hi});return}let h=!!this.user;if(!this.organization&&h){if(this.#o==="development")throw new ye(kt.cannotRenderComponentWhenOrgDoesNotExist,{code:Hw});return}this.#e.ensureMounted({preloadHint:"OrganizationProfile"}).then(_=>_.mountComponent({name:"OrganizationProfile",appearanceKey:"userProfile",node:o,props:l})),this.telemetry?.record(tr("OrganizationProfile",l))};unmountOrganizationProfile=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountCreateOrganization=(o,l)=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("CreateOrganization"),{code:Hi});return}this.#e?.ensureMounted({preloadHint:"CreateOrganization"}).then(h=>h.mountComponent({name:"CreateOrganization",appearanceKey:"createOrganization",node:o,props:l})),this.telemetry?.record(tr("CreateOrganization",l))};unmountCreateOrganization=o=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountOrganizationSwitcher=(o,l)=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("OrganizationSwitcher"),{code:Hi});return}this.#e?.ensureMounted({preloadHint:"OrganizationSwitcher"}).then(h=>h.mountComponent({name:"OrganizationSwitcher",appearanceKey:"organizationSwitcher",node:o,props:l})),this.telemetry?.record(tr("OrganizationSwitcher",{...l,forceOrganizationSelection:this.environment?.organizationSettings.forceOrganizationSelection}))};unmountOrganizationSwitcher=o=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted().then(l=>l.unmountComponent({node:o}))};__experimental_prefetchOrganizationSwitcher=()=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted({preloadHint:"OrganizationSwitcher"}).then(o=>o.prefetch("organizationSwitcher"))};mountOrganizationList=(o,l)=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("OrganizationList"),{code:Hi});return}this.#e?.ensureMounted({preloadHint:"OrganizationList"}).then(h=>h.mountComponent({name:"OrganizationList",appearanceKey:"organizationList",node:o,props:l})),this.telemetry?.record(tr("OrganizationList",{...l,forceOrganizationSelection:this.environment?.organizationSettings.forceOrganizationSelection}))};unmountOrganizationList=o=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountUserButton=(o,l)=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted({preloadHint:"UserButton"}).then(_=>_.mountComponent({name:"UserButton",appearanceKey:"userButton",node:o,props:l}));let h={...l?.customMenuItems?.length?{customItems:!0}:void 0,...l?.__experimental_asStandalone?{standalone:!0}:void 0};this.telemetry?.record(tr("UserButton",l,h))};unmountUserButton=o=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountWaitlist=(o,l)=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted({preloadHint:"Waitlist"}).then(h=>h.mountComponent({name:"Waitlist",appearanceKey:"waitlist",node:o,props:l})),this.telemetry?.record(tr("Waitlist",l))};unmountWaitlist=o=>{this.assertComponentsReady(this.#e),this.#e?.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountPricingTable=(o,l)=>{if(this.assertComponentsReady(this.#e),Vi(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyBillingComponent("PricingTable"),{code:ch});return}let h={...l};l?.forOrganizations!==void 0&&At('Clerk: [IMPORTANT] <PricingTable /> prop `forOrganizations` is deprecated and will be removed in the coming minors. Use `for="organization"` instead.'),this.#e.ensureMounted({preloadHint:"PricingTable"}).then(_=>_.mountComponent({name:"PricingTable",appearanceKey:"pricingTable",node:o,props:h})),this.telemetry?.record(tr("PricingTable",h))};unmountPricingTable=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};__internal_mountOAuthConsent=(o,l)=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted({preloadHint:"OAuthConsent"}).then(h=>h.mountComponent({name:"OAuthConsent",appearanceKey:"__internal_oauthConsent",node:o,props:l}))};__internal_unmountOAuthConsent=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountAPIKeys=(o,l)=>{if(this.assertComponentsReady(this.#e),At("Clerk: <APIKeys /> component is in early access and not yet recommended for production use."),((h,_)=>jo(h,_)&&Lo(h,_))(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAPIKeysComponent,{code:"cannot_render_api_keys_disabled"});return}if(this.organization&&Lo(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAPIKeysComponentForOrgWhenDisabled,{code:"cannot_render_api_keys_org_disabled"});return}if(jo(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAPIKeysComponentForUserWhenDisabled,{code:"cannot_render_api_keys_user_disabled"});return}this.#e.ensureMounted({preloadHint:"APIKeys"}).then(h=>h.mountComponent({name:"APIKeys",appearanceKey:"apiKeys",node:o,props:l})),this.telemetry?.record(tr("APIKeys",l))};unmountAPIKeys=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};mountTaskChooseOrganization=(o,l)=>{if(this.assertComponentsReady(this.#e),sn(this,this.environment)){if(this.#o==="development")throw new ye(kt.cannotRenderAnyOrganizationComponent("TaskChooseOrganization"),{code:Hi});return}this.#e.ensureMounted({preloadHint:"TaskChooseOrganization"}).then(h=>h.mountComponent({name:"TaskChooseOrganization",appearanceKey:"taskChooseOrganization",node:o,props:l})),this.telemetry?.record(tr("TaskChooseOrganization",l))};unmountTaskChooseOrganization=o=>{this.assertComponentsReady(this.#e),this.#e.ensureMounted().then(l=>l.unmountComponent({node:o}))};setActive=async o=>{let{organization:l,beforeEmit:h,redirectUrl:_,navigate:b}=o,{session:x}=o;this.__internal_setActiveInProgress=!0,Ve.debug("setActive() start",{hasClient:!!this.client,sessionTarget:typeof x=="string"?x:x?.id??x??null,organizationTarget:typeof l=="string"?l:l?.id??l??null,redirectUrl:_??null},"clerk");try{if(!this.client)throw Ve.warn("Clerk setActive called before client is loaded",{},"clerk"),Error("setActive is being called before the client is loaded. Wait for init.");if(x===void 0&&!this.session)throw Ve.warn("Clerk setActive precondition not met: no target session and no active session",{},"clerk"),Error("setActive should either be called with a session param or there should be already an active session.");typeof x=="string"&&(x=this.client.sessions.find(K=>K.id===x)||null);let A=typeof window<"u"&&typeof window.__unstable__onBeforeSetActive=="function"?window.__unstable__onBeforeSetActive:pr,E=typeof window<"u"&&typeof window.__unstable__onAfterSetActive=="function"?window.__unstable__onAfterSetActive:pr,T=x===void 0?this.session:x;if(T?.status==="pending"&&(function(K){let G=["taskUrls","navigate"];Object.keys(K).some(ae=>G.includes(ae))||At('Clerk: Session has pending tasks but no handling is configured. To handle pending tasks, provide either "taskUrls" for navigation to custom URLs or "navigate" for programmatic navigation. Without these options, users may get stuck on incomplete flows.')})({...this.#t,...o}),T&&l!==void 0){let K=typeof l=="string"?l:l?.id;if((function(G){return typeof G=="string"&&G.startsWith("org_")})(K))T.lastActiveOrganizationId=K||null;else{let G=T.user.organizationMemberships.find(Q=>Q.organization.slug===K),ae=G?.organization.id||null,pe=ae===null;if(this.environment?.organizationSettings?.forceOrganizationSelection&&pe)return;T.lastActiveOrganizationId=ae}}T?.status!=="pending"&&await A(T===null?"sign-out":void 0),(Kt()&&globalThis.document.hasFocus()||!this.#t.standardBrowser)&&(await this.#w(T),T=this.#k(T?.id)),await T?.getToken()||(I()||Ve.warn("Token is null when setting active session (offline)",{sessionId:T?.id},"clerk"),xt.emit(Zo,{token:null}));let j=Uo(this.#t.standardBrowser);h&&(((K,G,ae)=>{let pe=(()=>{try{return!0}catch{}return!1})(),Q=ae??K;H.has(Q)||pe||(H.add(Q),console.warn(`Clerk - DEPRECATION WARNING: "${K}" is deprecated and will be removed in the next major release.
|
|
163
|
-
${G}`))})("Clerk.setActive({beforeEmit})",'Use the `redirectUrl` property instead. Example `Clerk.setActive({redirectUrl:"/"})`'),await j.track(async()=>{this.#y(),await h(T)}));let B=T?.status==="pending"&&T?.currentTask&&this.#t.taskUrls?.[T?.currentTask.key];if(!h&&(_||B||b)&&await j.track(async()=>{if(this.client){if(T?.status!=="pending"&&this.#y(),B){let K=_?Rt({base:B,hashSearchParams:{redirectUrl:_}},{stringify:!0}):B;await this.navigate(K)}else if(b&&T)await b({session:T});else if(_){if(this.client.isEligibleForTouch()){let K=new URL(_,window.location.href),G=this.buildUrlWithAuth(this.client.buildTouchUrl({redirectUrl:K}));await this.navigate(G)}await this.navigate(_)}}}),j.isUnloading())return;this.#_(T),this.#m(),T?.status!=="pending"&&await E()}finally{this.__internal_setActiveInProgress=!1}};addListener=o=>(o=(function(l){let h;return _=>{var b;h||={..._},l(h={client:Kl((b=h).client,_.client),session:Kl(b.session,_.session),user:Kl(b.user,_.user),organization:Kl(b.organization,_.organization)})}})(o),this.#f.push(o),this.client&&o({client:this.client,session:this.session,user:this.user,organization:this.organization}),()=>{this.#f=this.#f.filter(l=>l!==o)});on=(...o)=>{this.#l.on(...o)};off=(...o)=>{this.#l.off(...o)};__internal_addNavigationListener=o=>(this.#h.push(o),()=>{this.#h=this.#h.filter(l=>l!==o)});navigate=async(o,l)=>{if(!o||!Kt())return;setTimeout(()=>{this.#j()},0);let h=new URL(o,window.location.href);this.#W.includes(h.protocol)||(console.warn(`Clerk: "${h.protocol}" is not a valid protocol. Redirecting to "/" instead. If you think this is a mistake, please open an issue.`),h=new URL("/",window.location.href));let _=l?.replace&&this.#t.routerReplace?this.#t.routerReplace:this.#t.routerPush;if(Ve.info(`Clerk is navigating to: ${h}`),this.#t.routerDebug&&console.log(`Clerk is navigating to: ${h}`),h.origin!=="null"&&h.origin!==window.location.origin||!_)return void vn(h);let b={...l?.metadata?{__internal_metadata:l?.metadata}:{},windowNavigate:vn};return await _(ua(h),b)};buildUrlWithAuth(o){if(this.#o==="production")return o;let l=new URL(o,window.location.origin);return l.origin!==window.location.origin&&this.#s?this.#s.decorateUrlWithDevBrowserToken(l).href:l.href}buildSignInUrl(o){return this.#$("signInUrl",{...o,redirectUrl:o?.redirectUrl||window.location.href},o?.initialValues)}buildSignUpUrl(o){return this.#$("signUpUrl",{...o,redirectUrl:o?.redirectUrl||window.location.href},o?.initialValues)}buildUserProfileUrl(){return this.environment&&this.environment.displayConfig?this.buildUrlWithAuth(this.environment.displayConfig.userProfileUrl):""}buildHomeUrl(){return this.environment&&this.environment.displayConfig?this.buildUrlWithAuth(this.environment.displayConfig.homeUrl):""}buildAfterSignInUrl({params:o}={}){return this.buildUrlWithAuth(new fi(this.#t,{},o).getAfterSignInUrl())}buildAfterSignUpUrl({params:o}={}){return this.buildUrlWithAuth(new fi(this.#t,{},o).getAfterSignUpUrl())}buildAfterSignOutUrl(){return this.#t.afterSignOutUrl?this.buildUrlWithAuth(this.#t.afterSignOutUrl):"/"}buildNewSubscriptionRedirectUrl(){return this.#t.newSubscriptionRedirectUrl?this.#t.newSubscriptionRedirectUrl:this.buildAfterSignInUrl()}buildWaitlistUrl(o){return this.environment&&this.environment.displayConfig?Rt({base:this.#t.waitlistUrl||this.environment.displayConfig.waitlistUrl,hashSearchParams:[new URLSearchParams(o?.initialValues||{})]},{stringify:!0}):""}buildAfterMultiSessionSingleSignOutUrl(){return this.environment?this.#t.afterMultiSessionSingleSignOutUrl?this.buildUrlWithAuth(this.#t.afterMultiSessionSingleSignOutUrl):this.#t.signInUrl?this.buildUrlWithAuth(Rt({base:this.#t.signInUrl,hashPath:"choose"},{stringify:!0})):this.buildUrlWithAuth(this.environment.displayConfig.afterSignOutOneUrl):""}buildCreateOrganizationUrl(){return this.environment&&this.environment.displayConfig?this.buildUrlWithAuth(this.environment.displayConfig.createOrganizationUrl):""}buildOrganizationProfileUrl(){return this.environment&&this.environment.displayConfig?this.buildUrlWithAuth(this.environment.displayConfig.organizationProfileUrl):""}buildTasksUrl(o){let l=this.session?.currentTask;return l?this.#t.taskUrls?.[l.key]||Rt({base:this.buildSignInUrl(o),hashPath:zw(l)},{stringify:!0}):""}#I=async()=>{if(!Kt())return;let o=new URLSearchParams({[ai]:"true"}),l=wr(Dn);l&&wo(l)||(function(){throw Error(`${Mt} Invalid redirect_url. A valid http or https url should be used for the redirection.`)})();let h=Rt({base:wr(Dn),searchParams:o},{stringify:!0});return this.navigate(this.buildUrlWithAuth(h))};redirectWithAuth=async o=>{if(Kt())return this.navigate(this.buildUrlWithAuth(o))};redirectToSignIn=async o=>{if(Kt())return this.navigate(this.buildSignInUrl(o))};redirectToSignUp=async o=>{if(Kt())return this.navigate(this.buildSignUpUrl(o))};redirectToUserProfile=async()=>{if(Kt())return this.navigate(this.buildUserProfileUrl())};redirectToCreateOrganization=async()=>{if(Kt())return this.navigate(this.buildCreateOrganizationUrl())};redirectToOrganizationProfile=async()=>{if(Kt())return this.navigate(this.buildOrganizationProfileUrl())};redirectToAfterSignIn=async()=>{if(Kt())return this.navigate(this.buildAfterSignInUrl())};redirectToAfterSignUp=async()=>{if(Kt())return this.navigate(this.buildAfterSignUpUrl())};redirectToAfterSignOut=async()=>{if(Kt())return this.navigate(this.buildAfterSignOutUrl())};redirectToWaitlist=async()=>{if(Kt())return this.navigate(this.buildWaitlistUrl())};redirectToTasks=async o=>{if(Kt())return this.navigate(this.buildTasksUrl(o))};handleEmailLinkVerification=async(o,l)=>{if(!this.client)return;let h=wr("__clerk_status");if(h==="expired")throw new Tt(pt.Expired);if(h==="client_mismatch")throw new Tt(pt.ClientMismatch);if(h!=="verified")throw new Tt(pt.Failed);let _=wr("__clerk_created_session"),{signIn:b,signUp:x,sessions:A}=this.client,E=A.some(B=>B.id===_),T=b.status==="needs_second_factor"||x.status==="missing_requirements",N=B=>l&&typeof l=="function"?l(B):this.navigate(B),j=o.redirectUrl?()=>N(o.redirectUrl):pr;return E?this.setActive({session:_,redirectUrl:o.redirectUrlComplete}):T?j():(typeof o.onVerifiedOnOtherDevice=="function"&&o.onVerifiedOnOtherDevice(),null)};handleGoogleOneTapCallback=async(o,l,h)=>{if(!this.loaded||!this.environment||!this.client)return;let{signIn:_,signUp:b}=this.client,x="identifier"in(o||{})?o:_,A="missingFields"in(o||{})?o:b,E=T=>h&&typeof h=="function"?h(this.buildUrlWithAuth(T)):this.navigate(this.buildUrlWithAuth(T));return this._handleRedirectCallback(l,{signUp:A,signIn:x,navigate:E})};_handleRedirectCallback=async(o,{signIn:l,signUp:h,navigate:_})=>{if(!this.loaded||!this.environment||!this.client)return;if(!window.opener&&o.reloadResource)try{o.reloadResource==="signIn"?await l.reload():o.reloadResource==="signUp"&&await h.reload()}catch{}let{displayConfig:b}=this.environment,{firstFactorVerification:x}=l,{externalAccount:A}=h.verifications,E={status:h.status,missingFields:h.missingFields,externalAccountStatus:A.status,externalAccountErrorCode:A.error?.code,externalAccountSessionId:A.error?.meta?.sessionId,sessionId:h.createdSessionId},T={status:l.status,firstFactorVerificationStatus:x.status,firstFactorVerificationErrorCode:x.error?.code,firstFactorVerificationSessionId:x.error?.meta?.sessionId,sessionId:l.createdSessionId},N=We=>()=>_(We),j=N(o.signInUrl||b.signInUrl),B=N(o.signUpUrl||b.signUpUrl),K=N(o.firstFactorUrl||Rt({base:b.signInUrl,hashPath:"/factor-one"},{stringify:!0})),G=N(o.secondFactorUrl||Rt({base:b.signInUrl,hashPath:"/factor-two"},{stringify:!0})),ae=N(o.resetPasswordUrl||Rt({base:b.signInUrl,hashPath:"/reset-password"},{stringify:!0})),pe=new fi(this.#t,o),Q=N(o.continueSignUpUrl||Rt({base:b.signUpUrl,hashPath:"/continue"},{stringify:!0})),he=({missingFields:We})=>We.length?Q():(({signUp:vt,verifyEmailPath:Go,verifyPhonePath:Ql,continuePath:eu,navigate:Ea,handleComplete:tu,redirectUrl:mi="",redirectUrlComplete:Xi="",oidcPrompt:gi})=>{if(vt.status==="complete")return tu&&tu();if(vt.status==="missing_requirements"){if(vt.missingFields.some(bn=>bn==="saml"||bn==="enterprise_sso"))return vt.authenticateWithRedirect({strategy:"enterprise_sso",redirectUrl:mi,redirectUrlComplete:Xi,continueSignUp:!0,oidcPrompt:gi});let Wr=Ro();if(vt.unverifiedFields?.includes("email_address")&&Go)return Ea(Go,{searchParams:Wr});if(vt.unverifiedFields?.includes("phone_number")&&Ql)return Ea(Ql,{searchParams:Wr});if(eu)return Ea(eu,{searchParams:Wr})}})({signUp:h,verifyEmailPath:o.verifyEmailAddressUrl||Rt({base:b.signUpUrl,hashPath:"/verify-email-address"},{stringify:!0}),verifyPhonePath:o.verifyPhoneNumberUrl||Rt({base:b.signUpUrl,hashPath:"/verify-phone-number"},{stringify:!0}),navigate:_}),ke=o.signInUrl||b.signInUrl,Fe=o.signUpUrl||b.signUpUrl,ft=async({session:We,baseUrl:vt,redirectUrl:Go})=>{if(!We.currentTask)return void await this.navigate(Go);await Nw(We,{baseUrl:vt,navigate:this.navigate})};if(T.status==="complete")return this.setActive({session:T.sessionId,navigate:async({session:We})=>{await ft({session:We,baseUrl:ke,redirectUrl:pe.getAfterSignInUrl()})}});if(E.externalAccountStatus==="transferable"&&E.externalAccountErrorCode==="external_account_exists"){let We=await l.create({transfer:!0});switch(We.status){case"complete":return this.setActive({session:We.createdSessionId,navigate:async({session:vt})=>{await ft({session:vt,baseUrl:Fe,redirectUrl:pe.getAfterSignInUrl()})}});case"needs_first_factor":return K();case"needs_second_factor":return G();case"needs_new_password":return ae();default:jx("sign in")}}let Oe=E.externalAccountErrorCode==="user_locked",Te=T.firstFactorVerificationErrorCode==="user_locked";if(Oe)return B();if(Te)return j();if(T.status==="needs_first_factor"&&!l.supportedFirstFactors?.every(We=>We.strategy==="enterprise_sso"))return K();if(T.status==="needs_new_password")return ae();if(T.firstFactorVerificationStatus==="transferable"){if(o.transferable===!1)return j();let We=await h.create({transfer:!0});switch(We.status){case"complete":return this.setActive({session:We.createdSessionId,navigate:async({session:vt})=>{await ft({session:vt,baseUrl:Fe,redirectUrl:pe.getAfterSignUpUrl()})}});case"missing_requirements":return he({missingFields:We.missingFields});default:jx("sign in")}}if(E.status==="complete")return this.setActive({session:E.sessionId,navigate:async({session:We})=>{await ft({session:We,baseUrl:Fe,redirectUrl:pe.getAfterSignUpUrl()})}});if(T.status==="needs_second_factor")return G();let qe=(E.externalAccountStatus==="failed"||E.externalAccountStatus==="unverified")&&E.externalAccountErrorCode==="identifier_already_signed_in"&&E.externalAccountSessionId,Je=T.firstFactorVerificationStatus==="failed"&&T.firstFactorVerificationErrorCode==="identifier_already_signed_in"&&T.firstFactorVerificationSessionId;if(qe||Je){let We=T.firstFactorVerificationSessionId||E.externalAccountSessionId;if(We)return this.setActive({session:We,navigate:async({session:vt})=>{await ft({session:vt,baseUrl:qe?Fe:ke,redirectUrl:pe.getAfterSignInUrl()})}})}return(We=>{let{externalAccount:vt}=We.verifications;return!!vt.error})(h)?B():E.externalAccountStatus==="verified"&&E.status==="missing_requirements"?he({missingFields:h.missingFields}):this.session?.currentTask?void await this.redirectToTasks({redirectUrl:this.buildAfterSignInUrl()}):j()};handleRedirectCallback=async(o={},l)=>{if(!this.loaded||!this.environment||!this.client)return;let{signIn:h,signUp:_}=this.client,b=x=>l&&typeof l=="function"?l(x):this.navigate(x);return this._handleRedirectCallback(o,{signUp:_,signIn:h,navigate:b})};handleUnauthenticated=async(o={broadcast:!0})=>{if(this.client&&this.session)try{let l=await Bt.getOrCreateInstance().fetch();return this.updateClient(l),this.session?void 0:(o.broadcast&&xt.emit(ya,null),this.setActive({session:null}))}catch(l){if(Ce(l)&&[403,500].includes(l.status))return this.setActive({session:null});throw l}};authenticateWithGoogleOneTap=async o=>this.client?.signIn.create({strategy:"google_one_tap",token:o.token}).catch(l=>{if(Ce(l)&&l.errors[0].code==="external_account_not_found")return this.client?.signUp.create({strategy:"google_one_tap",token:o.token,legalAccepted:o.legalAccepted});throw l});authenticateWithMetamask=async(o={})=>{await this.authenticateWithWeb3({...o,strategy:"web3_metamask_signature"})};authenticateWithCoinbaseWallet=async(o={})=>{await this.authenticateWithWeb3({...o,strategy:"web3_coinbase_wallet_signature"})};authenticateWithBase=async(o={})=>{await this.authenticateWithWeb3({...o,strategy:"web3_base_signature"})};authenticateWithOKXWallet=async(o={})=>{await this.authenticateWithWeb3({...o,strategy:"web3_okx_wallet_signature"})};authenticateWithWeb3=async({redirectUrl:o,signUpContinueUrl:l,customNavigate:h,unsafeMetadata:_,strategy:b,legalAccepted:x,secondFactorUrl:A})=>{let E,T;if(!this.client||!this.environment)return;let{displayConfig:N}=this.environment,j=b.replace("web3_","").replace("_signature",""),B=await pa({provider:j});switch(j){case"metamask":E=fa;break;case"base":E=ga;break;case"coinbase_wallet":E=ha;break;default:E=ma}let K=Q=>()=>h&&typeof h=="function"?h(Q):this.navigate(Q),G=K(A||Rt({base:N.signInUrl,hashPath:"/factor-two"},{stringify:!0})),ae=K(l||Rt({base:N.signUpUrl,hashPath:"/continue"},{stringify:!0}));try{T=await this.client.signIn.authenticateWithWeb3({identifier:B,generateSignature:E,strategy:b})}catch(Q){if(qi(Q,"form_identifier_not_found"))T=await this.client.signUp.authenticateWithWeb3({identifier:B,generateSignature:E,unsafeMetadata:_,strategy:b,legalAccepted:x}),l&&T.status==="missing_requirements"&&T.verifications.web3Wallet.status==="verified"&&await ae();else throw Q}let pe=async({session:Q,redirectUrl:he})=>{if(!Q.currentTask)return void await this.navigate(he);await Nw(Q,{baseUrl:N.signInUrl,navigate:this.navigate})};switch(T.status){case"needs_second_factor":await G();break;case"complete":T.createdSessionId&&await this.setActive({session:T.createdSessionId,navigate:async({session:Q})=>{await pe({session:Q,redirectUrl:o??this.buildAfterSignInUrl()})}});break;default:return}};createOrganization=async({name:o,slug:l})=>ui.create({name:o,slug:l});getOrganization=async o=>ui.get(o);joinWaitlist=async({emailAddress:o})=>Hf.join({emailAddress:o});updateEnvironment(o){this.environment=o}__internal_setCountry=o=>{this.__internal_country||(this.__internal_country=o)};get __internal_last_error(){let o=this.internal_last_error;return this.internal_last_error=null,o}set __internal_last_error(o){this.internal_last_error=o}updateClient=o=>{if(!this.client){let l=this.#t.selectInitialSession?this.#t.selectInitialSession(o):this.#R(o);this.#_(l)}if(this.client=o,this.session){let l=this.#k(this.session.id);this.session.status==="active"&&l?.status==="pending"&&(typeof window<"u"&&typeof window.__unstable__onAfterSetActive=="function"?window.__unstable__onAfterSetActive:pr)(),this.#_(l),this.session?.lastActiveToken||I()||Ve.warn("No last active token when updating client (offline)",{sessionId:this.session?.id},"clerk"),xt.emit(Zo,{token:this.session?.lastActiveToken})}this.#m()};get __unstable__environment(){return this.environment}__unstable__setEnvironment=async o=>{this.environment=new Zr(o),Dt.mountComponentRenderer&&(this.#e=Dt.mountComponentRenderer(this,this.environment,this.#t))};__unstable__onBeforeRequest=o=>{this.#c.onBeforeRequest(o)};__unstable__onAfterResponse=o=>{this.#c.onAfterResponse(o)};__unstable__updateProps=o=>{let l={...o,options:this.#S({...this.#t,...o.options})};return this.#e?.ensureMounted().then(h=>h.updateProps(l))};__internal_navigateWithError(o,l){return this.__internal_last_error=l,this.navigate(o)}#T=()=>{let o=new URLSearchParams({[Dn]:window.location.href});return Rt({base:this.#t.signInUrl,searchParams:o},{stringify:!0})};#E=()=>{let o;if(this.proxyUrl){let l=new URL(this.proxyUrl);o=new URL(`${l.pathname}/v1/client/sync`,l.origin)}else this.domain&&(o=new URL("/v1/client/sync",`https://${this.domain}`));return o?.searchParams.append("redirect_url",window.location.href),o?.toString()||""};#A=()=>wr(ai)!=="true"&&!!this.isSatellite&&!!this.#s?.isSignedOut();#P=()=>this.#o!=="production"&&!this.isSatellite&&!!wr(Dn);#C=async()=>{this.instanceType==="development"?await this.navigate(this.#T()):this.instanceType==="production"&&await this.navigate(this.#E())};#O=(o,l)=>{let h;try{h=new URL(o)}catch{throw Error(`${Mt} The signInUrl needs to have a absolute url format.`)}h.origin===l&&(function(){throw Error(`${Mt} The signInUrl needs to be on a different origin than your satellite application.`)})()};#U=()=>{this.isSatellite&&(this.#o!=="development"||this.#t.signInUrl||(function(){throw Error(`${Mt} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`)})(),this.proxyUrl||this.domain||(function(){throw Error(`${Mt} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`)})(),this.#t.signInUrl&&this.#O(this.#t.signInUrl,window.location.origin))};#z=async()=>{if(this.#s=await rh.create(this,this.#c,this.#o,this.#l),this.#U(),this.#A())return void await this.#C();if(this.#P())return void await this.#I();this.#b=(()=>{if(!f())return{onPageFocus:pr};let x=[];return window.addEventListener("focus",()=>{document.visibilityState==="visible"&&x.forEach(A=>A())}),{onPageFocus:A=>{x.push(A)}}})(),typeof BroadcastChannel<"u"&&(this.#u=new BroadcastChannel("clerk")),this.#D();let o=(function(x=window.location.hostname){if(!x)return!1;let A=Il.get(x);return A===void 0&&(A=Pr.some(E=>x.startsWith("accounts.")&&x.endsWith(E))||hn.some(E=>x.endsWith(E)&&!x.endsWith(".clerk"+E)),Il.set(x,A)),A})(window?.location.hostname),l=this.#o==="development"&&!o,h=0,_=0;for(;_<2;){_++;try{var b;let x=Zr.getInstance().fetch({touch:l}).then(N=>this.updateEnvironment(N)).catch(()=>{++h;let N=Rx.getItem(Nx,null);N&&this.updateEnvironment(new Zr(N))}),A=async()=>Bt.getOrCreateInstance().fetch().then(N=>this.updateClient(N)).catch(async N=>{if(ce(N))throw N;++h;let j=this.#s?.getSessionCookie(),B=(function(K){let G;try{G=new Sa({jwt:K||"",object:"token",id:void 0})}catch{G=null}if(Bt.clearInstance(),!G?.jwt)return Bt.getOrCreateInstance({object:"client",last_active_session_id:null,id:"client_init",sessions:[]});let{sessionId:ae,userId:pe,orgId:Q,orgRole:he,orgPermissions:ke,orgSlug:Fe,factorVerificationAge:ft}=(Te=>{let qe,Je,We,vt,Go=Te.fva??null,Ql=Te.sts??null;if(Te.v===2){if(Te.o){qe=Te.o?.id,We=Te.o?.slg,Te.o?.rol&&(Je=`org:${Te.o?.rol}`);let{org:eu}=mw(Te.fea),{permissions:Ea,featurePermissionMap:tu}=(({per:mi,fpm:Xi})=>{if(!mi||!Xi)return{permissions:[],featurePermissionMap:[]};let gi=mi.split(",").map(Wr=>Wr.trim());return{permissions:gi,featurePermissionMap:Xi.split(",").map(Wr=>Number.parseInt(Wr.trim(),10)).map(Wr=>Wr.toString(2).padStart(gi.length,"0").split("").map(bn=>Number.parseInt(bn,10)).reverse()).filter(Boolean)}})({per:Te.o?.per,fpm:Te.o?.fpm});vt=(function({features:mi,permissions:Xi,featurePermissionMap:gi}){if(!mi||!Xi||!gi)return[];let Wr=[];for(let bn=0;bn<mi.length;bn++){let l2=mi[bn];if(bn>=gi.length)continue;let lh=gi[bn];if(lh)for(let ru=0;ru<lh.length;ru++)lh[ru]===1&&Wr.push(`org:${l2}:${Xi[ru]}`)}return Wr})({features:eu,featurePermissionMap:tu,permissions:Ea})}}else qe=Te.org_id,Je=Te.org_role,We=Te.org_slug,vt=Te.org_permissions;return{sessionClaims:Te,sessionId:Te.sid,sessionStatus:Ql,actor:Te.act,userId:Te.sub,orgId:qe,orgRole:Je,orgSlug:We,orgPermissions:vt,factorVerificationAge:Go}})(G.jwt.claims),Oe={object:"client",last_active_session_id:ae,id:"client_init",sessions:[{object:"session",id:ae,status:"active",last_active_organization_id:Q||null,last_active_token:{id:void 0,object:"token",jwt:K},factor_verification_age:ft||null,public_user_data:{user_id:pe},user:{object:"user",id:pe,organization_memberships:Q&&Fe&&he?[{object:"organization_membership",id:Q,role:he,permissions:ke||[],organization:{object:"organization",id:Q,name:Fe,slug:Fe,members_count:1,max_allowed_memberships:1}}]:[]}}]};return Bt.getOrCreateInstance(Oe)})(j);return this.updateClient(B),this.#s?.stopPollingForToken(),await this.session?.getToken({skipCache:!0}).catch(()=>null).finally(()=>{this.#s?.startPollingForToken()}),null}),E=()=>{Dt.mountComponentRenderer&&!this.#e&&(this.#e=Dt.mountComponentRenderer(this,this.environment,this.#t))},[,T]=await(b=[x,A()],Promise.all(Array.from(b).map(N=>N.then(j=>({status:"fulfilled",value:j}),j=>({status:"rejected",reason:j})))));if(T.status==="rejected"){let N=T.reason;if(qi(N,"requires_captcha"))E(),await A();else throw N}if(this.#s?.setClientUatCookieForDevelopmentInstances(),await this.#B())return;E();break}catch(x){if(qi(x,"dev_browser_unauthenticated"))await this.#s.handleUnauthenticatedDevBrowser();else{if(I())throw x;return void console.warn(x)}}_>=2&&(function(){throw Error(`${Mt} Something went wrong initializing Clerk.`)})()}this.#d=new HO(this),this.#d.start(),this.#Z(),this.#F(),this.#M(),this.#l.emit(M,h>0?"degraded":"ready")};shouldFallbackToCachedResources=()=>!!this.__internal_getCachedResources;#N=async()=>{let o,l,h=this.shouldFallbackToCachedResources()?1:void 0,_=0;try{[o,l]=await Promise.all([Zr.getInstance().fetch({touch:!1,fetchMaxTries:h}),Bt.getOrCreateInstance().fetch({fetchMaxTries:h})])}catch(b){if(ve(b)&&b.code==="network_error"&&this.shouldFallbackToCachedResources()){let x=await this.__internal_getCachedResources?.();o=new Zr(x?.environment),Bt.clearInstance(),l=Bt.getOrCreateInstance(x?.client),++_}else throw b}this.updateClient(l),this.updateEnvironment(o),Dt.mountComponentRenderer&&(this.#e=Dt.mountComponentRenderer(this,this.environment,this.#t)),this.#l.emit(M,_>0?"degraded":"ready")};__internal_reloadInitialResources=async()=>{let[o,l]=await Promise.all([Zr.getInstance().fetch({touch:!1,fetchMaxTries:1}),Bt.getOrCreateInstance().fetch({fetchMaxTries:1})]);this.updateClient(l),this.updateEnvironment(o),this.#m()};#R=o=>{if(o.lastActiveSessionId){let l=o.signedInSessions.find(h=>h.id===o.lastActiveSessionId);if(l)return l}return o.signedInSessions[0]||null};#D=()=>{f()&&(this.#b?.onPageFocus(()=>{this.session&&!(!(this.environment&&!this.environment.authConfig.singleSessionMode)&&this.#x>Date.now())&&(this.#x=Date.now()+5e3,this.#t.touchSession&&this.#w(this.session))}),this.#u?.addEventListener("message",o=>{o.data?.type==="signout"&&this.handleUnauthenticated({broadcast:!1})}),xt.on(ya,()=>{this.#u?.postMessage({type:"signout"})}),xt.on(ow,()=>{Rx.setItem(Nx,this.environment?.__internal_toSnapshot(),864e5)}))};#w=async o=>{if(!o)return Promise.resolve();await o.touch().catch(l=>{ce(l)&&this.handleUnauthenticated()})};#m=()=>{if(this.client)for(let o of this.#f)o({client:this.client,session:this.session,user:this.user,organization:this.organization})};#j=()=>{for(let o of this.#h)o()};#y=()=>{this.session=void 0,this.organization=void 0,this.user=void 0,this.#m()};#L=()=>(this.session?.user.organizationMemberships||[]).map(o=>o.organization).find(o=>o.id===this.session?.lastActiveOrganizationId)||null;#_=o=>{this.session=o||null,this.organization=this.#L(),this.user=this.session?this.session.user:null};#k=o=>this.client?.signedInSessions.find(l=>l.id===o)||null;#F=()=>{this.addListener(({session:o})=>{o?.actor&&this.#e?.ensureMounted().then(l=>l.mountImpersonationFab())})};#M=()=>{this.#t.__internal_keyless_claimKeylessApplicationUrl&&this.#e?.ensureMounted().then(o=>{o.updateProps({options:{__internal_keyless_claimKeylessApplicationUrl:this.#t.__internal_keyless_claimKeylessApplicationUrl,__internal_keyless_copyInstanceKeysUrl:this.#t.__internal_keyless_copyInstanceKeysUrl,__internal_keyless_dismissPrompt:this.#t.__internal_keyless_dismissPrompt}})})};#$=(o,l,h)=>{if(!o||!this.loaded||!this.environment||!this.environment.displayConfig)return"";let _=this.#t[o]||this.environment.displayConfig[o];this.#v()&&(_=this.#t.signInUrl);let b=new fi(this.#t,l).toSearchParams(),x=new URLSearchParams(h||{}),A=Rt({base:_,hashPath:this.#v()&&o==="signUpUrl"?"/create":"",hashSearchParams:[x,b]},{stringify:!0});return this.buildUrlWithAuth(A)};assertComponentsReady(o){if(!Dt.mountComponentRenderer)throw Error("ClerkJS was loaded without UI components.");if(!o)throw Error("ClerkJS components are not ready yet.")}#B=async()=>{let o=new URLSearchParams(window.location.search).get("redirect_url"),l=this.instanceType==="production",h=o!==null&&(function(T,N){let j=new URL(N,Fo),B=j.pathname,K=Pl.includes(B)||Pf.includes(B);return T===j.host&&K})(this.frontendApi,o);if(l||!h)return!1;let _=this.session,b=this.#t.signInUrl||this.environment?.displayConfig.signInUrl,x=b&&window.location.href.startsWith(b),A=this.#t.signUpUrl||this.environment?.displayConfig.signUpUrl,E=A&&window.location.href.startsWith(A);return(!(function(T){let N=new URL(T,Fo);return Pl.includes(N.pathname)})(o)||!!_||!x&&!E)&&(await this.navigate(this.buildUrlWithAuth(o)),!0)};#S=o=>{let l=o?{...o}:{};return l.appearance&&(l.appearance=(function(h){let _;if(!h||typeof h!="object")return h;let b=h.theme!==void 0?h.theme:h.baseTheme,x=h.theme!==void 0;if(!b)return h;if(Array.isArray(b)){b.forEach(N=>{!_&&typeof N=="object"&&N.cssLayerName&&(_=N.cssLayerName)});let A=b.map(N=>{if(typeof N=="string")return N;let{cssLayerName:j,...B}=N;return B}),E=h.cssLayerName||_,T={...h,[x?"theme":"baseTheme"]:A};return E&&(T.cssLayerName=E),T}{let A;typeof b=="object"&&b.cssLayerName&&(A=b.cssLayerName);let E=typeof b=="string"?b:(()=>{let{cssLayerName:j,...B}=b;return B})(),T=h.cssLayerName||A,N={...h,[x?"theme":"baseTheme"]:E};return T&&(N.cssLayerName=T),N}})(l.appearance)),{...c2,...l,allowedRedirectOrigins:(function(h,_,b){if(Array.isArray(h)&&h.length)return h;let x=[];return typeof window<"u"&&window.location&&x.push(window.location.origin),x.push(`https://${Tl(_)}`),x.push(`https://*.${Tl(_)}`),b==="development"&&x.push(`https://${_}`),x})(o?.allowedRedirectOrigins,this.frontendApi,this.instanceType)}};#Z=()=>{try{yn(ai),yn(xo),yn(No),yn("__clerk_handshake"),yn("__clerk_handshake_nonce"),yn("__clerk_help")}catch{}};get#W(){let o=ca;return this.#t.allowedRedirectProtocols&&(o=o.concat(this.#t.allowedRedirectProtocols)),o}}(i=s.hmd(i)).hot&&i.hot.accept()},2788:function(i,r,s){"use strict";var c=this&&this.__awaiter||function($,O,F,Z){return new(F||(F=Promise))(function(M,H){function W(Y){try{fe(Z.next(Y))}catch(X){H(X)}}function ee(Y){try{fe(Z.throw(Y))}catch(X){H(X)}}function fe(Y){Y.done?M(Y.value):new F(function(X){X(Y.value)}).then(W,ee)}fe((Z=Z.apply($,O||[])).next())})},u=this&&this.__generator||function($,O){var F,Z,M,H,W={label:0,sent:function(){if(1&M[0])throw M[1];return M[1]},trys:[],ops:[]};return H={next:ee(0),throw:ee(1),return:ee(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function ee(fe){return function(Y){var X=[fe,Y];if(F)throw TypeError("Generator is already executing.");for(;W;)try{if(F=1,Z&&(M=2&X[0]?Z.return:X[0]?Z.throw||((M=Z.return)&&M.call(Z),0):Z.next)&&!(M=M.call(Z,X[1])).done)return M;switch(Z=0,M&&(X=[2&X[0],M.value]),X[0]){case 0:case 1:M=X;break;case 4:return W.label++,{value:X[1],done:!1};case 5:W.label++,Z=X[1],X=[0];continue;case 7:X=W.ops.pop(),W.trys.pop();continue;default:if(!(M=(M=W.trys).length>0&&M[M.length-1])&&(X[0]===6||X[0]===2)){W=0;continue}if(X[0]===3&&(!M||X[1]>M[0]&&X[1]<M[3])){W.label=X[1];break}if(X[0]===6&&W.label<M[1]){W.label=M[1],M=X;break}if(M&&W.label<M[2]){W.label=M[2],W.ops.push(X);break}M[2]&&W.ops.pop(),W.trys.pop();continue}X=O.call($,W)}catch(Ke){X=[6,Ke],Z=0}finally{F=M=0}if(5&X[0])throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}}},p=this;Object.defineProperty(r,"__esModule",{value:!0});var f=s(6119),v="browser-tabs-lock-key",y={key:function($){return c(p,void 0,void 0,function(){return u(this,function(O){throw Error("Unsupported")})})},getItem:function($){return c(p,void 0,void 0,function(){return u(this,function(O){throw Error("Unsupported")})})},clear:function(){return c(p,void 0,void 0,function(){return u(this,function($){return[2,window.localStorage.clear()]})})},removeItem:function($){return c(p,void 0,void 0,function(){return u(this,function(O){throw Error("Unsupported")})})},setItem:function($,O){return c(p,void 0,void 0,function(){return u(this,function(F){throw Error("Unsupported")})})},keySync:function($){return window.localStorage.key($)},getItemSync:function($){return window.localStorage.getItem($)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function($){return window.localStorage.removeItem($)},setItemSync:function($,O){return window.localStorage.setItem($,O)}};function k($){return new Promise(function(O){return setTimeout(O,$)})}function I($){for(var O="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",F="",Z=0;Z<$;Z++){var M=Math.floor(Math.random()*O.length);F+=O[M]}return F}r.default=(function(){function $(O){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+I(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=O,$.waiters===void 0&&($.waiters=[])}return $.prototype.acquireLock=function(O,F){return F===void 0&&(F=5e3),c(this,void 0,void 0,function(){var Z,M,H,W,ee,fe,Y;return u(this,function(X){switch(X.label){case 0:Z=Date.now()+I(4),M=Date.now()+F,H=v+"-"+O,W=this.storageHandler===void 0?y:this.storageHandler,X.label=1;case 1:return Date.now()<M?[4,k(30)]:[3,8];case 2:return X.sent(),W.getItemSync(H)!==null?[3,5]:(ee=this.id+"-"+O+"-"+Z,[4,k(Math.floor(25*Math.random()))]);case 3:return X.sent(),W.setItemSync(H,JSON.stringify({id:this.id,iat:Z,timeoutKey:ee,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,k(30)];case 4:return X.sent(),(fe=W.getItemSync(H))!==null&&(Y=JSON.parse(fe)).id===this.id&&Y.iat===Z?(this.acquiredIatSet.add(Z),this.refreshLockWhileAcquired(H,Z),[2,!0]):[3,7];case 5:return $.lockCorrector(this.storageHandler===void 0?y:this.storageHandler),[4,this.waitForSomethingToChange(M)];case 6:X.sent(),X.label=7;case 7:return Z=Date.now()+I(4),[3,1];case 8:return[2,!1]}})})},$.prototype.refreshLockWhileAcquired=function(O,F){return c(this,void 0,void 0,function(){var Z=this;return u(this,function(M){return setTimeout(function(){return c(Z,void 0,void 0,function(){var H,W,ee;return u(this,function(fe){switch(fe.label){case 0:return[4,f.default().lock(F)];case 1:return fe.sent(),!this.acquiredIatSet.has(F)||(W=(H=this.storageHandler===void 0?y:this.storageHandler).getItemSync(O))===null?(f.default().unlock(F),[2]):((ee=JSON.parse(W)).timeRefreshed=Date.now(),H.setItemSync(O,JSON.stringify(ee)),f.default().unlock(F),this.refreshLockWhileAcquired(O,F),[2])}})})},1e3),[2]})})},$.prototype.waitForSomethingToChange=function(O){return c(this,void 0,void 0,function(){return u(this,function(F){switch(F.label){case 0:return[4,new Promise(function(Z){var M=!1,H=Date.now(),W=!1;function ee(){if(W||(window.removeEventListener("storage",ee),$.removeFromWaiting(ee),clearTimeout(fe),W=!0),!M){M=!0;var Y=50-(Date.now()-H);Y>0?setTimeout(Z,Y):Z(null)}}window.addEventListener("storage",ee),$.addToWaiting(ee);var fe=setTimeout(ee,Math.max(0,O-Date.now()))})];case 1:return F.sent(),[2]}})})},$.addToWaiting=function(O){this.removeFromWaiting(O),$.waiters!==void 0&&$.waiters.push(O)},$.removeFromWaiting=function(O){$.waiters!==void 0&&($.waiters=$.waiters.filter(function(F){return F!==O}))},$.notifyWaiters=function(){$.waiters!==void 0&&$.waiters.slice().forEach(function(O){return O()})},$.prototype.releaseLock=function(O){return c(this,void 0,void 0,function(){return u(this,function(F){switch(F.label){case 0:return[4,this.releaseLock__private__(O)];case 1:return[2,F.sent()]}})})},$.prototype.releaseLock__private__=function(O){return c(this,void 0,void 0,function(){var F,Z,M,H;return u(this,function(W){switch(W.label){case 0:return F=this.storageHandler===void 0?y:this.storageHandler,Z=v+"-"+O,(M=F.getItemSync(Z))===null?[2]:(H=JSON.parse(M)).id!==this.id?[3,2]:[4,f.default().lock(H.iat)];case 1:W.sent(),this.acquiredIatSet.delete(H.iat),F.removeItemSync(Z),f.default().unlock(H.iat),$.notifyWaiters(),W.label=2;case 2:return[2]}})})},$.lockCorrector=function(O){for(var F=Date.now()-5e3,Z=[],M=0;;){var H=O.keySync(M);if(H===null)break;Z.push(H),M++}for(var W=!1,ee=0;ee<Z.length;ee++){var fe=Z[ee];if(fe.includes(v)){var Y=O.getItemSync(fe);if(Y!==null){var X=JSON.parse(Y);(X.timeRefreshed===void 0&&X.timeAcquired<F||X.timeRefreshed!==void 0&&X.timeRefreshed<F)&&(O.removeItemSync(fe),W=!0)}}}W&&$.notifyWaiters()},$.waiters=void 0,$})()},6119:function(i,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function c(){var u=this;this.locked=new Map,this.addToLocked=function(p,f){var v=u.locked.get(p);v===void 0?f===void 0?u.locked.set(p,[]):u.locked.set(p,[f]):f!==void 0&&(v.unshift(f),u.locked.set(p,v))},this.isLocked=function(p){return u.locked.has(p)},this.lock=function(p){return new Promise(function(f,v){u.isLocked(p)?u.addToLocked(p,f):(u.addToLocked(p),f())})},this.unlock=function(p){var f=u.locked.get(p);if(f===void 0||f.length===0)return void u.locked.delete(p);var v=f.pop();u.locked.set(p,f),v!==void 0&&setTimeout(v,0)}}return c.getInstance=function(){return c.instance===void 0&&(c.instance=new c),c.instance},c})();r.default=function(){return s.getInstance()}},4763:function(i){i.exports=function(r,s){if(typeof r!="string")throw TypeError("Expected a string");for(var c,u=String(r),p="",f=!!s&&!!s.extended,v=!!s&&!!s.globstar,y=!1,k=s&&typeof s.flags=="string"?s.flags:"",I=0,$=u.length;I<$;I++)switch(c=u[I]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":p+="\\"+c;break;case"?":if(f){p+=".";break}case"[":case"]":if(f){p+=c;break}case"{":if(f){y=!0,p+="(";break}case"}":if(f){y=!1,p+=")";break}case",":if(y){p+="|";break}p+="\\"+c;break;case"*":for(var O=u[I-1],F=1;u[I+1]==="*";)F++,I++;var Z=u[I+1];v?F>1&&(O==="/"||O===void 0)&&(Z==="/"||Z===void 0)?(p+="((?:[^/]*(?:/|$))*)",I++):p+="([^/]*)":p+=".*";break;default:p+=c}return k&&~k.indexOf("g")||(p="^"+p+"$"),new RegExp(p,k)}},4096:function(i){var r=(function(s){"use strict";var c,u=Object.prototype,p=u.hasOwnProperty,f=Object.defineProperty||function(oe,ce,xe){oe[ce]=xe.value},v=typeof Symbol=="function"?Symbol:{},y=v.iterator||"@@iterator",k=v.asyncIterator||"@@asyncIterator",I=v.toStringTag||"@@toStringTag";function $(oe,ce,xe){return Object.defineProperty(oe,ce,{value:xe,enumerable:!0,configurable:!0,writable:!0}),oe[ce]}try{$({},"")}catch{$=function(ce,xe,Ce){return ce[xe]=Ce}}function O(oe,ce,xe,Ce){var ve,Qe,De,zt,ur=Object.create((ce&&ce.prototype instanceof ee?ce:ee).prototype);return f(ur,"_invoke",{value:(ve=oe,Qe=xe,De=new Et(Ce||[]),zt=Z,function(Pr,hn){if(zt===M)throw Error("Generator is already running");if(zt===H){if(Pr==="throw")throw hn;return{value:c,done:!0}}for(De.method=Pr,De.arg=hn;;){var Cr=De.delegate;if(Cr){var dr=(function Mr(Nt,Be){var mn=Be.method,gn=Nt.iterator[mn];if(c===gn)return Be.delegate=null,mn==="throw"&&Nt.iterator.return&&(Be.method="return",Be.arg=c,Mr(Nt,Be),Be.method==="throw")||mn!=="return"&&(Be.method="throw",Be.arg=TypeError("The iterator does not provide a '"+mn+"' method")),W;var Br=F(gn,Nt.iterator,Be.arg);if(Br.type==="throw")return Be.method="throw",Be.arg=Br.arg,Be.delegate=null,W;var At=Br.arg;return At?At.done?(Be[Nt.resultName]=At.value,Be.next=Nt.nextLoc,Be.method!=="return"&&(Be.method="next",Be.arg=c),Be.delegate=null,W):At:(Be.method="throw",Be.arg=TypeError("iterator result is not an object"),Be.delegate=null,W)})(Cr,De);if(dr){if(dr===W)continue;return dr}}if(De.method==="next")De.sent=De._sent=De.arg;else if(De.method==="throw"){if(zt===Z)throw zt=H,De.arg;De.dispatchException(De.arg)}else De.method==="return"&&De.abrupt("return",De.arg);zt=M;var or=F(ve,Qe,De);if(or.type==="normal"){if(zt=De.done?H:"suspendedYield",or.arg===W)continue;return{value:or.arg,done:De.done}}or.type==="throw"&&(zt=H,De.method="throw",De.arg=or.arg)}})}),ur}function F(oe,ce,xe){try{return{type:"normal",arg:oe.call(ce,xe)}}catch(Ce){return{type:"throw",arg:Ce}}}s.wrap=O;var Z="suspendedStart",M="executing",H="completed",W={};function ee(){}function fe(){}function Y(){}var X={};$(X,y,function(){return this});var Ke=Object.getPrototypeOf,lt=Ke&&Ke(Ke(tt([])));lt&<!==u&&p.call(lt,y)&&(X=lt);var Ye=Y.prototype=ee.prototype=Object.create(X);function Tt(oe){["next","throw","return"].forEach(function(ce){$(oe,ce,function(xe){return this._invoke(ce,xe)})})}function Re(oe,ce){var xe;f(this,"_invoke",{value:function(Ce,ve){function Qe(){return new ce(function(De,zt){(function ur(Pr,hn,Cr,dr){var or=F(oe[Pr],oe,hn);if(or.type==="throw")dr(or.arg);else{var Mr=or.arg,Nt=Mr.value;return Nt&&typeof Nt=="object"&&p.call(Nt,"__await")?ce.resolve(Nt.__await).then(function(Be){ur("next",Be,Cr,dr)},function(Be){ur("throw",Be,Cr,dr)}):ce.resolve(Nt).then(function(Be){Mr.value=Be,Cr(Mr)},function(Be){return ur("throw",Be,Cr,dr)})}})(Ce,ve,De,zt)})}return xe=xe?xe.then(Qe,Qe):Qe()}})}function pt(oe){var ce={tryLoc:oe[0]};1 in oe&&(ce.catchLoc=oe[1]),2 in oe&&(ce.finallyLoc=oe[2],ce.afterLoc=oe[3]),this.tryEntries.push(ce)}function ye(oe){var ce=oe.completion||{};ce.type="normal",delete ce.arg,oe.completion=ce}function Et(oe){this.tryEntries=[{tryLoc:"root"}],oe.forEach(pt,this),this.reset(!0)}function tt(oe){if(oe!=null){var ce=oe[y];if(ce)return ce.call(oe);if(typeof oe.next=="function")return oe;if(!isNaN(oe.length)){var xe=-1,Ce=function ve(){for(;++xe<oe.length;)if(p.call(oe,xe))return ve.value=oe[xe],ve.done=!1,ve;return ve.value=c,ve.done=!0,ve};return Ce.next=Ce}}throw TypeError(typeof oe+" is not iterable")}return fe.prototype=Y,f(Ye,"constructor",{value:Y,configurable:!0}),f(Y,"constructor",{value:fe,configurable:!0}),fe.displayName=$(Y,I,"GeneratorFunction"),s.isGeneratorFunction=function(oe){var ce=typeof oe=="function"&&oe.constructor;return!!ce&&(ce===fe||(ce.displayName||ce.name)==="GeneratorFunction")},s.mark=function(oe){return Object.setPrototypeOf?Object.setPrototypeOf(oe,Y):(oe.__proto__=Y,$(oe,I,"GeneratorFunction")),oe.prototype=Object.create(Ye),oe},s.awrap=function(oe){return{__await:oe}},Tt(Re.prototype),$(Re.prototype,k,function(){return this}),s.AsyncIterator=Re,s.async=function(oe,ce,xe,Ce,ve){ve===void 0&&(ve=Promise);var Qe=new Re(O(oe,ce,xe,Ce),ve);return s.isGeneratorFunction(ce)?Qe:Qe.next().then(function(De){return De.done?De.value:Qe.next()})},Tt(Ye),$(Ye,I,"Generator"),$(Ye,y,function(){return this}),$(Ye,"toString",function(){return"[object Generator]"}),s.keys=function(oe){var ce=Object(oe),xe=[];for(var Ce in ce)xe.push(Ce);return xe.reverse(),function ve(){for(;xe.length;){var Qe=xe.pop();if(Qe in ce)return ve.value=Qe,ve.done=!1,ve}return ve.done=!0,ve}},s.values=tt,Et.prototype={constructor:Et,reset:function(oe){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(ye),!oe)for(var ce in this)ce.charAt(0)==="t"&&p.call(this,ce)&&!isNaN(+ce.slice(1))&&(this[ce]=c)},stop:function(){this.done=!0;var oe=this.tryEntries[0].completion;if(oe.type==="throw")throw oe.arg;return this.rval},dispatchException:function(oe){if(this.done)throw oe;var ce=this;function xe(ur,Pr){return Qe.type="throw",Qe.arg=oe,ce.next=ur,Pr&&(ce.method="next",ce.arg=c),!!Pr}for(var Ce=this.tryEntries.length-1;Ce>=0;--Ce){var ve=this.tryEntries[Ce],Qe=ve.completion;if(ve.tryLoc==="root")return xe("end");if(ve.tryLoc<=this.prev){var De=p.call(ve,"catchLoc"),zt=p.call(ve,"finallyLoc");if(De&&zt){if(this.prev<ve.catchLoc)return xe(ve.catchLoc,!0);if(this.prev<ve.finallyLoc)return xe(ve.finallyLoc)}else if(De){if(this.prev<ve.catchLoc)return xe(ve.catchLoc,!0)}else if(zt){if(this.prev<ve.finallyLoc)return xe(ve.finallyLoc)}else throw Error("try statement without catch or finally")}}},abrupt:function(oe,ce){for(var xe=this.tryEntries.length-1;xe>=0;--xe){var Ce=this.tryEntries[xe];if(Ce.tryLoc<=this.prev&&p.call(Ce,"finallyLoc")&&this.prev<Ce.finallyLoc){var ve=Ce;break}}ve&&(oe==="break"||oe==="continue")&&ve.tryLoc<=ce&&ce<=ve.finallyLoc&&(ve=null);var Qe=ve?ve.completion:{};return Qe.type=oe,Qe.arg=ce,ve?(this.method="next",this.next=ve.finallyLoc,W):this.complete(Qe)},complete:function(oe,ce){if(oe.type==="throw")throw oe.arg;return oe.type==="break"||oe.type==="continue"?this.next=oe.arg:oe.type==="return"?(this.rval=this.arg=oe.arg,this.method="return",this.next="end"):oe.type==="normal"&&ce&&(this.next=ce),W},finish:function(oe){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var xe=this.tryEntries[ce];if(xe.finallyLoc===oe)return this.complete(xe.completion,xe.afterLoc),ye(xe),W}},catch:function(oe){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var xe=this.tryEntries[ce];if(xe.tryLoc===oe){var Ce=xe.completion;if(Ce.type==="throw"){var ve=Ce.arg;ye(xe)}return ve}}throw Error("illegal catch attempt")},delegateYield:function(oe,ce,xe){return this.delegate={iterator:tt(oe),resultName:ce,nextLoc:xe},this.method==="next"&&(this.arg=c),W}},s})(i.exports);try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},t={};function n(i){var r=t[i];if(r!==void 0)return r.exports;var s=t[i]={id:i,loaded:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}return n.m=e,n.n=i=>{var r=i&&i.__esModule?()=>i.default:()=>i;return n.d(r,{a:r}),r},(()=>{var i,r=Object.getPrototypeOf?s=>Object.getPrototypeOf(s):s=>s.__proto__;n.t=function(s,c){if(1&c&&(s=this(s)),8&c||typeof s=="object"&&s&&(4&c&&s.__esModule||16&c&&typeof s.then=="function"))return s;var u=Object.create(null);n.r(u);var p={};i=i||[null,r({}),r([]),r(r)];for(var f=2&c&&s;typeof f=="object"&&!~i.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach(v=>{p[v]=()=>s[v]});return p.default=()=>s,n.d(u,p),u}})(),n.d=(i,r)=>{for(var s in r)n.o(r,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:r[s]})},n.f={},n.e=i=>Promise.all(Object.keys(n.f).reduce((r,s)=>(n.f[s](i,r),r),[])),n.hmd=i=>((i=Object.create(i)).children||(i.children=[]),Object.defineProperty(i,"exports",{enumerable:!0,set:()=>{throw Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+i.id)}}),i),n.u=i=>""+(i==="199"?"cookieSuffix":i)+"_clerk.headless_"+n.h().slice(0,6)+"_5.109.2.js",n.h=()=>"15b4b7b8a54edb47",n.g=(()=>{if(typeof globalThis=="object")return globalThis;try{return bc||Function("return this")()}catch{if(typeof window=="object")return window}})(),n.o=(i,r)=>Object.prototype.hasOwnProperty.call(i,r),(()=>{var i={},r="@clerk/clerk-js:";n.l=function(s,c,u,p){if(i[s])return void i[s].push(c);if(u!==void 0)for(var f,v,y=document.getElementsByTagName("script"),k=0;k<y.length;k++){var I=y[k];if(I.getAttribute("src")==s||I.getAttribute("data-webpack")==r+u){f=I;break}}f||(v=!0,(f=document.createElement("script")).charset="utf-8",f.timeout=120,n.nc&&f.setAttribute("nonce",n.nc),f.setAttribute("data-webpack",r+u),f.src=s),i[s]=[c];var $=function(F,Z){f.onerror=f.onload=null,clearTimeout(O);var M=i[s];if(delete i[s],f.parentNode&&f.parentNode.removeChild(f),M&&M.forEach(function(H){return H(Z)}),F)return F(Z)},O=setTimeout($.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=$.bind(null,f.onerror),f.onload=$.bind(null,f.onload),v&&document.head.appendChild(f)}})(),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},n.p="",(()=>{var i={994:0};n.f.j=function(c,u){var p=n.o(i,c)?i[c]:void 0;if(p!==0)if(p)u.push(p[2]);else{var f=new Promise((k,I)=>p=i[c]=[k,I]);u.push(p[2]=f);var v=n.p+n.u(c),y=Error();n.l(v,function(k){if(n.o(i,c)&&((p=i[c])!==0&&(i[c]=void 0),p)){var I=k&&(k.type==="load"?"missing":k.type),$=k&&k.target&&k.target.src;y.message="Loading chunk "+c+` failed.
|
|
164
|
-
(`+I+": "+$+")",y.name="ChunkLoadError",y.type=I,y.request=$,p[1](y)}},"chunk-"+c,c)}};var r=(c,u)=>{var p,f,v=u[0],y=u[1],k=u[2],I=0;if(v.some($=>i[$]!==0)){for(p in y)n.o(y,p)&&(n.m[p]=y[p]);k&&k(n)}for(c&&c(u);I<v.length;I++)f=v[I],n.o(i,f)&&i[f]&&i[f][0](),i[f]=0},s=globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[];s.forEach(r.bind(null,0)),s.push=r.bind(null,s.push.bind(s))})(),n(3822)})())});var jI=$t((nZ,DI)=>{"use strict";g();DI.exports=RI()});async function FI(e){let t=new VR(e);return await t.load({standardBrowser:!1}),t}async function MI(e,t){let n=await e.client?.signIn.create({ticket:t,strategy:"ticket"});if(!n||!n.createdSessionId)throw new Error("Failed to sign in.");return{createdSessionId:n.createdSessionId}}var LI,VR,BI=z(()=>{"use strict";g();LI=Ln(jI(),1),VR=LI.default.Clerk});async function ey(e,t){await e.fsPromise.stat(t).then(()=>!0).catch(()=>!1)||await e.fsPromise.mkdir(t,{recursive:!0})}function xc(e){if(!e.path)throw new Error("No `path` found in context.");if(!e.os)throw new Error("No `os` found in context.");let t=e.os.homedir();return e.path.join(t,".swirls")}var ty=z(()=>{"use strict";g()});function ry(e){return`${xc(e)}/credentials`}async function ZI(e){let t=ry(e);await e.fsPromise.stat(t).then(()=>!0).catch(()=>!1)&&await e.fsPromise.unlink(t)}async function vp(e){let t=ry(e),n=await e.fsPromise.readFile(t,"utf8");return Vn(qR,JSON.parse(n))}async function ny(e,t,n,i){let r=ry(e);await ey(e,xc(e)),await e.fsPromise.writeFile(r,JSON.stringify({idToken:t,jwt:n,sessionId:i}))}var qR,yp=z(()=>{"use strict";g();yc();ty();qR=Ei({idToken:_r(),jwt:_r(),sessionId:_r()})});import WI from"fs";function JR(){try{return WI.statSync("/.dockerenv"),!0}catch{return!1}}function KR(){try{return WI.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function oy(){return iy===void 0&&(iy=JR()||KR()),iy}var iy,VI=z(()=>{"use strict";g()});import GR from"fs";function Cs(){return sy===void 0&&(sy=HR()||oy()),sy}var sy,HR,ay=z(()=>{"use strict";g();VI();HR=()=>{try{return GR.statSync("/run/.containerenv"),!0}catch{return!1}}});import JI from"process";import XR from"os";import YR from"fs";var qI,Ai,cy=z(()=>{"use strict";g();ay();qI=()=>{if(JI.platform!=="linux")return!1;if(XR.release().toLowerCase().includes("microsoft"))return!Cs();try{return YR.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Cs():!1}catch{return!1}},Ai=JI.env.__IS_WSL_TEST__?qI:qI()});import KI from"process";import GI,{constants as QR}from"fs/promises";var e4,t4,ly,HI=z(()=>{"use strict";g();cy();cy();e4=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let n="/etc/wsl.conf",i=!1;try{await GI.access(n,QR.F_OK),i=!0}catch{}if(!i)return e;let r=await GI.readFile(n,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(r);return s?(t=s.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),t4=async()=>`${await e4()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,ly=async()=>Ai?t4():`${KI.env.SYSTEMROOT||KI.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`});function Pi(e,t,n){let i=r=>Object.defineProperty(e,t,{value:r,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let r=n();return i(r),r},set(r){i(r)}}),e}var XI=z(()=>{"use strict";g()});import{promisify as r4}from"util";import n4 from"process";import{execFile as i4}from"child_process";async function uy(){if(n4.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await o4("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),n=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari";return n==="com.apple.safari"?"com.apple.Safari":n}var o4,YI=z(()=>{"use strict";g();o4=r4(i4)});import s4 from"process";import{promisify as a4}from"util";import{execFile as c4,execFileSync as MZ}from"child_process";async function QI(e,{humanReadableOutput:t=!0,signal:n}={}){if(s4.platform!=="darwin")throw new Error("macOS only");let i=t?[]:["-ss"],r={};n&&(r.signal=n);let{stdout:s}=await l4("osascript",["-e",e,i],r);return s.trim()}var l4,eT=z(()=>{"use strict";g();l4=a4(c4)});async function dy(e){return QI(`tell application "Finder" to set app_path to application file id "${e}" as string
|
|
165
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var tT=z(()=>{"use strict";g();eT()});import{promisify as u4}from"util";import{execFile as d4}from"child_process";async function fy(e=p4){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new py(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:i}=n.groups,r=i.lastIndexOf("."),s=i.lastIndexOf("-"),c=r===-1?void 0:i.slice(0,r),u=s===-1?void 0:i.slice(0,s);return bp[i]??bp[c]??bp[u]??{name:i,id:i}}var p4,bp,GZ,py,rT=z(()=>{"use strict";g();p4=u4(d4),bp={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}},GZ=new Map(Object.entries(bp)),py=class extends Error{}});import{promisify as f4}from"util";import hy from"process";import{execFile as h4}from"child_process";async function my(){if(hy.platform==="darwin"){let e=await uy();return{name:await dy(e),id:e}}if(hy.platform==="linux"){let{stdout:e}=await m4("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:g4(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(hy.platform==="win32")return fy();throw new Error("Only macOS, Linux, and Windows are supported")}var m4,g4,nT=z(()=>{"use strict";g();YI();tT();rT();m4=f4(h4),g4=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase())});import cT from"process";import{Buffer as lT}from"buffer";import uT from"path";import{fileURLToPath as _4}from"url";import{promisify as v4}from"util";import dT from"child_process";import y4,{constants as b4}from"fs/promises";async function w4(){let e=await ly(),t=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,n=lT.from(t,"utf16le").toString("base64"),{stdout:i}=await x4(e,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",n],{encoding:"utf8"}),r=i.trim(),s={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return s[r]?{id:s[r]}:{}}function aT(e){if(typeof e=="string"||Array.isArray(e))return e;let{[oT]:t}=e;if(!t)throw new Error(`${oT} is not supported`);return t}function wp({[Os]:e},{wsl:t}){if(t&&Ai)return aT(t);if(!e)throw new Error(`${Os} is not supported`);return aT(e)}var x4,gy,iT,Os,oT,sT,xp,k4,so,kp,_y=z(()=>{"use strict";g();HI();XI();nT();ay();x4=v4(dT.execFile),gy=uT.dirname(_4(import.meta.url)),iT=uT.join(gy,"xdg-open"),{platform:Os,arch:oT}=cT;sT=async(e,t)=>{let n;for(let i of e)try{return await t(i)}catch(r){n=r}throw n},xp=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return sT(e.app,u=>xp({...e,app:u}));let{name:t,arguments:n=[]}=e.app??{};if(n=[...n],Array.isArray(t))return sT(t,u=>xp({...e,app:{name:u,arguments:n}}));if(t==="browser"||t==="browserPrivate"){let u={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},p={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},f=Ai?await w4():await my();if(f.id in u){let v=u[f.id];return t==="browserPrivate"&&n.push(p[v]),xp({...e,app:{name:so[v],arguments:n}})}throw new Error(`${f.name} is not supported as a default browser`)}let i,r=[],s={};if(Os==="darwin")i="open",e.wait&&r.push("--wait-apps"),e.background&&r.push("--background"),e.newInstance&&r.push("--new"),t&&r.push("-a",t);else if(Os==="win32"||Ai&&!Cs()&&!t){i=await ly(),r.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),Ai||(s.windowsVerbatimArguments=!0);let u=["Start"];e.wait&&u.push("-Wait"),t?(u.push(`"\`"${t}\`""`),e.target&&n.push(e.target)):e.target&&u.push(`"${e.target}"`),n.length>0&&(n=n.map(p=>`"\`"${p}\`""`),u.push("-ArgumentList",n.join(","))),e.target=lT.from(u.join(" "),"utf16le").toString("base64")}else{if(t)i=t;else{let u=!gy||gy==="/",p=!1;try{await y4.access(iT,b4.X_OK),p=!0}catch{}i=cT.versions.electron??(Os==="android"||u||!p)?"xdg-open":iT}n.length>0&&r.push(...n),e.wait||(s.stdio="ignore",s.detached=!0)}Os==="darwin"&&n.length>0&&r.push("--args",...n),e.target&&r.push(e.target);let c=dT.spawn(i,r,s);return e.wait?new Promise((u,p)=>{c.once("error",p),c.once("close",f=>{if(!e.allowNonzeroExitCode&&f>0){p(new Error(`Exited with code ${f}`));return}u(c)})}):(c.unref(),c)},k4=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return xp({...t,target:e})};so={};Pi(so,"chrome",()=>wp({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Pi(so,"brave",()=>wp({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));Pi(so,"firefox",()=>wp({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Pi(so,"edge",()=>wp({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Pi(so,"browser",()=>"browser");Pi(so,"browserPrivate",()=>"browserPrivate");kp=k4});function pT(e=32){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=new Uint8Array(e);crypto.getRandomValues(n);let i="";for(let r of n)i+=t[r%t.length];return i}function fT(e){let t=new URLSearchParams({client_id:e.clientId,redirect_uri:e.redirectUri,response_type:"code",scope:"openid profile email",state:e.state});kp(`${e.authorizeUri}?${t}`)}var hT=z(()=>{"use strict";g();_y()});function mT(e){return e[0]??{}}function co(e){return Array.isArray(e)?e:e==null?[]:[e]}function yy(e){let t;return()=>{if(t)return t.result;let n=e();return t={result:n},n}}function I4(e){let t=Promise.resolve();return(...n)=>t=t.catch(()=>{}).then(()=>e(...n))}function wc(){return globalThis[E4]}function Sp(e,t={},n){return wc()?.tracer?.startSpan(e,t,n)}function Ci(e,t,n={}){if(!e)return;let i=A4(t);e.recordException(i),(!n.signal?.aborted||n.signal.reason!==t)&&e.setStatus({code:T4,message:i.message})}function A4(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return"code"in e&&(typeof e.code=="string"||typeof e.code=="number")&&(t.code=e.code),t}return{message:String(e)}}async function lo({name:e,context:t,...n},i){let r=wc()?.tracer;if(!r)return i();let s=async c=>{try{return await i(c)}catch(u){throw Ci(c,u,n),u}finally{c.end()}};return t?r.startActiveSpan(e,n,t,s):r.startActiveSpan(e,n,s)}async function ao(e,t){let n=wc();if(!e||!n)return t();let i=n.trace.setSpan(n.context.active(),e);return n.context.with(i,t)}function Jn(e){return!e||typeof e!="object"?!1:"next"in e&&typeof e.next=="function"&&Symbol.asyncIterator in e&&typeof e[Symbol.asyncIterator]=="function"}function by({name:e,...t},n){let i;return new qn(async()=>{i??=Sp(e);try{let r=await ao(i,()=>n.next());return i?.addEvent(r.done?"completed":"yielded"),r}catch(r){throw Ci(i,r,t),r}},async r=>{try{r!=="next"&&await ao(i,()=>n.return?.())}catch(s){throw Ci(i,s,t),s}finally{i?.end()}})}function xy(e){return async(t,...n)=>{try{return await t.next()}catch(i){throw await e(i,t,...n),i}}}function kc(e,t,n){let i=(r,s)=>{let c=e[s];return c?c({...r,next:(u=r)=>i(u,s+1)}):n(r)};return i(t,0)}function $c(e){if(e)return JSON.parse(e)}function uo(e){return JSON.stringify(e)}function gT(e){return Pn(e)?Object.getPrototypeOf(e)?.constructor:null}function Ip(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function Pn(e){return!!e&&(typeof e=="object"||typeof e=="function")}function Sc(e,...t){return typeof e=="function"?e(...t):e}function wy(e){return new Proxy(e,{get(t,n,i){let r=Reflect.get(t,n,i);return n!=="then"||typeof r!="function"?r:new Proxy(r,{apply(s,c,u){if(u.length!==2||u.some(f=>!U4(f)))return Reflect.apply(s,c,u);let p=!0;u[0].call(c,wy(new Proxy(t,{get:(f,v,y)=>{if(p&&v==="then"){p=!1;return}return Reflect.get(f,v,y)}})))}})}})}function U4(e){return typeof e=="function"&&O4.test(e.toString())}function _T(e){try{return decodeURIComponent(e)}catch{return e}}var vy,$4,S4,$p,T4,E4,P4,C4,qn,O4,Kn=z(()=>{"use strict";g();vy="orpc",$4="@orpc/shared",S4="1.12.2",$p=class extends Error{constructor(...t){super(...t),this.name="AbortError"}};T4=2,E4=`__${$4}@${S4}/otel/config__`;P4=Symbol.for("asyncDispose"),C4=Symbol.asyncDispose??P4,qn=class{#r=!1;#i=!1;#n;#a;constructor(t,n){this.#n=n,this.#a=I4(async()=>{if(this.#r)return{done:!0,value:void 0};try{let i=await t();return i.done&&(this.#r=!0),i}catch(i){throw this.#r=!0,i}finally{this.#r&&!this.#i&&(this.#i=!0,await this.#n("next"))}})}next(){return this.#a()}async return(t){return this.#r=!0,this.#i||(this.#i=!0,await this.#n("return")),{done:!0,value:t}}async throw(t){throw this.#r=!0,this.#i||(this.#i=!0,await this.#n("throw")),t}async[C4](){this.#r=!0,this.#i||(this.#i=!0,await this.#n("dispose"))}[Symbol.asyncIterator](){return this}};O4=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/});function bT(e,t){return t??Ic[e]?.status??500}function xT(e,t){return t||Ic[e]?.message||e}function $y(e){return e instanceof Gn?e:new Gn("INTERNAL_SERVER_ERROR",{message:"Internal server error",cause:e})}function Tc(e){return e<200||e>=400}function Tp(e){if(!Ip(e))return!1;let t=["defined","code","status","message","data"];return Object.keys(e).some(n=>!t.includes(n))?!1:"defined"in e&&typeof e.defined=="boolean"&&"code"in e&&typeof e.code=="string"&&"status"in e&&typeof e.status=="number"&&Tc(e.status)&&"message"in e&&typeof e.message=="string"}function Ep(e,t={}){return new Gn(e.code,{...t,...e})}var vT,yT,Ic,wT,ky,Gn,Ec=z(()=>{"use strict";g();Kn();vT="@orpc/client",yT="1.12.2",Ic={BAD_REQUEST:{status:400,message:"Bad Request"},UNAUTHORIZED:{status:401,message:"Unauthorized"},FORBIDDEN:{status:403,message:"Forbidden"},NOT_FOUND:{status:404,message:"Not Found"},METHOD_NOT_SUPPORTED:{status:405,message:"Method Not Supported"},NOT_ACCEPTABLE:{status:406,message:"Not Acceptable"},TIMEOUT:{status:408,message:"Request Timeout"},CONFLICT:{status:409,message:"Conflict"},PRECONDITION_FAILED:{status:412,message:"Precondition Failed"},PAYLOAD_TOO_LARGE:{status:413,message:"Payload Too Large"},UNSUPPORTED_MEDIA_TYPE:{status:415,message:"Unsupported Media Type"},UNPROCESSABLE_CONTENT:{status:422,message:"Unprocessable Content"},TOO_MANY_REQUESTS:{status:429,message:"Too Many Requests"},CLIENT_CLOSED_REQUEST:{status:499,message:"Client Closed Request"},INTERNAL_SERVER_ERROR:{status:500,message:"Internal Server Error"},NOT_IMPLEMENTED:{status:501,message:"Not Implemented"},BAD_GATEWAY:{status:502,message:"Bad Gateway"},SERVICE_UNAVAILABLE:{status:503,message:"Service Unavailable"},GATEWAY_TIMEOUT:{status:504,message:"Gateway Timeout"}};wT=Symbol.for(`__${vT}@${yT}/error/ORPC_ERROR_CONSTRUCTORS__`);globalThis[wT]??=new WeakSet;ky=globalThis[wT],Gn=class extends Error{defined;code;status;data;constructor(t,...n){let i=mT(n);if(i.status!==void 0&&!Tc(i.status))throw new Error("[ORPCError] Invalid error status code.");let r=xT(t,i.message);super(r,i),this.code=t,this.status=bT(t,i.status),this.defined=i.defined??!1,this.data=i.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](t){if(ky.has(this)){let n=gT(t);if(n&&ky.has(n))return!0}return super[Symbol.hasInstance](t)}};ky.add(Gn)});function z4(e){let t=e.replace(/\n+$/,"").split(/\n/),n={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let i of t){let r=i.indexOf(":"),s=r===-1?i:i.slice(0,r),c=r===-1?"":i.slice(r+1).replace(/^\s/,"");if(r===0)n.comments.push(c);else if(s==="data")n.data??="",n.data+=`${c}
|
|
166
|
-
`;else if(s==="event")n.event=c;else if(s==="id")n.id=c;else if(s==="retry"){let u=Number.parseInt(c);Number.isInteger(u)&&u>=0&&u.toString()===c&&(n.retry=u)}}return n.data=n.data?.replace(/\n$/,""),n}function kT(e){if(e.includes(`
|
|
167
|
-
`))throw new Us("Event's id must not contain a newline character")}function N4(e){if(e.includes(`
|
|
168
|
-
`))throw new Us("Event's event must not contain a newline character")}function $T(e){if(!Number.isInteger(e)||e<0)throw new Us("Event's retry must be a integer and >= 0")}function ST(e){if(e.includes(`
|
|
169
|
-
`))throw new Us("Event's comment must not contain a newline character")}function R4(e){let t=e?.split(/\n/)??[],n="";for(let i of t)n+=`data: ${i}
|
|
170
|
-
`;return n}function D4(e){let t="";for(let n of e??[])ST(n),t+=`: ${n}
|
|
171
|
-
`;return t}function Ac(e){let t="";return t+=D4(e.comments),e.event!==void 0&&(N4(e.event),t+=`event: ${e.event}
|
|
172
|
-
`),e.retry!==void 0&&($T(e.retry),t+=`retry: ${e.retry}
|
|
173
|
-
`),e.id!==void 0&&(kT(e.id),t+=`id: ${e.id}
|
|
174
|
-
`),t+=R4(e.data),t+=`
|
|
175
|
-
`,t}function po(e,t){if(t.id===void 0&&t.retry===void 0&&!t.comments?.length)return e;if(t.id!==void 0&&kT(t.id),t.retry!==void 0&&$T(t.retry),t.comments!==void 0)for(let n of t.comments)ST(n);return new Proxy(e,{get(n,i,r){return i===IT?t:Reflect.get(n,i,r)}})}function zs(e){return Pn(e)?Reflect.get(e,IT):void 0}function TT(e){let t=e.replace(/"/g,'\\"'),n=encodeURIComponent(e).replace(/['()*]/g,i=>`%${i.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%(7C|60|5E)/g,(i,r)=>String.fromCharCode(Number.parseInt(r,16)));return`inline; filename="${t}"; filename*=utf-8''${n}`}function ET(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&typeof t[2]=="string")return _T(t[2]);let n=e.match(/filename="((?:\\"|[^"])*)"/i);if(n&&typeof n[1]=="string")return n[1].replace(/\\"/g,'"')}function AT(e,t){let n={...e};for(let i in t)Array.isArray(t[i])?n[i]=[...co(n[i]),...t[i]]:t[i]!==void 0&&(Array.isArray(n[i])?n[i]=[...n[i],t[i]]:n[i]!==void 0?n[i]=[n[i],t[i]]:n[i]=t[i]);return n}var Us,Sy,un,Iy,Ap,IT,Ns=z(()=>{"use strict";g();Kn();Us=class extends TypeError{},Sy=class extends TypeError{},un=class extends Error{data;constructor(t){super(t?.message??"An error event was received",t),this.data=t?.data}};Iy=class{constructor(t={}){this.options=t}incomplete="";feed(t){this.incomplete+=t;let n=this.incomplete.lastIndexOf(`
|
|
176
|
-
|
|
177
|
-
`);if(n===-1)return;let i=this.incomplete.slice(0,n).split(/\n\n/);this.incomplete=this.incomplete.slice(n+2);for(let r of i){let s=z4(`${r}
|
|
178
|
-
|
|
179
|
-
`);this.options.onEvent&&this.options.onEvent(s)}this.incomplete=""}end(){if(this.incomplete)throw new Sy("Event Iterator ended before complete")}},Ap=class extends TransformStream{constructor(){let t;super({start(n){t=new Iy({onEvent:i=>{n.enqueue(i)}})},transform(n){t.feed(n)},flush(){t.end()}})}};IT=Symbol("ORPC_EVENT_SOURCE_META")});function Pp(e,t){let n=async i=>{let r=await t.error(i);if(r!==i){let s=zs(i);s&&Pn(r)&&(r=po(r,s))}return r};return new qn(async()=>{let{done:i,value:r}=await(async()=>{try{return await e.next()}catch(c){throw await n(c)}})(),s=await t.value(r,i);if(s!==r){let c=zs(r);c&&Pn(s)&&(s=po(s,c))}return{done:i,value:s}},async()=>{try{await e.return?.()}catch(i){throw await n(i)}})}var Cp=z(()=>{"use strict";g();Kn();Ns()});function j4(e){return{...e,context:e.context??{}}}function Ty(e,t={}){let n=t.path??[],i=async(...[s,c={}])=>await e.call(n,s,j4(c)),r=new Proxy(i,{get(s,c){return typeof c!="string"?Reflect.get(s,c):Ty(e,{...t,path:[...n,c]})}});return wy(r)}var PT=z(()=>{"use strict";g();Kn();Kn();Ec();Ec();Cp();Ns()});function L4(e,t={}){let i=e?.pipeThrough(new TextDecoderStream).pipeThrough(new Ap)?.getReader(),r,s=!1;return new qn(async()=>{r??=Sp("consume_event_iterator_stream");try{for(;;){if(i===void 0)return{done:!0,value:void 0};let{done:c,value:u}=await ao(r,()=>i.read());if(c){if(s)throw new $p("Stream was cancelled");return{done:!0,value:void 0}}switch(u.event){case"message":{let p=$c(u.data);return Pn(p)&&(p=po(p,u)),r?.addEvent("message"),{done:!1,value:p}}case"error":{let p=new un({data:$c(u.data)});throw p=po(p,u),r?.addEvent("error"),p}case"done":{let p=$c(u.data);return Pn(p)&&(p=po(p,u)),r?.addEvent("done"),{done:!0,value:p}}default:r?.addEvent("maybe_keepalive")}}}catch(c){throw c instanceof un||Ci(r,c,t),c}},async c=>{try{c!=="next"&&(s=!0,r?.addEvent("cancelled")),await ao(r,()=>i?.cancel())}catch(u){throw Ci(r,u,t),u}finally{r?.end()}})}function F4(e,t={}){let n=t.eventIteratorKeepAliveEnabled??!0,i=t.eventIteratorKeepAliveInterval??5e3,r=t.eventIteratorKeepAliveComment??"",s=t.eventIteratorInitialCommentEnabled??!0,c=t.eventIteratorInitialComment??"",u=!1,p,f;return new ReadableStream({start(y){f=Sp("stream_event_iterator"),s&&y.enqueue(Ac({comments:[c]}))},async pull(y){try{n&&(p=setInterval(()=>{y.enqueue(Ac({comments:[r]})),f?.addEvent("keepalive")},i));let k=await ao(f,()=>e.next());if(clearInterval(p),u)return;let I=zs(k.value);if(!k.done||k.value!==void 0||I!==void 0){let $=k.done?"done":"message";y.enqueue(Ac({...I,event:$,data:uo(k.value)})),f?.addEvent($)}k.done&&(y.close(),f?.end())}catch(k){if(clearInterval(p),u)return;k instanceof un?(y.enqueue(Ac({...zs(k),event:"error",data:uo(k.data)})),f?.addEvent("error"),y.close()):(Ci(f,k),y.error(k)),f?.end()}},async cancel(){try{u=!0,clearInterval(p),f?.addEvent("cancelled"),await ao(f,()=>e.return?.())}catch(y){throw Ci(f,y),y}finally{f?.end()}}}).pipeThrough(new TextEncoderStream)}function M4(e,t={}){return lo({name:"parse_standard_body",signal:t.signal},async()=>{let n=e.headers.get("content-disposition");if(typeof n=="string"){let s=ET(n)??"blob",c=await e.blob();return new File([c],s,{type:c.type})}let i=e.headers.get("content-type");if(!i||i.startsWith("application/json")){let s=await e.text();return $c(s)}if(i.startsWith("multipart/form-data"))return await e.formData();if(i.startsWith("application/x-www-form-urlencoded")){let s=await e.text();return new URLSearchParams(s)}if(i.startsWith("text/event-stream"))return L4(e.body,t);if(i.startsWith("text/plain"))return await e.text();let r=await e.blob();return new File([r],"blob",{type:r.type})})}function B4(e,t,n={}){let i=t.get("content-disposition");if(t.delete("content-type"),t.delete("content-disposition"),e!==void 0)return e instanceof Blob?(t.set("content-type",e.type),t.set("content-length",e.size.toString()),t.set("content-disposition",i??TT(e instanceof File?e.name:"blob")),e):e instanceof FormData||e instanceof URLSearchParams?e:Jn(e)?(t.set("content-type","text/event-stream"),F4(e,n)):(t.set("content-type","application/json"),uo(e))}function Ey(e,t={}){return e.forEach((n,i)=>{Array.isArray(t[i])?t[i].push(n):t[i]!==void 0?t[i]=[t[i],n]:t[i]=n}),t}function Z4(e,t=new Headers){for(let[n,i]of Object.entries(e))if(Array.isArray(i))for(let r of i)t.append(n,r);else i!==void 0&&t.append(n,i);return t}function CT(e,t={}){let n=Z4(e.headers),i=B4(e.body,n,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:n,body:i})}function OT(e,t={}){return{body:yy(()=>M4(e,t)),status:e.status,get headers(){let n=Ey(e.headers);return Object.defineProperty(this,"headers",{value:n,writable:!0}),n},set headers(n){Object.defineProperty(this,"headers",{value:n,writable:!0})}}}var Ay=z(()=>{"use strict";g();Kn();Ns()});function W4(e){return`/${e.map(encodeURIComponent).join("/")}`}function V4(e){return typeof e.forEach=="function"?Ey(e):e}function q4(e){return Object.entries(Ic).find(([,t])=>t.status===e)?.[0]??"MALFORMED_ORPC_ERROR_RESPONSE"}var Pc,Py,cr,Cy,Oy,Uy,Op,UT=z(()=>{"use strict";g();Kn();Ns();Ec();Ay();Cp();Pc=class{plugins;constructor(t=[]){this.plugins=[...t].sort((n,i)=>(n.order??0)-(i.order??0))}init(t){for(let n of this.plugins)n.init?.(t)}},Py=class{constructor(t,n,i={}){this.codec=t,this.sender=n,new Pc(i.plugins).init(i),this.interceptors=co(i.interceptors),this.clientInterceptors=co(i.clientInterceptors)}interceptors;clientInterceptors;call(t,n,i){return lo({name:`${vy}.${t.join("/")}`,signal:i.signal},r=>(r?.setAttribute("rpc.system",vy),r?.setAttribute("rpc.method",t.join(".")),Jn(n)&&(n=by({name:"consume_event_iterator_input",signal:i.signal},n)),kc(this.interceptors,{...i,path:t,input:n},async({path:s,input:c,...u})=>{let p=wc(),f,v=p?.trace.getActiveSpan()??r;v&&p&&(f=p?.trace.setSpan(p.context.active(),v));let y=await lo({name:"encode_request",context:f},()=>this.codec.encode(s,c,u)),k=await kc(this.clientInterceptors,{...u,input:c,path:s,request:y},({input:$,path:O,request:F,...Z})=>lo({name:"send_request",signal:Z.signal,context:f},()=>this.sender.call(F,Z,O,$))),I=await lo({name:"decode_response",context:f},()=>this.codec.decode(k,u,s,c));return Jn(I)?by({name:"consume_event_iterator_output",signal:u.signal},I):I})))}},cr={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7},Cy=class{customSerializers;constructor(t={}){if(this.customSerializers=t.customJsonSerializers??[],this.customSerializers.length!==new Set(this.customSerializers.map(n=>n.type)).size)throw new Error("Custom serializer type must be unique.")}serialize(t,n=[],i=[],r=[],s=[]){for(let c of this.customSerializers)if(c.condition(t)){let u=this.serialize(c.serialize(t),n,i,r,s);return i.push([c.type,...n]),u}if(t instanceof Blob)return r.push(n),s.push(t),[t,i,r,s];if(typeof t=="bigint")return i.push([cr.BIGINT,...n]),[t.toString(),i,r,s];if(t instanceof Date)return i.push([cr.DATE,...n]),Number.isNaN(t.getTime())?[null,i,r,s]:[t.toISOString(),i,r,s];if(Number.isNaN(t))return i.push([cr.NAN,...n]),[null,i,r,s];if(t instanceof URL)return i.push([cr.URL,...n]),[t.toString(),i,r,s];if(t instanceof RegExp)return i.push([cr.REGEXP,...n]),[t.toString(),i,r,s];if(t instanceof Set){let c=this.serialize(Array.from(t),n,i,r,s);return i.push([cr.SET,...n]),c}if(t instanceof Map){let c=this.serialize(Array.from(t.entries()),n,i,r,s);return i.push([cr.MAP,...n]),c}if(Array.isArray(t))return[t.map((u,p)=>u===void 0?(i.push([cr.UNDEFINED,...n,p]),u):this.serialize(u,[...n,p],i,r,s)[0]),i,r,s];if(Ip(t)){let c={};for(let u in t)u==="toJSON"&&typeof t[u]=="function"||(c[u]=this.serialize(t[u],[...n,u],i,r,s)[0]);return[c,i,r,s]}return[t,i,r,s]}deserialize(t,n,i,r){let s={data:t};i&&r&&i.forEach((c,u)=>{let p=s,f="data";c.forEach(v=>{p=p[f],f=v}),p[f]=r(u)});for(let c of n){let u=c[0],p=s,f="data";for(let v=1;v<c.length;v++)p=p[f],f=c[v];for(let v of this.customSerializers)if(v.type===u){p[f]=v.deserialize(p[f]);break}switch(u){case cr.BIGINT:p[f]=BigInt(p[f]);break;case cr.DATE:p[f]=new Date(p[f]??"Invalid Date");break;case cr.NAN:p[f]=Number.NaN;break;case cr.UNDEFINED:p[f]=void 0;break;case cr.URL:p[f]=new URL(p[f]);break;case cr.REGEXP:{let[,v,y]=p[f].match(/^\/(.*)\/([a-z]*)$/);p[f]=new RegExp(v,y);break}case cr.SET:p[f]=new Set(p[f]);break;case cr.MAP:p[f]=new Map(p[f]);break}}return s.data}};Oy=class{constructor(t,n){this.serializer=t,this.baseUrl=n.url,this.maxUrlLength=n.maxUrlLength??2083,this.fallbackMethod=n.fallbackMethod??"POST",this.expectedMethod=n.method??this.fallbackMethod,this.headers=n.headers??{}}baseUrl;maxUrlLength;fallbackMethod;expectedMethod;headers;async encode(t,n,i){let r=V4(await Sc(this.headers,i,t,n));i.lastEventId!==void 0&&(r=AT(r,{"last-event-id":i.lastEventId}));let s=await Sc(this.expectedMethod,i,t,n),c=await Sc(this.baseUrl,i,t,n),u=new URL(c);u.pathname=`${u.pathname.replace(/\/$/,"")}${W4(t)}`;let p=this.serializer.serialize(n);if(s==="GET"&&!(p instanceof FormData)&&!Jn(p)){let f=await Sc(this.maxUrlLength,i,t,n),v=new URL(u);if(v.searchParams.append("data",uo(p)),v.toString().length<=f)return{body:void 0,method:s,headers:r,url:v,signal:i.signal}}return{url:u,method:s==="GET"?this.fallbackMethod:s,headers:r,body:p,signal:i.signal}}async decode(t){let n=!Tc(t.status),i=await(async()=>{let r=!1;try{let s=await t.body();return r=!0,this.serializer.deserialize(s)}catch(s){throw r?new Error("Invalid RPC response format.",{cause:s}):new Error("Cannot parse response body, please check the response body and content-type.",{cause:s})}})();if(!n)throw Tp(i)?Ep(i):new Gn(q4(t.status),{status:t.status,data:{...t,body:i}});return i}},Uy=class{constructor(t){this.jsonSerializer=t}serialize(t){return Jn(t)?Pp(t,{value:async n=>this.#r(n,!1),error:async n=>new un({data:this.#r($y(n).toJSON(),!1),cause:n})}):this.#r(t,!0)}#r(t,n){let[i,r,s,c]=this.jsonSerializer.serialize(t),u=r.length===0?void 0:r;if(!n||c.length===0)return{json:i,meta:u};let p=new FormData;return p.set("data",uo({json:i,meta:u,maps:s})),c.forEach((f,v)=>{p.set(v.toString(),f)}),p}deserialize(t){return Jn(t)?Pp(t,{value:async n=>this.#i(n),error:async n=>{if(!(n instanceof un))return n;let i=this.#i(n.data);return Tp(i)?Ep(i,{cause:n}):new un({data:i,cause:n})}}):this.#i(t)}#i(t){if(t===void 0)return;if(!(t instanceof FormData))return this.jsonSerializer.deserialize(t.json,t.meta??[]);let n=JSON.parse(t.get("data"));return this.jsonSerializer.deserialize(n.json,n.meta??[],n.maps,i=>t.get(i.toString()))}},Op=class extends Py{constructor(t,n){let i=new Cy(n),r=new Uy(i),s=new Oy(r,n);super(s,t,n)}}});var zy,Ny,Up,zT=z(()=>{"use strict";g();Kn();Ay();UT();Ns();Ec();Cp();zy=class extends Pc{initRuntimeAdapter(t){for(let n of this.plugins)n.initRuntimeAdapter?.(t)}},Ny=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(t){new zy(t.plugins).initRuntimeAdapter(t),this.fetch=t.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=t,this.adapterInterceptors=co(t.adapterInterceptors)}async call(t,n,i,r){let s=CT(t,this.toFetchRequestOptions),c=await kc(this.adapterInterceptors,{...n,request:s,path:i,input:r,init:{redirect:"manual"}},({request:p,path:f,input:v,init:y,...k})=>this.fetch(p,y,k,f,v));return OT(c,{signal:s.signal})}},Up=class extends Op{constructor(t){let n=new Ny(t);super(n,t)}}});var J4,K4,Rs,zp=z(()=>{"use strict";g();yc();J4=Ei({API_URL:_r(),WEB_URL:_r(),OAUTH_AUTHORIZE_URL:_r()}),K4={API_URL:"https://swirls.ai/api",WEB_URL:"https://swirls.ai",OAUTH_AUTHORIZE_URL:"https://clerk.swirls.ai/oauth/authorize"},Rs=Vn(J4,K4)});async function Xe(e){let t=new Up({url:`${Rs.API_URL}/rpc`,headers:async()=>{let i=await Ae(()=>vp(e),c=>new Error("Failed to read credentials file",{cause:c.message}));if(i.failure)return{};let{idToken:r,jwt:s}=i.data;return{Authorization:`Bearer ${s||r}`}},interceptors:[xy(i=>{i instanceof Error&&i.name})]});return Ty(t)}var vr=z(()=>{"use strict";g();rr();PT();zT();yp();zp()});function Ze(e,t){t?t.cancel(e):Xt.error(e),Xt.message(G4)}var G4,yr=z(()=>{"use strict";g();Yt();G4="If this issue persists, send us an email at help@byteslice.co, and we can help you out."});function Ct(e,t){let n="Success!";t?t.stop(`${n} ${e}`):Xt.success(`${n} ${e}`)}var Hr=z(()=>{"use strict";g();Yt()});var NT={};It(NT,{login:()=>X4});async function H4(e,t,n){let i=await Ae(async()=>await(await Xe(e)).cli.exchangeToken({code:n.code}),f=>new Error("Failed to exchange callback code for token",{cause:f.message}));if(i.failure)throw i.failure;await ny(e,i.data.idToken,"","");let r=await Ae(async()=>await(await Xe(e)).cli.createSignInTicket(),f=>new Error("Failed to exchange ID token code for a sign-in ticket",{cause:f.message}));if(r.failure)throw r.failure;let s=await FI(t.clerkPublishableKey),c=await Ae(()=>MI(s,r.data.token),f=>new Error("Failed to create a new sign-in for this device",{cause:f.message}));if(c.failure)throw c.failure;let u=await Ae(async()=>await(await Xe(e)).cli.createJwt({sessionId:c.data.createdSessionId}),f=>new Error("Failed to create a session JWT",{cause:f.message}));if(u.failure)throw u.failure;let p=await Ae(()=>ny(e,i.data.idToken,u.data,c.data.createdSessionId),f=>new Error("Failed to save your credentials to disk",{cause:f.message}));if(p.failure)throw p.failure}async function X4(){let e=await Xe(this),t=pT(),n=mt();n.start("Logging in");let i=await Ae(()=>e.cli.getConfig(),s=>new Error("Failed to retrieve authentication configuration",{cause:s.message}));i.failure&&(Ze(i.failure.message,n),process.exit(1)),fT({authorizeUri:Rs.OAUTH_AUTHORIZE_URL,clientId:i.data.clientId,redirectUri:Yv,state:t}),n.message("Opened access prompt in browser");let r=await Ae(()=>PI(async s=>{if(s.state!==t)throw new Error("Invalid state.");await H4(this,i.data,s)}),s=>s);r.failure&&(Ze(r.failure.message,n),process.exit(1)),Ct("You are now logged in.",n)}var RT=z(()=>{"use strict";g();rr();Yt();CI();BI();yp();hT();vr();yr();Hr();zp()});function Y4(e){return`${xc(e)}/project`}async function DT(e){let t=Y4(e);await e.fsPromise.stat(t).then(()=>!0).catch(()=>!1)&&await e.fsPromise.unlink(t)}var jT=z(()=>{"use strict";g();ty()});var LT={};It(LT,{logout:()=>Q4});async function Q4(){let e=mt();e.start("Logging out");let t=await Ae(()=>vp(this),s=>s);t.failure&&(Ze("There was an issue reading your credentials. You are probably already logged out.",e),process.exit(1));let n=await Xe(this),i=await Ae(()=>n.cli.getConfig(),s=>new Error("Failed to retrieve authentication configuration",{cause:s.message}));i.failure&&(Ze(i.failure.message,e),process.exit(1)),await Ae(async()=>n.cli.revokeSession({sessionId:t.data.sessionId}),s=>s),(await Ae(async()=>{await ZI(this),await DT(this)},s=>s)).failure&&(Ze("There was an issue purging credentials.",e),process.exit(1)),Ct("You are now logged out.",e)}var FT=z(()=>{"use strict";g();rr();Yt();yp();vr();yr();Hr();jT()});import nq from"path";function ZT(e){return[`import { defineConfig } from '${rD}'`,"","export default defineConfig({"," // swirls project identifier",` projectId: '${e||""}',`," // path to generated code",` genPath: 'src/${nD}',`,"})",""].join(`
|
|
180
|
-
`)}var Ds,rD,nD,BT,Ry=z(()=>{"use strict";g();yc();Ds="swirls.config.ts",rD="@swirls/sdk/config",nD="swirls.gen.ts",BT=Ps.object({projectId:Ps.uuid(),genPath:Ps.string().min(1)})});var jy=$t(js=>{"use strict";g();Object.defineProperty(js,"__esModule",{value:!0});js.DEFAULT_COLOR_MAP=void 0;js.DEFAULT_COLOR_MAP={red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",white_bold:"\x1B[01m",reset:"\x1B[0m"};var Dy=class{constructor(t=js.DEFAULT_COLOR_MAP){this.text="",this.colorMap=t}addCharsWithColor(t,n){let i=this.colorMap[t];this.text+=i!==void 0?`${i}${n}${this.colorMap.reset}`:n}renderConsole(){return this.text}};js.default=Dy});var Cc=$t(jt=>{"use strict";g();Object.defineProperty(jt,"__esModule",{value:!0});jt.DEFAULT_HEADER_ALIGNMENT=jt.DEFAULT_ROW_ALIGNMENT=jt.DEFAULT_HEADER_FONT_COLOR=jt.DEFAULT_ROW_FONT_COLOR=jt.COLORS=jt.ALIGNMENTS=jt.DEFAULT_TABLE_STYLE=jt.DEFAULT_ROW_SEPARATOR=jt.DEFAULT_COLUMN_LEN=void 0;jt.DEFAULT_COLUMN_LEN=20;jt.DEFAULT_ROW_SEPARATOR=!1;jt.DEFAULT_TABLE_STYLE={headerTop:{left:"\u250C",mid:"\u252C",right:"\u2510",other:"\u2500"},headerBottom:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"},tableBottom:{left:"\u2514",mid:"\u2534",right:"\u2518",other:"\u2500"},vertical:"\u2502",rowSeparator:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"}};jt.ALIGNMENTS=["right","left","center"];jt.COLORS=["red","green","yellow","white","blue","magenta","cyan","white_bold","reset"];jt.DEFAULT_ROW_FONT_COLOR="white";jt.DEFAULT_HEADER_FONT_COLOR="white_bold";jt.DEFAULT_ROW_ALIGNMENT="right";jt.DEFAULT_HEADER_ALIGNMENT="center"});var WT=$t(Ly=>{"use strict";g();Object.defineProperty(Ly,"__esModule",{value:!0});var iD=[{first:768,last:879},{first:1155,last:1158},{first:1160,last:1161},{first:1425,last:1469},{first:1471,last:1471},{first:1473,last:1474},{first:1476,last:1477},{first:1479,last:1479},{first:1536,last:1539},{first:1552,last:1557},{first:1611,last:1630},{first:1648,last:1648},{first:1750,last:1764},{first:1767,last:1768},{first:1770,last:1773},{first:1807,last:1807},{first:1809,last:1809},{first:1840,last:1866},{first:1958,last:1968},{first:2027,last:2035},{first:2305,last:2306},{first:2364,last:2364},{first:2369,last:2376},{first:2381,last:2381},{first:2385,last:2388},{first:2402,last:2403},{first:2433,last:2433},{first:2492,last:2492},{first:2497,last:2500},{first:2509,last:2509},{first:2530,last:2531},{first:2561,last:2562},{first:2620,last:2620},{first:2625,last:2626},{first:2631,last:2632},{first:2635,last:2637},{first:2672,last:2673},{first:2689,last:2690},{first:2748,last:2748},{first:2753,last:2757},{first:2759,last:2760},{first:2765,last:2765},{first:2786,last:2787},{first:2817,last:2817},{first:2876,last:2876},{first:2879,last:2879},{first:2881,last:2883},{first:2893,last:2893},{first:2902,last:2902},{first:2946,last:2946},{first:3008,last:3008},{first:3021,last:3021},{first:3134,last:3136},{first:3142,last:3144},{first:3146,last:3149},{first:3157,last:3158},{first:3260,last:3260},{first:3263,last:3263},{first:3270,last:3270},{first:3276,last:3277},{first:3298,last:3299},{first:3393,last:3395},{first:3405,last:3405},{first:3530,last:3530},{first:3538,last:3540},{first:3542,last:3542},{first:3633,last:3633},{first:3636,last:3642},{first:3655,last:3662},{first:3761,last:3761},{first:3764,last:3769},{first:3771,last:3772},{first:3784,last:3789},{first:3864,last:3865},{first:3893,last:3893},{first:3895,last:3895},{first:3897,last:3897},{first:3953,last:3966},{first:3968,last:3972},{first:3974,last:3975},{first:3984,last:3991},{first:3993,last:4028},{first:4038,last:4038},{first:4141,last:4144},{first:4146,last:4146},{first:4150,last:4151},{first:4153,last:4153},{first:4184,last:4185},{first:4448,last:4607},{first:4959,last:4959},{first:5906,last:5908},{first:5938,last:5940},{first:5970,last:5971},{first:6002,last:6003},{first:6068,last:6069},{first:6071,last:6077},{first:6086,last:6086},{first:6089,last:6099},{first:6109,last:6109},{first:6155,last:6157},{first:6313,last:6313},{first:6432,last:6434},{first:6439,last:6440},{first:6450,last:6450},{first:6457,last:6459},{first:6679,last:6680},{first:6912,last:6915},{first:6964,last:6964},{first:6966,last:6970},{first:6972,last:6972},{first:6978,last:6978},{first:7019,last:7027},{first:7616,last:7626},{first:7678,last:7679},{first:8203,last:8207},{first:8234,last:8238},{first:8288,last:8291},{first:8298,last:8303},{first:8400,last:8431},{first:12330,last:12335},{first:12441,last:12442},{first:43014,last:43014},{first:43019,last:43019},{first:43045,last:43046},{first:64286,last:64286},{first:65024,last:65039},{first:65056,last:65059},{first:65279,last:65279},{first:65529,last:65531},{first:68097,last:68099},{first:68101,last:68102},{first:68108,last:68111},{first:68152,last:68154},{first:68159,last:68159},{first:119143,last:119145},{first:119155,last:119170},{first:119173,last:119179},{first:119210,last:119213},{first:119362,last:119364},{first:917505,last:917505},{first:917536,last:917631},{first:917760,last:917999}];Ly.default=iD});var VT=$t(Fy=>{"use strict";g();Object.defineProperty(Fy,"__esModule",{value:!0});var oD=(e,t,n)=>{let i=0,r,s=n;if(e<t[0].first||e>t[s].last)return 0;for(;s>=i;)if(r=Math.floor((i+s)/2),e>t[r].last)i=r+1;else if(e<t[r].first)s=r-1;else return 1;return 0};Fy.default=oD});var My=$t(Oc=>{"use strict";g();var JT=Oc&&Oc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oc,"__esModule",{value:!0});var qT=JT(WT()),sD=JT(VT()),aD=e=>e===0?0:e<32||e>=127&&e<160?-1:(0,sD.default)(e,qT.default,qT.default.length-1)?0:1+ +(e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=42191&&e!==12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141));Oc.default=aD});var KT=$t(Uc=>{"use strict";g();var cD=Uc&&Uc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Uc,"__esModule",{value:!0});var lD=cD(My()),uD=e=>{let t=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n),r=(0,lD.default)(i);if(r<0)return-1;t+=r}return t};Uc.default=uD});var HT=$t(Oi=>{"use strict";g();var GT=Oi&&Oi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oi,"__esModule",{value:!0});Oi.wcswidth=Oi.wcwidth=void 0;var dD=GT(KT());Oi.wcswidth=dD.default;var pD=GT(My());Oi.wcwidth=pD.default});var By=$t(fo=>{"use strict";g();Object.defineProperty(fo,"__esModule",{value:!0});fo.findWidthInConsole=fo.stripAnsi=void 0;var fD=HT(),hD=/\x1b\[\d{1,3}(;\d{1,3})*m/g,mD=e=>e.replace(hD,"");fo.stripAnsi=mD;var gD=(e,t)=>{let n=0;return e=(0,fo.stripAnsi)(e),t&&Object.entries(t).forEach(([i,r])=>{let s=new RegExp(i,"g");n+=(e.match(s)||[]).length*r,e=e.replace(i,"")}),n+=(0,fD.wcswidth)(e),n};fo.findWidthInConsole=gD});var Wy=$t(Cn=>{"use strict";g();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.biggestWordInSentence=Cn.textWithPadding=Cn.splitTextIntoTextsOfMinLen=void 0;var Zy=By(),_D=(e,t,n)=>{let i=[];return e.split(/[\n\r]/).forEach(s=>{let c=s.split(" "),u=[],p=0;c.forEach(f=>{let v=(0,Zy.findWidthInConsole)(f,n);p+v<=t?(p+=v+1,u.push(f)):(u.length>0&&i.push(u.join(" ")),u=[f],p=v+1)}),i.push(u.join(" "))}),i};Cn.splitTextIntoTextsOfMinLen=_D;var vD=(e,t,n,i)=>{let r=(0,Zy.findWidthInConsole)(e,i),s=Math.floor((n-r)/2),c=n-s-r;if(n<r){let u=(0,Cn.splitTextIntoTextsOfMinLen)(e,n);return u.length===1?e:u.map(p=>(0,Cn.textWithPadding)(p,t,n,i)).join(`
|
|
181
|
-
`)}switch(t){case"left":return e.concat(" ".repeat(n-r));case"center":return" ".repeat(s).concat(e).concat(" ".repeat(c));default:return" ".repeat(n-r).concat(e)}};Cn.textWithPadding=vD;var yD=(e,t)=>e.split(" ").reduce((n,i)=>Math.max(n,(0,Zy.findWidthInConsole)(i,t)),0);Cn.biggestWordInSentence=yD});var zc=$t(dt=>{"use strict";g();Object.defineProperty(dt,"__esModule",{value:!0});dt.getWidthLimitedColumnsArray=dt.createHeaderAsRow=dt.renderTableHorizontalBorders=dt.findLenOfColumn=dt.createRow=dt.createColumFromOnlyName=dt.createTableHorizontalBorders=dt.convertRawRowOptionsToStandard=dt.evaluateCellText=dt.cellText=void 0;var XT=By(),Vy=Wy(),qy=Cc(),Ls=(e,t)=>Math.max(e,t),bD=e=>e==null?"":`${e}`;dt.cellText=bD;var xD=(e,t)=>t?`${t(e)}`:(0,dt.cellText)(e);dt.evaluateCellText=xD;var wD=e=>{if(e)return{color:e.color,separator:e.separator||qy.DEFAULT_ROW_SEPARATOR}};dt.convertRawRowOptionsToStandard=wD;var kD=({left:e,mid:t,right:n,other:i},r)=>{let s=e;return r.forEach(c=>{s+=i.repeat(c+2),s+=t}),s=s.slice(0,-t.length),s+=n,s};dt.createTableHorizontalBorders=kD;var $D=e=>({name:e,title:e});dt.createColumFromOnlyName=$D;var SD=(e,t,n)=>({color:e,separator:n,text:t});dt.createRow=SD;var ID=(e,t,n)=>{let i=e.name,r=e.title,s=e.transform,c=Ls(0,e?.minLen||0);return e.maxLen?(c=Ls(c,Ls(e.maxLen,(0,Vy.biggestWordInSentence)(r,n))),c=t.reduce((u,p)=>Ls(u,(0,Vy.biggestWordInSentence)((0,dt.evaluateCellText)(p.text[i],s),n)),c),c):(c=Ls(c,(0,XT.findWidthInConsole)(r,n)),t.forEach(u=>{c=Ls(c,(0,XT.findWidthInConsole)((0,dt.evaluateCellText)(u.text[i],s),n))}),c)};dt.findLenOfColumn=ID;var TD=(e,t)=>(0,dt.createTableHorizontalBorders)(e,t);dt.renderTableHorizontalBorders=TD;var ED=(e,t)=>{let n=qy.DEFAULT_HEADER_FONT_COLOR,i=e(n,{},!1);return t.forEach(r=>{i.text[r.name]=r.title}),i};dt.createHeaderAsRow=ED;var AD=(e,t,n)=>{let i={};return e.forEach(r=>{i[r.name]=(0,Vy.splitTextIntoTextsOfMinLen)((0,dt.cellText)(t.text[r.name]),r.length||qy.DEFAULT_COLUMN_LEN,n)}),i};dt.getWidthLimitedColumnsArray=AD});var YT=$t(Hn=>{"use strict";g();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.rawColumnToInternalColumn=Hn.objIfExists=void 0;var PD=Cc(),CD=(e,t)=>t?{[e]:t}:{};Hn.objIfExists=CD;var OD=(e,t)=>{var n;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:(n=e.title)!==null&&n!==void 0?n:e.name},(0,Hn.objIfExists)("color",e.color||t?.color)),(0,Hn.objIfExists)("maxLen",e.maxLen||t?.maxLen)),(0,Hn.objIfExists)("minLen",e.minLen||t?.minLen)),{alignment:e.alignment||t?.alignment||PD.DEFAULT_ROW_ALIGNMENT,transform:e.transform})};Hn.rawColumnToInternalColumn=OD});var QT=$t(Fs=>{"use strict";g();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.preProcessRows=Fs.preProcessColumns=void 0;var UD=zc(),zD=e=>{e.computedColumns.length&&e.computedColumns.forEach(t=>{e.columns.some(i=>i.name===t.name)||(e.addColumn(Object.assign(Object.assign({},t),e.defaultColumnOptions)),e.rows.forEach((i,r,s)=>{let c=s.map(u=>u.text);i.text[t.name]=t.function(i.text,r,c)}))})},ND=e=>{e.enabledColumns.length&&(e.columns=e.columns.filter(t=>e.enabledColumns.includes(t.name)))},RD=e=>{e.disabledColumns.length&&(e.columns=e.columns.filter(t=>!e.disabledColumns.includes(t.name)))},DD=e=>{e.columns.forEach(t=>{t.length=(0,UD.findLenOfColumn)(t,e.rows,e.charLength)})},jD=e=>{zD(e),RD(e),ND(e),DD(e)};Fs.preProcessColumns=jD;var LD=e=>{let t=e.rows.filter(n=>e.filterFunction(n.text)).sort((n,i)=>e.sortFunction(n.text,i.text));e.rows=t};Fs.preProcessRows=LD});var Jy=$t(Xr=>{"use strict";g();var tE=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.printSimpleTable=Xr.renderSimpleTable=Xr.renderTable=void 0;var rE=tE(jy()),nE=Wy(),dn=Cc(),Ui=zc(),FD=tE(Ky()),eE=QT(),MD=(e,t,n,i,r,s,c,u)=>{let p=new rE.default(c);return p.addCharsWithColor("",e.vertical),t.forEach(f=>{let y=n<i[f.name].length?(0,Ui.cellText)(i[f.name][n]):"";p.addCharsWithColor(dn.DEFAULT_ROW_FONT_COLOR," "),p.addCharsWithColor(r&&dn.DEFAULT_HEADER_FONT_COLOR||f.color||s.color,(0,nE.textWithPadding)(y,f.alignment||dn.DEFAULT_ROW_ALIGNMENT,f.length||dn.DEFAULT_COLUMN_LEN,u)),p.addCharsWithColor("",` ${e.vertical}`)}),p.renderConsole()},iE=(e,t,n,i,r,s)=>{let c=(0,Ui.getWidthLimitedColumnsArray)(t,n,s),u=Object.values(c).reduce((f,v)=>Math.max(f,v.length),0),p=[];for(let f=0;f<u;f+=1){let v=MD(e,t,f,c,r,n,i,s);p.push(v)}return p},BD=(e,t)=>{let n=JSON.parse(JSON.stringify(e)),i={};return t.filter(r=>!!r.transform).forEach(r=>{i[r.name]=r.transform}),Object.keys(i).forEach(r=>{n.text[r]=i[r](n.text[r])}),n},ZD=(e,t)=>{let n=[],i=BD(t,e.columns);return n=n.concat(iE(e.tableStyle,e.columns,i,e.colorMap,void 0,e.charLength)),n},WD=e=>{let t=[];if(e.title===void 0)return t;let n=()=>{let s=(c,u)=>c+u+2+1;return e.columns.map(c=>c.length||dn.DEFAULT_COLUMN_LEN).reduce(s,1)},i=(0,nE.textWithPadding)(e.title,dn.DEFAULT_HEADER_ALIGNMENT,n()),r=new rE.default(e.colorMap);return r.addCharsWithColor(dn.DEFAULT_HEADER_FONT_COLOR,i),t.push(r.renderConsole()),t},VD=e=>{let t=[];t.push((0,Ui.renderTableHorizontalBorders)(e.tableStyle.headerTop,e.columns.map(i=>i.length||dn.DEFAULT_COLUMN_LEN)));let n=(0,Ui.createHeaderAsRow)(Ui.createRow,e.columns);return t=t.concat(iE(e.tableStyle,e.columns,n,e.colorMap,!0)),t.push((0,Ui.renderTableHorizontalBorders)(e.tableStyle.headerBottom,e.columns.map(i=>i.length||dn.DEFAULT_COLUMN_LEN))),t},qD=e=>{let t=[];return t.push((0,Ui.renderTableHorizontalBorders)(e.tableStyle.tableBottom,e.columns.map(n=>n.length||dn.DEFAULT_COLUMN_LEN))),t},JD=(e,t)=>{let n=[],i=e.rows.length-1;return e.rows.indexOf(t)!==i&&t.separator&&n.push((0,Ui.renderTableHorizontalBorders)(e.tableStyle.rowSeparator,e.columns.map(s=>s.length||dn.DEFAULT_COLUMN_LEN))),n},KD=e=>{(0,eE.preProcessColumns)(e),(0,eE.preProcessRows)(e);let t=[];return WD(e).forEach(n=>t.push(n)),VD(e).forEach(n=>t.push(n)),e.rows.forEach(n=>{ZD(e,n).forEach(i=>t.push(i)),JD(e,n).forEach(i=>t.push(i))}),qD(e).forEach(n=>t.push(n)),t.join(`
|
|
182
|
-
`)};Xr.renderTable=KD;var GD=(e,t)=>{let n=new FD.default(t);return n.addRows(e),(0,Xr.renderTable)(n)};Xr.renderSimpleTable=GD;var HD=(e,t)=>{console.log((0,Xr.renderSimpleTable)(e,t))};Xr.printSimpleTable=HD});var Ky=$t(Yy=>{"use strict";g();Object.defineProperty(Yy,"__esModule",{value:!0});var XD=jy(),Np=Cc(),Gy=zc(),Hy=YT(),YD=Jy(),QD=()=>0,ej=()=>!0,Xy=class{initSimple(t){this.columns=t.map(n=>({name:n,title:n,alignment:Np.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var n;this.title=t?.title||this.title,this.tableStyle=Object.assign(Object.assign({},this.tableStyle),t?.style),this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((n=t?.columns)===null||n===void 0?void 0:n.map(i=>(0,Hy.rawColumnToInternalColumn)(i,t?.defaultColumnOptions)))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,this.defaultColumnOptions=t?.defaultColumnOptions||this.defaultColumnOptions,t?.shouldDisableColors?this.colorMap={}:t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=Np.DEFAULT_TABLE_STYLE,this.filterFunction=ej,this.sortFunction=QD,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=Np.DEFAULT_ROW_SEPARATOR,this.colorMap=XD.DEFAULT_COLOR_MAP,this.charLength={},this.defaultColumnOptions=void 0,this.transforms={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let n=this.columns.map(i=>i.name);Object.keys(t).forEach(i=>{n.includes(i)||this.columns.push((0,Hy.rawColumnToInternalColumn)((0,Gy.createColumFromOnlyName)(i),this.defaultColumnOptions))})}addColumn(t){let n=typeof t=="string"?(0,Gy.createColumFromOnlyName)(t):t;this.columns.push((0,Hy.rawColumnToInternalColumn)(n,this.defaultColumnOptions))}addColumns(t){t.forEach(n=>{this.addColumn(n)})}addRow(t,n){this.createColumnFromRow(t),this.rows.push((0,Gy.createRow)(n?.color||Np.DEFAULT_ROW_FONT_COLOR,t,n?.separator!==void 0?n?.separator:this.rowSeparator))}addRows(t,n){t.forEach(i=>{this.addRow(i,n)})}renderTable(){return(0,YD.renderTable)(this)}};Yy.default=Xy});var sE=$t(Nc=>{"use strict";g();var tj=Nc&&Nc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nc,"__esModule",{value:!0});var rj=tj(Ky()),oE=zc(),Qy=class{constructor(t){this.table=new rj.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,n){return this.table.addRow(t,(0,oE.convertRawRowOptionsToStandard)(n)),this}addRows(t,n){return this.table.addRows(t,(0,oE.convertRawRowOptionsToStandard)(n)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};Nc.default=Qy});var cE=$t(On=>{"use strict";g();var nj=On&&On.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(On,"__esModule",{value:!0});On.renderTable=On.printTable=On.Table=void 0;var ij=nj(sE());On.Table=ij.default;var aE=Jy();Object.defineProperty(On,"printTable",{enumerable:!0,get:function(){return aE.printSimpleTable}});Object.defineProperty(On,"renderTable",{enumerable:!0,get:function(){return aE.renderSimpleTable}})});function oj(e){return typeof e=="boolean"?e?"yes":"no":e==null?"-":String(e)}function sj(e,t){let n={};for(let i of t){let r=String(i);n[r]=oj(i in e?e[i]:null)}return n}function zi(e){let{keys:t,data:n}=e,i=t.map(c=>({name:String(c)})),r=n.map(c=>sj(c,t));new lE.Table({columns:i,rows:r,defaultColumnOptions:{alignment:"left"}}).printTable()}var lE,Rc=z(()=>{"use strict";g();lE=Ln(cE(),1)});var S,Qt=z(()=>{"use strict";g();(function(e){e[e.NONE=0]="NONE";let n=1;e[e._abstract=n]="_abstract";let i=n+1;e[e._accessor=i]="_accessor";let r=i+1;e[e._as=r]="_as";let s=r+1;e[e._assert=s]="_assert";let c=s+1;e[e._asserts=c]="_asserts";let u=c+1;e[e._async=u]="_async";let p=u+1;e[e._await=p]="_await";let f=p+1;e[e._checks=f]="_checks";let v=f+1;e[e._constructor=v]="_constructor";let y=v+1;e[e._declare=y]="_declare";let k=y+1;e[e._enum=k]="_enum";let I=k+1;e[e._exports=I]="_exports";let $=I+1;e[e._from=$]="_from";let O=$+1;e[e._get=O]="_get";let F=O+1;e[e._global=F]="_global";let Z=F+1;e[e._implements=Z]="_implements";let M=Z+1;e[e._infer=M]="_infer";let H=M+1;e[e._interface=H]="_interface";let W=H+1;e[e._is=W]="_is";let ee=W+1;e[e._keyof=ee]="_keyof";let fe=ee+1;e[e._mixins=fe]="_mixins";let Y=fe+1;e[e._module=Y]="_module";let X=Y+1;e[e._namespace=X]="_namespace";let Ke=X+1;e[e._of=Ke]="_of";let lt=Ke+1;e[e._opaque=lt]="_opaque";let Ye=lt+1;e[e._out=Ye]="_out";let Tt=Ye+1;e[e._override=Tt]="_override";let Re=Tt+1;e[e._private=Re]="_private";let pt=Re+1;e[e._protected=pt]="_protected";let ye=pt+1;e[e._proto=ye]="_proto";let Et=ye+1;e[e._public=Et]="_public";let tt=Et+1;e[e._readonly=tt]="_readonly";let oe=tt+1;e[e._require=oe]="_require";let ce=oe+1;e[e._satisfies=ce]="_satisfies";let xe=ce+1;e[e._set=xe]="_set";let Ce=xe+1;e[e._static=Ce]="_static";let ve=Ce+1;e[e._symbol=ve]="_symbol";let Qe=ve+1;e[e._type=Qe]="_type";let De=Qe+1;e[e._unique=De]="_unique";let zt=De+1;e[e._using=zt]="_using"})(S||(S={}))});function eb(e){switch(e){case a.num:return"num";case a.bigint:return"bigint";case a.decimal:return"decimal";case a.regexp:return"regexp";case a.string:return"string";case a.name:return"name";case a.eof:return"eof";case a.bracketL:return"[";case a.bracketR:return"]";case a.braceL:return"{";case a.braceBarL:return"{|";case a.braceR:return"}";case a.braceBarR:return"|}";case a.parenL:return"(";case a.parenR:return")";case a.comma:return",";case a.semi:return";";case a.colon:return":";case a.doubleColon:return"::";case a.dot:return".";case a.question:return"?";case a.questionDot:return"?.";case a.arrow:return"=>";case a.template:return"template";case a.ellipsis:return"...";case a.backQuote:return"`";case a.dollarBraceL:return"${";case a.at:return"@";case a.hash:return"#";case a.eq:return"=";case a.assign:return"_=";case a.preIncDec:return"++/--";case a.postIncDec:return"++/--";case a.bang:return"!";case a.tilde:return"~";case a.pipeline:return"|>";case a.nullishCoalescing:return"??";case a.logicalOR:return"||";case a.logicalAND:return"&&";case a.bitwiseOR:return"|";case a.bitwiseXOR:return"^";case a.bitwiseAND:return"&";case a.equality:return"==/!=";case a.lessThan:return"<";case a.greaterThan:return">";case a.relationalOrEqual:return"<=/>=";case a.bitShiftL:return"<<";case a.bitShiftR:return">>/>>>";case a.plus:return"+";case a.minus:return"-";case a.modulo:return"%";case a.star:return"*";case a.slash:return"/";case a.exponent:return"**";case a.jsxName:return"jsxName";case a.jsxText:return"jsxText";case a.jsxEmptyText:return"jsxEmptyText";case a.jsxTagStart:return"jsxTagStart";case a.jsxTagEnd:return"jsxTagEnd";case a.typeParameterStart:return"typeParameterStart";case a.nonNullAssertion:return"nonNullAssertion";case a._break:return"break";case a._case:return"case";case a._catch:return"catch";case a._continue:return"continue";case a._debugger:return"debugger";case a._default:return"default";case a._do:return"do";case a._else:return"else";case a._finally:return"finally";case a._for:return"for";case a._function:return"function";case a._if:return"if";case a._return:return"return";case a._switch:return"switch";case a._throw:return"throw";case a._try:return"try";case a._var:return"var";case a._let:return"let";case a._const:return"const";case a._while:return"while";case a._with:return"with";case a._new:return"new";case a._this:return"this";case a._super:return"super";case a._class:return"class";case a._extends:return"extends";case a._export:return"export";case a._import:return"import";case a._yield:return"yield";case a._null:return"null";case a._true:return"true";case a._false:return"false";case a._in:return"in";case a._instanceof:return"instanceof";case a._typeof:return"typeof";case a._void:return"void";case a._delete:return"delete";case a._async:return"async";case a._get:return"get";case a._set:return"set";case a._declare:return"declare";case a._readonly:return"readonly";case a._abstract:return"abstract";case a._static:return"static";case a._public:return"public";case a._private:return"private";case a._protected:return"protected";case a._override:return"override";case a._as:return"as";case a._enum:return"enum";case a._type:return"type";case a._implements:return"implements";default:return""}}var a,je=z(()=>{"use strict";g();(function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";let n=16;e[e.IS_KEYWORD=n]="IS_KEYWORD";let i=32;e[e.IS_ASSIGN=i]="IS_ASSIGN";let r=64;e[e.IS_RIGHT_ASSOCIATIVE=r]="IS_RIGHT_ASSOCIATIVE";let s=128;e[e.IS_PREFIX=s]="IS_PREFIX";let c=256;e[e.IS_POSTFIX=c]="IS_POSTFIX";let u=512;e[e.IS_EXPRESSION_START=u]="IS_EXPRESSION_START";let p=512;e[e.num=p]="num";let f=1536;e[e.bigint=f]="bigint";let v=2560;e[e.decimal=v]="decimal";let y=3584;e[e.regexp=y]="regexp";let k=4608;e[e.string=k]="string";let I=5632;e[e.name=I]="name";let $=6144;e[e.eof=$]="eof";let O=7680;e[e.bracketL=O]="bracketL";let F=8192;e[e.bracketR=F]="bracketR";let Z=9728;e[e.braceL=Z]="braceL";let M=10752;e[e.braceBarL=M]="braceBarL";let H=11264;e[e.braceR=H]="braceR";let W=12288;e[e.braceBarR=W]="braceBarR";let ee=13824;e[e.parenL=ee]="parenL";let fe=14336;e[e.parenR=fe]="parenR";let Y=15360;e[e.comma=Y]="comma";let X=16384;e[e.semi=X]="semi";let Ke=17408;e[e.colon=Ke]="colon";let lt=18432;e[e.doubleColon=lt]="doubleColon";let Ye=19456;e[e.dot=Ye]="dot";let Tt=20480;e[e.question=Tt]="question";let Re=21504;e[e.questionDot=Re]="questionDot";let pt=22528;e[e.arrow=pt]="arrow";let ye=23552;e[e.template=ye]="template";let Et=24576;e[e.ellipsis=Et]="ellipsis";let tt=25600;e[e.backQuote=tt]="backQuote";let oe=27136;e[e.dollarBraceL=oe]="dollarBraceL";let ce=27648;e[e.at=ce]="at";let xe=29184;e[e.hash=xe]="hash";let Ce=29728;e[e.eq=Ce]="eq";let ve=30752;e[e.assign=ve]="assign";let Qe=32640;e[e.preIncDec=Qe]="preIncDec";let De=33664;e[e.postIncDec=De]="postIncDec";let zt=34432;e[e.bang=zt]="bang";let ur=35456;e[e.tilde=ur]="tilde";let Pr=35841;e[e.pipeline=Pr]="pipeline";let hn=36866;e[e.nullishCoalescing=hn]="nullishCoalescing";let Cr=37890;e[e.logicalOR=Cr]="logicalOR";let dr=38915;e[e.logicalAND=dr]="logicalAND";let or=39940;e[e.bitwiseOR=or]="bitwiseOR";let Mr=40965;e[e.bitwiseXOR=Mr]="bitwiseXOR";let Nt=41990;e[e.bitwiseAND=Nt]="bitwiseAND";let Be=43015;e[e.equality=Be]="equality";let mn=44040;e[e.lessThan=mn]="lessThan";let gn=45064;e[e.greaterThan=gn]="greaterThan";let Br=46088;e[e.relationalOrEqual=Br]="relationalOrEqual";let At=47113;e[e.bitShiftL=At]="bitShiftL";let xo=48137;e[e.bitShiftR=xo]="bitShiftR";let wo=49802;e[e.plus=wo]="plus";let ko=50826;e[e.minus=ko]="minus";let $o=51723;e[e.modulo=$o]="modulo";let on=52235;e[e.star=on]="star";let So=53259;e[e.slash=So]="slash";let Io=54348;e[e.exponent=Io]="exponent";let oi=55296;e[e.jsxName=oi]="jsxName";let To=56320;e[e.jsxText=To]="jsxText";let ta=57344;e[e.jsxEmptyText=ta]="jsxEmptyText";let Eo=58880;e[e.jsxTagStart=Eo]="jsxTagStart";let ra=59392;e[e.jsxTagEnd=ra]="jsxTagEnd";let na=60928;e[e.typeParameterStart=na]="typeParameterStart";let ia=61440;e[e.nonNullAssertion=ia]="nonNullAssertion";let Ao=62480;e[e._break=Ao]="_break";let oa=63504;e[e._case=oa]="_case";let Po=64528;e[e._catch=Po]="_catch";let tr=65552;e[e._continue=tr]="_continue";let Or=66576;e[e._debugger=Or]="_debugger";let Co=67600;e[e._default=Co]="_default";let sa=68624;e[e._do=sa]="_do";let Bi=69648;e[e._else=Bi]="_else";let pr=70672;e[e._finally=pr]="_finally";let Zi=71696;e[e._for=Zi]="_for";let qt=73232;e[e._function=qt]="_function";let Oo=73744;e[e._if=Oo]="_if";let _n=74768;e[e._return=_n]="_return";let si=75792;e[e._switch=si]="_switch";let aa=77456;e[e._throw=aa]="_throw";let Ve=77840;e[e._try=Ve]="_try";let Wi=78864;e[e._var=Wi]="_var";let ca=79888;e[e._let=ca]="_let";let vn=80912;e[e._const=vn]="_const";let Uo=81936;e[e._while=Uo]="_while";let Jt=82960;e[e._with=Jt]="_with";let zo=84496;e[e._new=zo]="_new";let Dn=85520;e[e._this=Dn]="_this";let No=86544;e[e._super=No]="_super";let ai=87568;e[e._class=ai]="_class";let la=88080;e[e._extends=la]="_extends";let wr=89104;e[e._export=wr]="_export";let yn=90640;e[e._import=yn]="_import";let Ro=91664;e[e._yield=Ro]="_yield";let Do=92688;e[e._null=Do]="_null";let sn=93712;e[e._true=sn]="_true";let Vi=94736;e[e._false=Vi]="_false";let jo=95256;e[e._in=jo]="_in";let Lo=96280;e[e._instanceof=Lo]="_instanceof";let qi=97936;e[e._typeof=qi]="_typeof";let ci=98960;e[e._void=ci]="_void";let Sf=99984;e[e._delete=Sf]="_delete";let If=100880;e[e._async=If]="_async";let Sl=101904;e[e._get=Sl]="_get";let Fo=102928;e[e._set=Fo]="_set";let Tf=103952;e[e._declare=Tf]="_declare";let Ef=104976;e[e._readonly=Ef]="_readonly";let Il=106e3;e[e._abstract=Il]="_abstract";let Tl=107024;e[e._static=Tl]="_static";let Rt=107536;e[e._public=Rt]="_public";let ua=108560;e[e._private=ua]="_private";let El=109584;e[e._protected=El]="_protected";let Al=110608;e[e._override=Al]="_override";let Af=112144;e[e._as=Af]="_as";let Pl=113168;e[e._enum=Pl]="_enum";let Pf=114192;e[e._type=Pf]="_type";let Cl=115216;e[e._implements=Cl]="_implements"})(a||(a={}))});var Tr,tb,Dc,Rp=z(()=>{"use strict";g();Qt();je();Tr=class{constructor(t,n,i){this.startTokenIndex=t,this.endTokenIndex=n,this.isFunctionScope=i}},tb=class{constructor(t,n,i,r,s,c,u,p,f,v,y,k,I){this.potentialArrowAt=t,this.noAnonFunctionType=n,this.inDisallowConditionalTypesContext=i,this.tokensLength=r,this.scopesLength=s,this.pos=c,this.type=u,this.contextualKeyword=p,this.start=f,this.end=v,this.isType=y,this.scopeDepth=k,this.error=I}},Dc=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=a.eof}__init8(){this.contextualKeyword=S.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new tb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(t){this.potentialArrowAt=t.potentialArrowAt,this.noAnonFunctionType=t.noAnonFunctionType,this.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,this.tokens.length=t.tokensLength,this.scopes.length=t.scopesLength,this.pos=t.pos,this.type=t.type,this.contextualKeyword=t.contextualKeyword,this.start=t.start,this.end=t.end,this.isType=t.isType,this.scopeDepth=t.scopeDepth,this.error=t.error}}});var U,Rr=z(()=>{"use strict";g();(function(e){e[e.backSpace=8]="backSpace";let n=10;e[e.lineFeed=n]="lineFeed";let i=9;e[e.tab=i]="tab";let r=13;e[e.carriageReturn=r]="carriageReturn";let s=14;e[e.shiftOut=s]="shiftOut";let c=32;e[e.space=c]="space";let u=33;e[e.exclamationMark=u]="exclamationMark";let p=34;e[e.quotationMark=p]="quotationMark";let f=35;e[e.numberSign=f]="numberSign";let v=36;e[e.dollarSign=v]="dollarSign";let y=37;e[e.percentSign=y]="percentSign";let k=38;e[e.ampersand=k]="ampersand";let I=39;e[e.apostrophe=I]="apostrophe";let $=40;e[e.leftParenthesis=$]="leftParenthesis";let O=41;e[e.rightParenthesis=O]="rightParenthesis";let F=42;e[e.asterisk=F]="asterisk";let Z=43;e[e.plusSign=Z]="plusSign";let M=44;e[e.comma=M]="comma";let H=45;e[e.dash=H]="dash";let W=46;e[e.dot=W]="dot";let ee=47;e[e.slash=ee]="slash";let fe=48;e[e.digit0=fe]="digit0";let Y=49;e[e.digit1=Y]="digit1";let X=50;e[e.digit2=X]="digit2";let Ke=51;e[e.digit3=Ke]="digit3";let lt=52;e[e.digit4=lt]="digit4";let Ye=53;e[e.digit5=Ye]="digit5";let Tt=54;e[e.digit6=Tt]="digit6";let Re=55;e[e.digit7=Re]="digit7";let pt=56;e[e.digit8=pt]="digit8";let ye=57;e[e.digit9=ye]="digit9";let Et=58;e[e.colon=Et]="colon";let tt=59;e[e.semicolon=tt]="semicolon";let oe=60;e[e.lessThan=oe]="lessThan";let ce=61;e[e.equalsTo=ce]="equalsTo";let xe=62;e[e.greaterThan=xe]="greaterThan";let Ce=63;e[e.questionMark=Ce]="questionMark";let ve=64;e[e.atSign=ve]="atSign";let Qe=65;e[e.uppercaseA=Qe]="uppercaseA";let De=66;e[e.uppercaseB=De]="uppercaseB";let zt=67;e[e.uppercaseC=zt]="uppercaseC";let ur=68;e[e.uppercaseD=ur]="uppercaseD";let Pr=69;e[e.uppercaseE=Pr]="uppercaseE";let hn=70;e[e.uppercaseF=hn]="uppercaseF";let Cr=71;e[e.uppercaseG=Cr]="uppercaseG";let dr=72;e[e.uppercaseH=dr]="uppercaseH";let or=73;e[e.uppercaseI=or]="uppercaseI";let Mr=74;e[e.uppercaseJ=Mr]="uppercaseJ";let Nt=75;e[e.uppercaseK=Nt]="uppercaseK";let Be=76;e[e.uppercaseL=Be]="uppercaseL";let mn=77;e[e.uppercaseM=mn]="uppercaseM";let gn=78;e[e.uppercaseN=gn]="uppercaseN";let Br=79;e[e.uppercaseO=Br]="uppercaseO";let At=80;e[e.uppercaseP=At]="uppercaseP";let xo=81;e[e.uppercaseQ=xo]="uppercaseQ";let wo=82;e[e.uppercaseR=wo]="uppercaseR";let ko=83;e[e.uppercaseS=ko]="uppercaseS";let $o=84;e[e.uppercaseT=$o]="uppercaseT";let on=85;e[e.uppercaseU=on]="uppercaseU";let So=86;e[e.uppercaseV=So]="uppercaseV";let Io=87;e[e.uppercaseW=Io]="uppercaseW";let oi=88;e[e.uppercaseX=oi]="uppercaseX";let To=89;e[e.uppercaseY=To]="uppercaseY";let ta=90;e[e.uppercaseZ=ta]="uppercaseZ";let Eo=91;e[e.leftSquareBracket=Eo]="leftSquareBracket";let ra=92;e[e.backslash=ra]="backslash";let na=93;e[e.rightSquareBracket=na]="rightSquareBracket";let ia=94;e[e.caret=ia]="caret";let Ao=95;e[e.underscore=Ao]="underscore";let oa=96;e[e.graveAccent=oa]="graveAccent";let Po=97;e[e.lowercaseA=Po]="lowercaseA";let tr=98;e[e.lowercaseB=tr]="lowercaseB";let Or=99;e[e.lowercaseC=Or]="lowercaseC";let Co=100;e[e.lowercaseD=Co]="lowercaseD";let sa=101;e[e.lowercaseE=sa]="lowercaseE";let Bi=102;e[e.lowercaseF=Bi]="lowercaseF";let pr=103;e[e.lowercaseG=pr]="lowercaseG";let Zi=104;e[e.lowercaseH=Zi]="lowercaseH";let qt=105;e[e.lowercaseI=qt]="lowercaseI";let Oo=106;e[e.lowercaseJ=Oo]="lowercaseJ";let _n=107;e[e.lowercaseK=_n]="lowercaseK";let si=108;e[e.lowercaseL=si]="lowercaseL";let aa=109;e[e.lowercaseM=aa]="lowercaseM";let Ve=110;e[e.lowercaseN=Ve]="lowercaseN";let Wi=111;e[e.lowercaseO=Wi]="lowercaseO";let ca=112;e[e.lowercaseP=ca]="lowercaseP";let vn=113;e[e.lowercaseQ=vn]="lowercaseQ";let Uo=114;e[e.lowercaseR=Uo]="lowercaseR";let Jt=115;e[e.lowercaseS=Jt]="lowercaseS";let zo=116;e[e.lowercaseT=zo]="lowercaseT";let Dn=117;e[e.lowercaseU=Dn]="lowercaseU";let No=118;e[e.lowercaseV=No]="lowercaseV";let ai=119;e[e.lowercaseW=ai]="lowercaseW";let la=120;e[e.lowercaseX=la]="lowercaseX";let wr=121;e[e.lowercaseY=wr]="lowercaseY";let yn=122;e[e.lowercaseZ=yn]="lowercaseZ";let Ro=123;e[e.leftCurlyBrace=Ro]="leftCurlyBrace";let Do=124;e[e.verticalBar=Do]="verticalBar";let sn=125;e[e.rightCurlyBrace=sn]="rightCurlyBrace";let Vi=126;e[e.tilde=Vi]="tilde";let jo=160;e[e.nonBreakingSpace=jo]="nonBreakingSpace";let Lo=5760;e[e.oghamSpaceMark=Lo]="oghamSpaceMark";let qi=8232;e[e.lineSeparator=qi]="lineSeparator";let ci=8233;e[e.paragraphSeparator=ci]="paragraphSeparator"})(U||(U={}))});function ho(){return uE++}function dE(e){if("pos"in e){let t=aj(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}function aj(e){let t=1,n=1;for(let i=0;i<e;i++)ie.charCodeAt(i)===U.lineFeed?(t++,n=1):n++;return new rb(t,n)}function pE(e,t,n,i){ie=e,d=new Dc,uE=1,Ms=t,ze=n,Le=i}var Ms,ze,Le,d,ie,uE,rb,Dr=z(()=>{"use strict";g();Rp();Rr();rb=class{constructor(t,n){this.line=t,this.column=n}}});function me(e){return d.contextualKeyword===e}function Bs(e){let t=Xn();return t.type===a.name&&t.contextualKeyword===e}function St(e){return d.contextualKeyword===e&&D(a.name)}function gt(e){St(e)||$e()}function ir(){return w(a.eof)||w(a.braceR)||er()}function er(){let e=d.tokens[d.tokens.length-1],t=e?e.end:0;for(let n=t;n<d.start;n++){let i=ie.charCodeAt(n);if(i===U.lineFeed||i===U.carriageReturn||i===8232||i===8233)return!0}return!1}function Dp(){let e=jc();for(let t=d.end;t<e;t++){let n=ie.charCodeAt(t);if(n===U.lineFeed||n===U.carriageReturn||n===8232||n===8233)return!0}return!1}function Yr(){return D(a.semi)||ir()}function nt(){Yr()||$e('Unexpected token, expected ";"')}function V(e){D(e)||$e(`Unexpected token, expected "${eb(e)}"`)}function $e(e="Unexpected token",t=d.start){if(d.error)return;let n=new SyntaxError(e);n.pos=t,d.error=n,d.pos=ie.length,Se(a.eof)}var Ni=z(()=>{"use strict";g();Wt();je();Rr();Dr()});var nb,ib,ob,sb=z(()=>{"use strict";g();Rr();nb=[9,11,12,U.space,U.nonBreakingSpace,U.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],ib=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ob=new Uint8Array(65536);for(let e of nb)ob[e]=1});function cj(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}var br,Yn,Zs=z(()=>{"use strict";g();Rr();sb();br=new Uint8Array(65536);for(let e=0;e<128;e++)br[e]=cj(e)?1:0;for(let e=128;e<65536;e++)br[e]=1;for(let e of nb)br[e]=0;br[8232]=0;br[8233]=0;Yn=br.slice();for(let e=U.digit0;e<=U.digit9;e++)Yn[e]=0});var ab,fE=z(()=>{"use strict";g();Qt();je();ab=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,S._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,S._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,S._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,S._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,S._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,S._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(a._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(a._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,S._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(a._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(a._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(a._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,S._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(a._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(a._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(a._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,S._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(a._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,S._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(a._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,S._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(a._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,S._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(a._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,S._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,S._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,S._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,S._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,S._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(a._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(a._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(a._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,S._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(a._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(a._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])});function cb(){let e=0,t=0,n=d.pos;for(;n<ie.length&&(t=ie.charCodeAt(n),!(t<U.lowercaseA||t>U.lowercaseZ));){let r=ab[e+(t-U.lowercaseA)+1];if(r===-1)break;e=r,n++}let i=ab[e];if(i>-1&&!br[t]){d.pos=n,i&1?Se(i>>>1):Se(a.name,i>>>1);return}for(;n<ie.length;){let r=ie.charCodeAt(n);if(br[r])n++;else if(r===U.backslash){if(n+=2,ie.charCodeAt(n)===U.leftCurlyBrace){for(;n<ie.length&&ie.charCodeAt(n)!==U.rightCurlyBrace;)n++;n++}}else if(r===U.atSign&&ie.charCodeAt(n+1)===U.atSign)n+=2;else break}d.pos=n,Se(a.name)}var hE=z(()=>{"use strict";g();Dr();Rr();Zs();Wt();fE();je()});function jp(e){let t=e.identifierRole;return t===ge.TopLevelDeclaration||t===ge.FunctionScopedDeclaration||t===ge.BlockScopedDeclaration||t===ge.ObjectShorthandTopLevelDeclaration||t===ge.ObjectShorthandFunctionScopedDeclaration||t===ge.ObjectShorthandBlockScopedDeclaration}function mE(e){let t=e.identifierRole;return t===ge.FunctionScopedDeclaration||t===ge.BlockScopedDeclaration||t===ge.ObjectShorthandFunctionScopedDeclaration||t===ge.ObjectShorthandBlockScopedDeclaration}function Lp(e){let t=e.identifierRole;return t===ge.TopLevelDeclaration||t===ge.ObjectShorthandTopLevelDeclaration||t===ge.ImportDeclaration}function gE(e){let t=e.identifierRole;return t===ge.TopLevelDeclaration||t===ge.BlockScopedDeclaration||t===ge.ObjectShorthandTopLevelDeclaration||t===ge.ObjectShorthandBlockScopedDeclaration}function _E(e){let t=e.identifierRole;return t===ge.FunctionScopedDeclaration||t===ge.ObjectShorthandFunctionScopedDeclaration}function vE(e){return e.identifierRole===ge.ObjectShorthandTopLevelDeclaration||e.identifierRole===ge.ObjectShorthandBlockScopedDeclaration||e.identifierRole===ge.ObjectShorthandFunctionScopedDeclaration}function q(){d.tokens.push(new mo),fb()}function Un(){d.tokens.push(new mo),d.start=d.pos,kj()}function yE(){d.type===a.assign&&--d.pos,bj()}function Ee(e){for(let n=d.tokens.length-e;n<d.tokens.length;n++)d.tokens[n].isType=!0;let t=d.isType;return d.isType=!0,t}function Ie(e){d.isType=e}function D(e){return w(e)?(q(),!0):!1}function Fp(e){let t=d.isType;d.isType=!0,D(e),d.isType=t}function w(e){return d.type===e}function it(){let e=d.snapshot();q();let t=d.type;return d.restoreFromSnapshot(e),t}function Xn(){let e=d.snapshot();q();let t=d.type,n=d.contextualKeyword;return d.restoreFromSnapshot(e),new ub(t,n)}function jc(){return db(d.pos)}function db(e){ib.lastIndex=e;let t=ib.exec(ie);return e+t[0].length}function pb(){return ie.charCodeAt(jc())}function fb(){if(mb(),d.start=d.pos,d.pos>=ie.length){let e=d.tokens;e.length>=2&&e[e.length-1].start>=ie.length&&e[e.length-2].start>=ie.length&&$e("Unexpectedly reached the end of input."),Se(a.eof);return}lj(ie.charCodeAt(d.pos))}function lj(e){Yn[e]||e===U.backslash||e===U.atSign&&ie.charCodeAt(d.pos+1)===U.atSign?cb():gb(e)}function uj(){for(;ie.charCodeAt(d.pos)!==U.asterisk||ie.charCodeAt(d.pos+1)!==U.slash;)if(d.pos++,d.pos>ie.length){$e("Unterminated comment",d.pos-2);return}d.pos+=2}function hb(e){let t=ie.charCodeAt(d.pos+=e);if(d.pos<ie.length)for(;t!==U.lineFeed&&t!==U.carriageReturn&&t!==U.lineSeparator&&t!==U.paragraphSeparator&&++d.pos<ie.length;)t=ie.charCodeAt(d.pos)}function mb(){for(;d.pos<ie.length;){let e=ie.charCodeAt(d.pos);switch(e){case U.carriageReturn:ie.charCodeAt(d.pos+1)===U.lineFeed&&++d.pos;case U.lineFeed:case U.lineSeparator:case U.paragraphSeparator:++d.pos;break;case U.slash:switch(ie.charCodeAt(d.pos+1)){case U.asterisk:d.pos+=2,uj();break;case U.slash:hb(2);break;default:return}break;default:if(ob[e])++d.pos;else return}}}function Se(e,t=S.NONE){d.end=d.pos,d.type=e,d.contextualKeyword=t}function dj(){let e=ie.charCodeAt(d.pos+1);if(e>=U.digit0&&e<=U.digit9){xE(!0);return}e===U.dot&&ie.charCodeAt(d.pos+2)===U.dot?(d.pos+=3,Se(a.ellipsis)):(++d.pos,Se(a.dot))}function pj(){ie.charCodeAt(d.pos+1)===U.equalsTo?Ge(a.assign,2):Ge(a.slash,1)}function fj(e){let t=e===U.asterisk?a.star:a.modulo,n=1,i=ie.charCodeAt(d.pos+1);e===U.asterisk&&i===U.asterisk&&(n++,i=ie.charCodeAt(d.pos+2),t=a.exponent),i===U.equalsTo&&ie.charCodeAt(d.pos+2)!==U.greaterThan&&(n++,t=a.assign),Ge(t,n)}function hj(e){let t=ie.charCodeAt(d.pos+1);if(t===e){ie.charCodeAt(d.pos+2)===U.equalsTo?Ge(a.assign,3):Ge(e===U.verticalBar?a.logicalOR:a.logicalAND,2);return}if(e===U.verticalBar){if(t===U.greaterThan){Ge(a.pipeline,2);return}else if(t===U.rightCurlyBrace&&Le){Ge(a.braceBarR,2);return}}if(t===U.equalsTo){Ge(a.assign,2);return}Ge(e===U.verticalBar?a.bitwiseOR:a.bitwiseAND,1)}function mj(){ie.charCodeAt(d.pos+1)===U.equalsTo?Ge(a.assign,2):Ge(a.bitwiseXOR,1)}function gj(e){let t=ie.charCodeAt(d.pos+1);if(t===e){Ge(a.preIncDec,2);return}t===U.equalsTo?Ge(a.assign,2):e===U.plusSign?Ge(a.plus,1):Ge(a.minus,1)}function _j(){let e=ie.charCodeAt(d.pos+1);if(e===U.lessThan){if(ie.charCodeAt(d.pos+2)===U.equalsTo){Ge(a.assign,3);return}d.isType?Ge(a.lessThan,1):Ge(a.bitShiftL,2);return}e===U.equalsTo?Ge(a.relationalOrEqual,2):Ge(a.lessThan,1)}function bE(){if(d.isType){Ge(a.greaterThan,1);return}let e=ie.charCodeAt(d.pos+1);if(e===U.greaterThan){let t=ie.charCodeAt(d.pos+2)===U.greaterThan?3:2;if(ie.charCodeAt(d.pos+t)===U.equalsTo){Ge(a.assign,t+1);return}Ge(a.bitShiftR,t);return}e===U.equalsTo?Ge(a.relationalOrEqual,2):Ge(a.greaterThan,1)}function Mp(){d.type===a.greaterThan&&(d.pos-=1,bE())}function vj(e){let t=ie.charCodeAt(d.pos+1);if(t===U.equalsTo){Ge(a.equality,ie.charCodeAt(d.pos+2)===U.equalsTo?3:2);return}if(e===U.equalsTo&&t===U.greaterThan){d.pos+=2,Se(a.arrow);return}Ge(e===U.equalsTo?a.eq:a.bang,1)}function yj(){let e=ie.charCodeAt(d.pos+1),t=ie.charCodeAt(d.pos+2);e===U.questionMark&&!(Le&&d.isType)?t===U.equalsTo?Ge(a.assign,3):Ge(a.nullishCoalescing,2):e===U.dot&&!(t>=U.digit0&&t<=U.digit9)?(d.pos+=2,Se(a.questionDot)):(++d.pos,Se(a.question))}function gb(e){switch(e){case U.numberSign:++d.pos,Se(a.hash);return;case U.dot:dj();return;case U.leftParenthesis:++d.pos,Se(a.parenL);return;case U.rightParenthesis:++d.pos,Se(a.parenR);return;case U.semicolon:++d.pos,Se(a.semi);return;case U.comma:++d.pos,Se(a.comma);return;case U.leftSquareBracket:++d.pos,Se(a.bracketL);return;case U.rightSquareBracket:++d.pos,Se(a.bracketR);return;case U.leftCurlyBrace:Le&&ie.charCodeAt(d.pos+1)===U.verticalBar?Ge(a.braceBarL,2):(++d.pos,Se(a.braceL));return;case U.rightCurlyBrace:++d.pos,Se(a.braceR);return;case U.colon:ie.charCodeAt(d.pos+1)===U.colon?Ge(a.doubleColon,2):(++d.pos,Se(a.colon));return;case U.questionMark:yj();return;case U.atSign:++d.pos,Se(a.at);return;case U.graveAccent:++d.pos,Se(a.backQuote);return;case U.digit0:{let t=ie.charCodeAt(d.pos+1);if(t===U.lowercaseX||t===U.uppercaseX||t===U.lowercaseO||t===U.uppercaseO||t===U.lowercaseB||t===U.uppercaseB){xj();return}}case U.digit1:case U.digit2:case U.digit3:case U.digit4:case U.digit5:case U.digit6:case U.digit7:case U.digit8:case U.digit9:xE(!1);return;case U.quotationMark:case U.apostrophe:wj(e);return;case U.slash:pj();return;case U.percentSign:case U.asterisk:fj(e);return;case U.verticalBar:case U.ampersand:hj(e);return;case U.caret:mj();return;case U.plusSign:case U.dash:gj(e);return;case U.lessThan:_j();return;case U.greaterThan:bE();return;case U.equalsTo:case U.exclamationMark:vj(e);return;case U.tilde:Ge(a.tilde,1);return;default:break}$e(`Unexpected character '${String.fromCharCode(e)}'`,d.pos)}function Ge(e,t){d.pos+=t,Se(e)}function bj(){let e=d.pos,t=!1,n=!1;for(;;){if(d.pos>=ie.length){$e("Unterminated regular expression",e);return}let i=ie.charCodeAt(d.pos);if(t)t=!1;else{if(i===U.leftSquareBracket)n=!0;else if(i===U.rightSquareBracket&&n)n=!1;else if(i===U.slash&&!n)break;t=i===U.backslash}++d.pos}++d.pos,$j(),Se(a.regexp)}function lb(){for(;;){let e=ie.charCodeAt(d.pos);if(e>=U.digit0&&e<=U.digit9||e===U.underscore)d.pos++;else break}}function xj(){for(d.pos+=2;;){let t=ie.charCodeAt(d.pos);if(t>=U.digit0&&t<=U.digit9||t>=U.lowercaseA&&t<=U.lowercaseF||t>=U.uppercaseA&&t<=U.uppercaseF||t===U.underscore)d.pos++;else break}ie.charCodeAt(d.pos)===U.lowercaseN?(++d.pos,Se(a.bigint)):Se(a.num)}function xE(e){let t=!1,n=!1;e||lb();let i=ie.charCodeAt(d.pos);if(i===U.dot&&(++d.pos,lb(),i=ie.charCodeAt(d.pos)),(i===U.uppercaseE||i===U.lowercaseE)&&(i=ie.charCodeAt(++d.pos),(i===U.plusSign||i===U.dash)&&++d.pos,lb(),i=ie.charCodeAt(d.pos)),i===U.lowercaseN?(++d.pos,t=!0):i===U.lowercaseM&&(++d.pos,n=!0),t){Se(a.bigint);return}if(n){Se(a.decimal);return}Se(a.num)}function wj(e){for(d.pos++;;){if(d.pos>=ie.length){$e("Unterminated string constant");return}let t=ie.charCodeAt(d.pos);if(t===U.backslash)d.pos++;else if(t===e)break;d.pos++}d.pos++,Se(a.string)}function kj(){for(;;){if(d.pos>=ie.length){$e("Unterminated template");return}let e=ie.charCodeAt(d.pos);if(e===U.graveAccent||e===U.dollarSign&&ie.charCodeAt(d.pos+1)===U.leftCurlyBrace){if(d.pos===d.start&&w(a.template))if(e===U.dollarSign){d.pos+=2,Se(a.dollarBraceL);return}else{++d.pos,Se(a.backQuote);return}Se(a.template);return}e===U.backslash&&d.pos++,d.pos++}}function $j(){for(;d.pos<ie.length;){let e=ie.charCodeAt(d.pos);if(br[e])d.pos++;else if(e===U.backslash){if(d.pos+=2,ie.charCodeAt(d.pos)===U.leftCurlyBrace){for(;d.pos<ie.length&&ie.charCodeAt(d.pos)!==U.rightCurlyBrace;)d.pos++;d.pos++}}else break}}var ge,jr,mo,ub,Wt=z(()=>{"use strict";g();Dr();Ni();Rr();Zs();sb();Qt();hE();je();(function(e){e[e.Access=0]="Access";let n=1;e[e.ExportAccess=n]="ExportAccess";let i=n+1;e[e.TopLevelDeclaration=i]="TopLevelDeclaration";let r=i+1;e[e.FunctionScopedDeclaration=r]="FunctionScopedDeclaration";let s=r+1;e[e.BlockScopedDeclaration=s]="BlockScopedDeclaration";let c=s+1;e[e.ObjectShorthandTopLevelDeclaration=c]="ObjectShorthandTopLevelDeclaration";let u=c+1;e[e.ObjectShorthandFunctionScopedDeclaration=u]="ObjectShorthandFunctionScopedDeclaration";let p=u+1;e[e.ObjectShorthandBlockScopedDeclaration=p]="ObjectShorthandBlockScopedDeclaration";let f=p+1;e[e.ObjectShorthand=f]="ObjectShorthand";let v=f+1;e[e.ImportDeclaration=v]="ImportDeclaration";let y=v+1;e[e.ObjectKey=y]="ObjectKey";let k=y+1;e[e.ImportAccess=k]="ImportAccess"})(ge||(ge={}));(function(e){e[e.NoChildren=0]="NoChildren";let n=1;e[e.OneChild=n]="OneChild";let i=n+1;e[e.StaticChildren=i]="StaticChildren";let r=i+1;e[e.KeyAfterPropSpread=r]="KeyAfterPropSpread"})(jr||(jr={}));mo=class{constructor(){this.type=d.type,this.contextualKeyword=d.contextualKeyword,this.start=d.start,this.end=d.end,this.scopeDepth=d.scopeDepth,this.isType=d.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};ub=class{constructor(t,n){this.type=t,this.contextualKeyword=n}}});function zn(e,t=e.currentIndex()){let n=t+1;if(Bp(e,n)){let i=e.identifierNameAtIndex(t);return{isType:!1,leftName:i,rightName:i,endIndex:n}}if(n++,Bp(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,Bp(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,Bp(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw new Error(`Unexpected import/export specifier at ${t}`)}function Bp(e,t){let n=e.tokens[t];return n.type===a.braceR||n.type===a.comma}var Lc=z(()=>{"use strict";g();je()});var wE,kE=z(()=>{"use strict";g();wE=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp","\xA0"],["iexcl","\xA1"],["cent","\xA2"],["pound","\xA3"],["curren","\xA4"],["yen","\xA5"],["brvbar","\xA6"],["sect","\xA7"],["uml","\xA8"],["copy","\xA9"],["ordf","\xAA"],["laquo","\xAB"],["not","\xAC"],["shy","\xAD"],["reg","\xAE"],["macr","\xAF"],["deg","\xB0"],["plusmn","\xB1"],["sup2","\xB2"],["sup3","\xB3"],["acute","\xB4"],["micro","\xB5"],["para","\xB6"],["middot","\xB7"],["cedil","\xB8"],["sup1","\xB9"],["ordm","\xBA"],["raquo","\xBB"],["frac14","\xBC"],["frac12","\xBD"],["frac34","\xBE"],["iquest","\xBF"],["Agrave","\xC0"],["Aacute","\xC1"],["Acirc","\xC2"],["Atilde","\xC3"],["Auml","\xC4"],["Aring","\xC5"],["AElig","\xC6"],["Ccedil","\xC7"],["Egrave","\xC8"],["Eacute","\xC9"],["Ecirc","\xCA"],["Euml","\xCB"],["Igrave","\xCC"],["Iacute","\xCD"],["Icirc","\xCE"],["Iuml","\xCF"],["ETH","\xD0"],["Ntilde","\xD1"],["Ograve","\xD2"],["Oacute","\xD3"],["Ocirc","\xD4"],["Otilde","\xD5"],["Ouml","\xD6"],["times","\xD7"],["Oslash","\xD8"],["Ugrave","\xD9"],["Uacute","\xDA"],["Ucirc","\xDB"],["Uuml","\xDC"],["Yacute","\xDD"],["THORN","\xDE"],["szlig","\xDF"],["agrave","\xE0"],["aacute","\xE1"],["acirc","\xE2"],["atilde","\xE3"],["auml","\xE4"],["aring","\xE5"],["aelig","\xE6"],["ccedil","\xE7"],["egrave","\xE8"],["eacute","\xE9"],["ecirc","\xEA"],["euml","\xEB"],["igrave","\xEC"],["iacute","\xED"],["icirc","\xEE"],["iuml","\xEF"],["eth","\xF0"],["ntilde","\xF1"],["ograve","\xF2"],["oacute","\xF3"],["ocirc","\xF4"],["otilde","\xF5"],["ouml","\xF6"],["divide","\xF7"],["oslash","\xF8"],["ugrave","\xF9"],["uacute","\xFA"],["ucirc","\xFB"],["uuml","\xFC"],["yacute","\xFD"],["thorn","\xFE"],["yuml","\xFF"],["OElig","\u0152"],["oelig","\u0153"],["Scaron","\u0160"],["scaron","\u0161"],["Yuml","\u0178"],["fnof","\u0192"],["circ","\u02C6"],["tilde","\u02DC"],["Alpha","\u0391"],["Beta","\u0392"],["Gamma","\u0393"],["Delta","\u0394"],["Epsilon","\u0395"],["Zeta","\u0396"],["Eta","\u0397"],["Theta","\u0398"],["Iota","\u0399"],["Kappa","\u039A"],["Lambda","\u039B"],["Mu","\u039C"],["Nu","\u039D"],["Xi","\u039E"],["Omicron","\u039F"],["Pi","\u03A0"],["Rho","\u03A1"],["Sigma","\u03A3"],["Tau","\u03A4"],["Upsilon","\u03A5"],["Phi","\u03A6"],["Chi","\u03A7"],["Psi","\u03A8"],["Omega","\u03A9"],["alpha","\u03B1"],["beta","\u03B2"],["gamma","\u03B3"],["delta","\u03B4"],["epsilon","\u03B5"],["zeta","\u03B6"],["eta","\u03B7"],["theta","\u03B8"],["iota","\u03B9"],["kappa","\u03BA"],["lambda","\u03BB"],["mu","\u03BC"],["nu","\u03BD"],["xi","\u03BE"],["omicron","\u03BF"],["pi","\u03C0"],["rho","\u03C1"],["sigmaf","\u03C2"],["sigma","\u03C3"],["tau","\u03C4"],["upsilon","\u03C5"],["phi","\u03C6"],["chi","\u03C7"],["psi","\u03C8"],["omega","\u03C9"],["thetasym","\u03D1"],["upsih","\u03D2"],["piv","\u03D6"],["ensp","\u2002"],["emsp","\u2003"],["thinsp","\u2009"],["zwnj","\u200C"],["zwj","\u200D"],["lrm","\u200E"],["rlm","\u200F"],["ndash","\u2013"],["mdash","\u2014"],["lsquo","\u2018"],["rsquo","\u2019"],["sbquo","\u201A"],["ldquo","\u201C"],["rdquo","\u201D"],["bdquo","\u201E"],["dagger","\u2020"],["Dagger","\u2021"],["bull","\u2022"],["hellip","\u2026"],["permil","\u2030"],["prime","\u2032"],["Prime","\u2033"],["lsaquo","\u2039"],["rsaquo","\u203A"],["oline","\u203E"],["frasl","\u2044"],["euro","\u20AC"],["image","\u2111"],["weierp","\u2118"],["real","\u211C"],["trade","\u2122"],["alefsym","\u2135"],["larr","\u2190"],["uarr","\u2191"],["rarr","\u2192"],["darr","\u2193"],["harr","\u2194"],["crarr","\u21B5"],["lArr","\u21D0"],["uArr","\u21D1"],["rArr","\u21D2"],["dArr","\u21D3"],["hArr","\u21D4"],["forall","\u2200"],["part","\u2202"],["exist","\u2203"],["empty","\u2205"],["nabla","\u2207"],["isin","\u2208"],["notin","\u2209"],["ni","\u220B"],["prod","\u220F"],["sum","\u2211"],["minus","\u2212"],["lowast","\u2217"],["radic","\u221A"],["prop","\u221D"],["infin","\u221E"],["ang","\u2220"],["and","\u2227"],["or","\u2228"],["cap","\u2229"],["cup","\u222A"],["int","\u222B"],["there4","\u2234"],["sim","\u223C"],["cong","\u2245"],["asymp","\u2248"],["ne","\u2260"],["equiv","\u2261"],["le","\u2264"],["ge","\u2265"],["sub","\u2282"],["sup","\u2283"],["nsub","\u2284"],["sube","\u2286"],["supe","\u2287"],["oplus","\u2295"],["otimes","\u2297"],["perp","\u22A5"],["sdot","\u22C5"],["lceil","\u2308"],["rceil","\u2309"],["lfloor","\u230A"],["rfloor","\u230B"],["lang","\u2329"],["rang","\u232A"],["loz","\u25CA"],["spades","\u2660"],["clubs","\u2663"],["hearts","\u2665"],["diams","\u2666"]])});function Fc(e){let[t,n]=$E(e.jsxPragma||"React.createElement"),[i,r]=$E(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:n,fragmentBase:i,fragmentSuffix:r}}function $E(e){let t=e.indexOf(".");return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var _b=z(()=>{"use strict";g()});var yt,Qr=z(()=>{"use strict";g();yt=class{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}}});function vb(e){let t=e.charCodeAt(0);return t>=U.lowercaseA&&t<=U.lowercaseZ}function Sj(e){let t="",n="",i=!1,r=!1;for(let s=0;s<e.length;s++){let c=e[s];if(c===" "||c===" "||c==="\r")i||(n+=c);else if(c===`
|
|
183
|
-
`)n="",i=!0;else{if(r&&i&&(t+=" "),t+=n,n="",c==="&"){let{entity:u,newI:p}=IE(e,s+1);s=p-1,t+=u}else t+=c;r=!0,i=!1}}return i||(t+=n),JSON.stringify(t)}function SE(e){let t=0,n=0;for(let i of e)i===`
|
|
184
|
-
`?(t++,n=0):i===" "&&n++;return`
|
|
185
|
-
`.repeat(t)+" ".repeat(n)}function Ij(e){let t="";for(let n=0;n<e.length;n++){let i=e[n];if(i===`
|
|
186
|
-
`)if(/\s/.test(e[n+1]))for(t+=" ";n<e.length&&/\s/.test(e[n+1]);)n++;else t+=`
|
|
187
|
-
`;else if(i==="&"){let{entity:r,newI:s}=IE(e,n+1);t+=r,n=s-1}else t+=i}return JSON.stringify(t)}function IE(e,t){let n="",i=0,r,s=t;if(e[s]==="#"){let c=10;s++;let u;if(e[s]==="x")for(c=16,s++,u=s;s<e.length&&Ej(e.charCodeAt(s));)s++;else for(u=s;s<e.length&&Tj(e.charCodeAt(s));)s++;if(e[s]===";"){let p=e.slice(u,s);p&&(s++,r=String.fromCodePoint(parseInt(p,c)))}}else for(;s<e.length&&i++<10;){let c=e[s];if(s++,c===";"){r=wE.get(n);break}n+=c}return r?{entity:r,newI:s}:{entity:"&",newI:t}}function Tj(e){return e>=U.digit0&&e<=U.digit9}function Ej(e){return e>=U.digit0&&e<=U.digit9||e>=U.lowercaseA&&e<=U.lowercaseF||e>=U.uppercaseA&&e<=U.uppercaseF}var Mc,yb=z(()=>{"use strict";g();kE();Wt();je();Rr();_b();Qr();Mc=class e extends yt{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,i,r,s){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=i,this.nameManager=r,this.options=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Fc(s),this.isAutomaticRuntime=s.jsxRuntime==="automatic",this.jsxImportSource=s.jsxImportSource||"react"}process(){return this.tokens.matches1(a.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let t="";if(this.filenameVarName&&(t+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[n,i]of Object.entries(this.cjsAutomaticModuleNameResolutions))t+=`var ${i} = require("${n}");`;else{let{createElement:n,...i}=this.esmAutomaticImportNameResolutions;n&&(t+=`import {createElement as ${n}} from "${this.jsxImportSource}";`);let r=Object.entries(i).map(([s,c])=>`${s} as ${c}`).join(", ");if(r){let s=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");t+=`import {${r}} from "${s}";`}}return t}processJSXTag(){let{jsxRole:t,start:n}=this.tokens.currentToken(),i=this.options.production?null:this.getElementLocationCode(n);this.isAutomaticRuntime&&t!==jr.KeyAfterPropSpread?this.transformTagToJSXFunc(i,t):this.transformTagToCreateElement(i)}getElementLocationCode(t){return`lineNumber: ${this.getLineNumberForIndex(t)}`}getLineNumberForIndex(t){let n=this.tokens.code;for(;this.lastIndex<t&&this.lastIndex<n.length;)n[this.lastIndex]===`
|
|
188
|
-
`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(t,n){let i=n===jr.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(i));let r=null;if(this.tokens.matches1(a.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(n);else{if(this.processTagIntro(),this.tokens.appendCode(", {"),r=this.processProps(!0),this.tokens.matches2(a.slash,a.jsxTagEnd))this.tokens.appendCode("}");else if(this.tokens.matches1(a.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(n);else throw new Error("Expected either /> or > at the end of the tag.");r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${i}, ${this.getDevSource(t)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(a.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(t){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(a.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(t),!this.tokens.matches2(a.slash,a.jsxTagEnd))if(this.tokens.matches1(a.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(a.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(t){return this.options.production?t?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{let{jsxPragmaInfo:t}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.base)||t.base}${t.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{let{jsxPragmaInfo:t}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.fragmentBase)||t.fragmentBase)+t.fragmentSuffix}}claimAutoImportedFuncInvocation(t,n){let i=this.claimAutoImportedName(t,n);return this.importProcessor?`${i}.call(void 0, `:`${i}(`}claimAutoImportedName(t,n){if(this.importProcessor){let i=this.jsxImportSource+n;return this.cjsAutomaticModuleNameResolutions[i]||(this.cjsAutomaticModuleNameResolutions[i]=this.importProcessor.getFreeIdentifierForPath(i)),`${this.cjsAutomaticModuleNameResolutions[i]}.${t}`}else return this.esmAutomaticImportNameResolutions[t]||(this.esmAutomaticImportNameResolutions[t]=this.nameManager.claimFreeName(`_${t}`)),this.esmAutomaticImportNameResolutions[t]}processTagIntro(){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType||!this.tokens.matches2AtIndex(t-1,a.jsxName,a.jsxName)&&!this.tokens.matches2AtIndex(t-1,a.greaterThan,a.jsxName)&&!this.tokens.matches1AtIndex(t,a.braceL)&&!this.tokens.matches1AtIndex(t,a.jsxTagEnd)&&!this.tokens.matches2AtIndex(t,a.slash,a.jsxTagEnd);)t++;if(t===this.tokens.currentIndex()+1){let n=this.tokens.identifierName();vb(n)&&this.tokens.replaceToken(`'${n}'`)}for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(t){let n=this.options.production?"":`__self: this, __source: ${this.getDevSource(t)}`;if(!this.tokens.matches1(a.jsxName)&&!this.tokens.matches1(a.braceL)){n?this.tokens.appendCode(`, {${n}}`):this.tokens.appendCode(", null");return}this.tokens.appendCode(", {"),this.processProps(!1),n?this.tokens.appendCode(` ${n}}`):this.tokens.appendCode("}")}processProps(t){let n=null;for(;;){if(this.tokens.matches2(a.jsxName,a.eq)){let i=this.tokens.identifierName();if(t&&i==="key"){n!==null&&this.tokens.appendCode(n.replace(/[^\n]/g,"")),this.tokens.removeToken(),this.tokens.removeToken();let r=this.tokens.snapshot();this.processPropValue(),n=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(r);continue}else this.processPropName(i),this.tokens.replaceToken(": "),this.processPropValue()}else if(this.tokens.matches1(a.jsxName)){let i=this.tokens.identifierName();this.processPropName(i),this.tokens.appendCode(": true")}else if(this.tokens.matches1(a.braceL))this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("");else break;this.tokens.appendCode(",")}return n}processPropName(t){t.includes("-")?this.tokens.replaceToken(`'${t}'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(a.braceL)?(this.tokens.replaceToken(""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken("")):this.tokens.matches1(a.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start+1,t.end-1),i=SE(n),r=Ij(n);this.tokens.replaceToken(r+i)}processAutomaticChildrenAndEndProps(t){t===jr.StaticChildren?(this.tokens.appendCode(" children: ["),this.processChildren(!1),this.tokens.appendCode("]}")):(t===jr.OneChild&&this.tokens.appendCode(" children: "),this.processChildren(!1),this.tokens.appendCode("}"))}processChildren(t){let n=t;for(;;){if(this.tokens.matches2(a.jsxTagStart,a.slash))return;let i=!1;if(this.tokens.matches1(a.braceL))this.tokens.matches2(a.braceL,a.braceR)?(this.tokens.replaceToken(""),this.tokens.replaceToken("")):(this.tokens.replaceToken(n?", ":""),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(""),i=!0);else if(this.tokens.matches1(a.jsxTagStart))this.tokens.appendCode(n?", ":""),this.processJSXTag(),i=!0;else if(this.tokens.matches1(a.jsxText)||this.tokens.matches1(a.jsxEmptyText))i=this.processChildTextElement(n);else throw new Error("Unexpected token when processing JSX children.");i&&(n=!0)}}processChildTextElement(t){let n=this.tokens.currentToken(),i=this.tokens.code.slice(n.start,n.end),r=SE(i),s=Sj(i);return s==='""'?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${t?", ":""}${s}${r}`),!0)}getDevSource(t){return`{fileName: ${this.getFilenameVarName()}, ${t}}`}getFilenameVarName(){return this.filenameVarName||(this.filenameVarName=this.nameManager.claimFreeName("_jsxFileName")),this.filenameVarName}}});function Zp(e,t){let n=Fc(t),i=new Set;for(let r=0;r<e.tokens.length;r++){let s=e.tokens[r];if(s.type===a.name&&!s.isType&&(s.identifierRole===ge.Access||s.identifierRole===ge.ObjectShorthand||s.identifierRole===ge.ExportAccess)&&!s.shadowsGlobal&&i.add(e.identifierNameForToken(s)),s.type===a.jsxTagStart&&i.add(n.base),s.type===a.jsxTagStart&&r+1<e.tokens.length&&e.tokens[r+1].type===a.jsxTagEnd&&(i.add(n.base),i.add(n.fragmentBase)),s.type===a.jsxName&&s.identifierRole===ge.Access){let c=e.identifierNameForToken(s);(!vb(c)||e.tokens[r+1].type===a.dot)&&i.add(e.identifierNameForToken(s))}}return i}var bb=z(()=>{"use strict";g();Wt();je();yb();_b()});var Bc,TE=z(()=>{"use strict";g();Wt();Qt();je();Lc();bb();Bc=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,i,r,s,c,u){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=i,this.options=r,this.isTypeScriptTransformEnabled=s,this.keepUnusedImports=c,this.helperManager=u,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let t=0;t<this.tokens.tokens.length;t++)this.tokens.matches1AtIndex(t,a._import)&&!this.tokens.matches3AtIndex(t,a._import,a.name,a.eq)&&this.preprocessImportAtIndex(t),this.tokens.matches1AtIndex(t,a._export)&&!this.tokens.matches2AtIndex(t,a._export,a.eq)&&this.preprocessExportAtIndex(t);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Zp(this.tokens,this.options);for(let[t,n]of this.importInfoByPath.entries()){if(n.hasBareImport||n.hasStarExport||n.exportStarNames.length>0||n.namedExports.length>0)continue;[...n.defaultNames,...n.wildcardNames,...n.namedImports.map(({localName:r})=>r)].every(r=>this.shouldAutomaticallyElideImportedName(r))&&this.importsToReplace.set(t,"")}}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}generateImportReplacements(){for(let[t,n]of this.importInfoByPath.entries()){let{defaultNames:i,wildcardNames:r,namedImports:s,namedExports:c,exportStarNames:u,hasStarExport:p}=n;if(i.length===0&&r.length===0&&s.length===0&&c.length===0&&u.length===0&&!p){this.importsToReplace.set(t,`require('${t}');`);continue}let f=this.getFreeIdentifierForPath(t),v;this.enableLegacyTypeScriptModuleInterop?v=f:v=r.length>0?r[0]:this.getFreeIdentifierForPath(t);let y=`var ${f} = require('${t}');`;if(r.length>0)for(let k of r){let I=this.enableLegacyTypeScriptModuleInterop?f:`${this.helperManager.getHelperName("interopRequireWildcard")}(${f})`;y+=` var ${k} = ${I};`}else u.length>0&&v!==f?y+=` var ${v} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${f});`:i.length>0&&v!==f&&(y+=` var ${v} = ${this.helperManager.getHelperName("interopRequireDefault")}(${f});`);for(let{importedName:k,localName:I}of c)y+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${f}, '${I}', '${k}');`;for(let k of u)y+=` exports.${k} = ${v};`;p&&(y+=` ${this.helperManager.getHelperName("createStarExport")}(${f});`),this.importsToReplace.set(t,y);for(let k of i)this.identifierReplacements.set(k,`${v}.default`);for(let{importedName:k,localName:I}of s)this.identifierReplacements.set(I,`${f}.${k}`)}}getFreeIdentifierForPath(t){let n=t.split("/"),r=n[n.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${r}`)}preprocessImportAtIndex(t){let n=[],i=[],r=[];if(t++,(this.tokens.matchesContextualAtIndex(t,S._type)||this.tokens.matches1AtIndex(t,a._typeof))&&!this.tokens.matches1AtIndex(t+1,a.comma)&&!this.tokens.matchesContextualAtIndex(t+1,S._from)||this.tokens.matches1AtIndex(t,a.parenL))return;if(this.tokens.matches1AtIndex(t,a.name)&&(n.push(this.tokens.identifierNameAtIndex(t)),t++,this.tokens.matches1AtIndex(t,a.comma)&&t++),this.tokens.matches1AtIndex(t,a.star)&&(t+=2,i.push(this.tokens.identifierNameAtIndex(t)),t++),this.tokens.matches1AtIndex(t,a.braceL)){let u=this.getNamedImports(t+1);t=u.newIndex;for(let p of u.namedImports)p.importedName==="default"?n.push(p.localName):r.push(p)}if(this.tokens.matchesContextualAtIndex(t,S._from)&&t++,!this.tokens.matches1AtIndex(t,a.string))throw new Error("Expected string token at the end of import statement.");let s=this.tokens.stringValueAtIndex(t),c=this.getImportInfo(s);c.defaultNames.push(...n),c.wildcardNames.push(...i),c.namedImports.push(...r),n.length===0&&i.length===0&&r.length===0&&(c.hasBareImport=!0)}preprocessExportAtIndex(t){if(this.tokens.matches2AtIndex(t,a._export,a._var)||this.tokens.matches2AtIndex(t,a._export,a._let)||this.tokens.matches2AtIndex(t,a._export,a._const))this.preprocessVarExportAtIndex(t);else if(this.tokens.matches2AtIndex(t,a._export,a._function)||this.tokens.matches2AtIndex(t,a._export,a._class)){let n=this.tokens.identifierNameAtIndex(t+2);this.addExportBinding(n,n)}else if(this.tokens.matches3AtIndex(t,a._export,a.name,a._function)){let n=this.tokens.identifierNameAtIndex(t+3);this.addExportBinding(n,n)}else this.tokens.matches2AtIndex(t,a._export,a.braceL)?this.preprocessNamedExportAtIndex(t):this.tokens.matches2AtIndex(t,a._export,a.star)&&this.preprocessExportStarAtIndex(t)}preprocessVarExportAtIndex(t){let n=0;for(let i=t+2;;i++)if(this.tokens.matches1AtIndex(i,a.braceL)||this.tokens.matches1AtIndex(i,a.dollarBraceL)||this.tokens.matches1AtIndex(i,a.bracketL))n++;else if(this.tokens.matches1AtIndex(i,a.braceR)||this.tokens.matches1AtIndex(i,a.bracketR))n--;else{if(n===0&&!this.tokens.matches1AtIndex(i,a.name))break;if(this.tokens.matches1AtIndex(1,a.eq)){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected = token with an end index.");i=r-1}else{let r=this.tokens.tokens[i];if(jp(r)){let s=this.tokens.identifierNameAtIndex(i);this.identifierReplacements.set(s,`exports.${s}`)}}}}preprocessNamedExportAtIndex(t){t+=2;let{newIndex:n,namedImports:i}=this.getNamedImports(t);if(t=n,this.tokens.matchesContextualAtIndex(t,S._from))t++;else{for(let{importedName:c,localName:u}of i)this.addExportBinding(c,u);return}if(!this.tokens.matches1AtIndex(t,a.string))throw new Error("Expected string token at the end of import statement.");let r=this.tokens.stringValueAtIndex(t);this.getImportInfo(r).namedExports.push(...i)}preprocessExportStarAtIndex(t){let n=null;if(this.tokens.matches3AtIndex(t,a._export,a.star,a._as)?(t+=3,n=this.tokens.identifierNameAtIndex(t),t+=2):t+=3,!this.tokens.matches1AtIndex(t,a.string))throw new Error("Expected string token at the end of star export statement.");let i=this.tokens.stringValueAtIndex(t),r=this.getImportInfo(i);n!==null?r.exportStarNames.push(n):r.hasStarExport=!0}getNamedImports(t){let n=[];for(;;){if(this.tokens.matches1AtIndex(t,a.braceR)){t++;break}let i=zn(this.tokens,t);if(t=i.endIndex,i.isType||n.push({importedName:i.leftName,localName:i.rightName}),this.tokens.matches2AtIndex(t,a.comma,a.braceR)){t+=2;break}else if(this.tokens.matches1AtIndex(t,a.braceR)){t++;break}else if(this.tokens.matches1AtIndex(t,a.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[t])}`)}return{newIndex:t,namedImports:n}}getImportInfo(t){let n=this.importInfoByPath.get(t);if(n)return n;let i={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(t,i),i}addExportBinding(t,n){this.exportBindingsByLocalName.has(t)||this.exportBindingsByLocalName.set(t,[]),this.exportBindingsByLocalName.get(t).push(n)}claimImportCode(t){let n=this.importsToReplace.get(t);return this.importsToReplace.set(t,""),n||""}getIdentifierReplacement(t){return this.identifierReplacements.get(t)||null}resolveExportBinding(t){let n=this.exportBindingsByLocalName.get(t);return!n||n.length===0?null:n.map(i=>`exports.${i}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}}});function Zc(e,t,n){let i=t-n;i=i<0?-i<<1|1:i<<1;do{let r=i&31;i>>>=5,i>0&&(r|=32),e.write(CE[r])}while(i>0);return t}function xb(e){let t=new Oj,n=0,i=0,r=0,s=0;for(let c=0;c<e.length;c++){let u=e[c];if(c>0&&t.write(Pj),u.length===0)continue;let p=0;for(let f=0;f<u.length;f++){let v=u[f];f>0&&t.write(Aj),p=Zc(t,v[0],p),v.length!==1&&(n=Zc(t,v[1],n),i=Zc(t,v[2],i),r=Zc(t,v[3],r),v.length!==4&&(s=Zc(t,v[4],s)))}}return t.flush()}var Aj,Pj,EE,CE,Cj,AE,PE,Oj,wb=z(()=>{"use strict";g();Aj=44,Pj=59,EE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",CE=new Uint8Array(64),Cj=new Uint8Array(128);for(let e=0;e<EE.length;e++){let t=EE.charCodeAt(e);CE[e]=t,Cj[t]=e}AE=1024*16,PE=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Oj=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(AE)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===AE&&(this.out+=PE.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+PE.decode(e.subarray(0,n)):t}}});var OE=z(()=>{"use strict";g()});var UE=z(()=>{"use strict";g();wb();OE()});function Uj(e,t){return e._indexes[t]}function zE(e,t){let n=Uj(e,t);if(n!==void 0)return n;let{array:i,_indexes:r}=e,s=i.push(t);return r[t]=s-1}function Lj(e){let{_mappings:t,_sources:n,_sourcesContent:i,_names:r,_ignoreList:s}=e;return Zj(t),{version:3,file:e.file||void 0,names:r.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:i,mappings:t,ignoreList:s.array}}function jE(e){let t=Lj(e);return Object.assign({},t,{mappings:xb(t.mappings)})}function Fj(e,t,n,i,r,s,c,u,p){let{_mappings:f,_sources:v,_sourcesContent:y,_names:k}=t,I=Mj(f,n),$=Bj(I,i);if(!r)return e&&Wj(I,$)?void 0:NE(I,$,[i]);let O=zE(v,r),F=u?zE(k,u):RE;if(O===y.length&&(y[O]=p??null),!(e&&Vj(I,$,O,s,c,F)))return NE(I,$,u?[i,O,s,c,F]:[i,O,s,c])}function Mj(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function Bj(e,t){let n=e.length;for(let i=n-1;i>=0;n=i--){let r=e[i];if(t>=r[zj])break}return n}function NE(e,t,n){for(let i=e.length;i>t;i--)e[i]=e[i-1];e[t]=n}function Zj(e){let{length:t}=e,n=t;for(let i=n-1;i>=0&&!(e[i].length>0);n=i,i--);n<t&&(e.length=n)}function Wj(e,t){return t===0?!0:e[t-1].length===1}function Vj(e,t,n,i,r,s){if(t===0)return!1;let c=e[t-1];return c.length===1?!1:n===c[Nj]&&i===c[Rj]&&r===c[Dj]&&s===(c.length===5?c[jj]:RE)}var kb,zj,Nj,Rj,Dj,jj,RE,DE,Wp,LE=z(()=>{"use strict";g();wb();UE();kb=class{constructor(){this._indexes={__proto__:null},this.array=[]}};zj=0,Nj=1,Rj=2,Dj=3,jj=4,RE=-1,DE=class{constructor({file:e,sourceRoot:t}={}){this._names=new kb,this._sources=new kb,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new kb}},Wp=(e,t,n,i,r,s,c,u)=>Fj(!0,e,t,n,i,r,s,c,u)});function $b({code:e,mappings:t},n,i,r,s){let c=qj(r,s),u=new DE({file:i.compiledFilename}),p=0,f=t[0];for(;f===void 0&&p<t.length-1;)p++,f=t[p];let v=0,y=0;f!==y&&Wp(u,v,0,n,v,0);for(let O=0;O<e.length;O++){if(O===f){let F=f-y,Z=c[p];for(Wp(u,v,F,n,v,Z);(f===O||f===void 0)&&p<t.length-1;)p++,f=t[p]}e.charCodeAt(O)===U.lineFeed&&(v++,y=O+1,f!==y&&Wp(u,v,0,n,v,0))}let{sourceRoot:k,sourcesContent:I,...$}=jE(u);return $}function qj(e,t){let n=new Array(t.length),i=0,r=t[i].start,s=0;for(let c=0;c<e.length;c++)c===r&&(n[i]=r-s,i++,r=t[i].start),e.charCodeAt(c)===U.lineFeed&&(s=c+1);return n}var FE=z(()=>{"use strict";g();LE();Rr()});var Jj,Vp,ME=z(()=>{"use strict";g();Jj={require:`
|
|
189
|
-
import {createRequire as CREATE_REQUIRE_NAME} from "module";
|
|
190
|
-
const require = CREATE_REQUIRE_NAME(import.meta.url);
|
|
191
|
-
`,interopRequireWildcard:`
|
|
192
|
-
function interopRequireWildcard(obj) {
|
|
193
|
-
if (obj && obj.__esModule) {
|
|
194
|
-
return obj;
|
|
195
|
-
} else {
|
|
196
|
-
var newObj = {};
|
|
197
|
-
if (obj != null) {
|
|
198
|
-
for (var key in obj) {
|
|
199
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
200
|
-
newObj[key] = obj[key];
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
newObj.default = obj;
|
|
205
|
-
return newObj;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
`,interopRequireDefault:`
|
|
209
|
-
function interopRequireDefault(obj) {
|
|
210
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
211
|
-
}
|
|
212
|
-
`,createNamedExportFrom:`
|
|
213
|
-
function createNamedExportFrom(obj, localName, importedName) {
|
|
214
|
-
Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
|
|
215
|
-
}
|
|
216
|
-
`,createStarExport:`
|
|
217
|
-
function createStarExport(obj) {
|
|
218
|
-
Object.keys(obj)
|
|
219
|
-
.filter((key) => key !== "default" && key !== "__esModule")
|
|
220
|
-
.forEach((key) => {
|
|
221
|
-
if (exports.hasOwnProperty(key)) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
`,nullishCoalesce:`
|
|
228
|
-
function nullishCoalesce(lhs, rhsFn) {
|
|
229
|
-
if (lhs != null) {
|
|
230
|
-
return lhs;
|
|
231
|
-
} else {
|
|
232
|
-
return rhsFn();
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
`,asyncNullishCoalesce:`
|
|
236
|
-
async function asyncNullishCoalesce(lhs, rhsFn) {
|
|
237
|
-
if (lhs != null) {
|
|
238
|
-
return lhs;
|
|
239
|
-
} else {
|
|
240
|
-
return await rhsFn();
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
`,optionalChain:`
|
|
244
|
-
function optionalChain(ops) {
|
|
245
|
-
let lastAccessLHS = undefined;
|
|
246
|
-
let value = ops[0];
|
|
247
|
-
let i = 1;
|
|
248
|
-
while (i < ops.length) {
|
|
249
|
-
const op = ops[i];
|
|
250
|
-
const fn = ops[i + 1];
|
|
251
|
-
i += 2;
|
|
252
|
-
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
253
|
-
return undefined;
|
|
254
|
-
}
|
|
255
|
-
if (op === 'access' || op === 'optionalAccess') {
|
|
256
|
-
lastAccessLHS = value;
|
|
257
|
-
value = fn(value);
|
|
258
|
-
} else if (op === 'call' || op === 'optionalCall') {
|
|
259
|
-
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
260
|
-
lastAccessLHS = undefined;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return value;
|
|
264
|
-
}
|
|
265
|
-
`,asyncOptionalChain:`
|
|
266
|
-
async function asyncOptionalChain(ops) {
|
|
267
|
-
let lastAccessLHS = undefined;
|
|
268
|
-
let value = ops[0];
|
|
269
|
-
let i = 1;
|
|
270
|
-
while (i < ops.length) {
|
|
271
|
-
const op = ops[i];
|
|
272
|
-
const fn = ops[i + 1];
|
|
273
|
-
i += 2;
|
|
274
|
-
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
275
|
-
return undefined;
|
|
276
|
-
}
|
|
277
|
-
if (op === 'access' || op === 'optionalAccess') {
|
|
278
|
-
lastAccessLHS = value;
|
|
279
|
-
value = await fn(value);
|
|
280
|
-
} else if (op === 'call' || op === 'optionalCall') {
|
|
281
|
-
value = await fn((...args) => value.call(lastAccessLHS, ...args));
|
|
282
|
-
lastAccessLHS = undefined;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
return value;
|
|
286
|
-
}
|
|
287
|
-
`,optionalChainDelete:`
|
|
288
|
-
function optionalChainDelete(ops) {
|
|
289
|
-
const result = OPTIONAL_CHAIN_NAME(ops);
|
|
290
|
-
return result == null ? true : result;
|
|
291
|
-
}
|
|
292
|
-
`,asyncOptionalChainDelete:`
|
|
293
|
-
async function asyncOptionalChainDelete(ops) {
|
|
294
|
-
const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
|
|
295
|
-
return result == null ? true : result;
|
|
296
|
-
}
|
|
297
|
-
`},Vp=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(t){let n=this.helperNames[t];return n||(n=this.nameManager.claimFreeName(`_${t}`),this.helperNames[t]=n,n)}emitHelpers(){let t="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(let[n,i]of Object.entries(Jj)){let r=this.helperNames[n],s=i;n==="optionalChainDelete"?s=s.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):n==="asyncOptionalChainDelete"?s=s.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):n==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),s=s.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(t+=" ",t+=s.replace(n,r).replace(/\s+/g," ").trim())}return t}}});function qp(e,t,n){Kj(e,n)&&Gj(e,t,n)}function Kj(e,t){for(let n of e.tokens)if(n.type===a.name&&!n.isType&&mE(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function Gj(e,t,n){let i=[],r=t.length-1;for(let s=e.tokens.length-1;;s--){for(;i.length>0&&i[i.length-1].startTokenIndex===s+1;)i.pop();for(;r>=0&&t[r].endTokenIndex===s+1;)i.push(t[r]),r--;if(s<0)break;let c=e.tokens[s],u=e.identifierNameForToken(c);if(i.length>1&&!c.isType&&c.type===a.name&&n.has(u)){if(gE(c))BE(i[i.length-1],e,u);else if(_E(c)){let p=i.length-1;for(;p>0&&!i[p].isFunctionScope;)p--;if(p<0)throw new Error("Did not find parent function scope.");BE(i[p],e,u)}}}if(i.length>0)throw new Error("Expected empty scope stack after processing file.")}function BE(e,t,n){for(let i=e.startTokenIndex;i<e.endTokenIndex;i++){let r=t.tokens[i];(r.type===a.name||r.type===a.jsxName)&&t.identifierNameForToken(r)===n&&(r.shadowsGlobal=!0)}}var ZE=z(()=>{"use strict";g();Wt();je()});function Sb(e,t){let n=[];for(let i of t)i.type===a.name&&n.push(e.slice(i.start,i.end));return n}var WE=z(()=>{"use strict";g();je()});var Wc,VE=z(()=>{"use strict";g();WE();Wc=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(Sb(t,n))}claimFreeName(t){let n=this.findFreeName(t);return this.usedNames.add(n),n}findFreeName(t){if(!this.usedNames.has(t))return t;let n=2;for(;this.usedNames.has(t+String(n));)n++;return t+String(n)}}});var Jp=$t(Nn=>{"use strict";g();var Hj=Nn&&Nn.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.DetailContext=Nn.NoopContext=Nn.VError=void 0;var qE=(function(e){Hj(t,e);function t(n,i){var r=e.call(this,i)||this;return r.path=n,Object.setPrototypeOf(r,t.prototype),r}return t})(Error);Nn.VError=qE;var Xj=(function(){function e(){}return e.prototype.fail=function(t,n,i){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(t){},e})();Nn.NoopContext=Xj;var JE=(function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(t,n,i){return this._propNames.push(t),this._messages.push(n),this._score+=i,!1},e.prototype.unionResolver=function(){return new Yj},e.prototype.resolveUnion=function(t){for(var n,i,r=t,s=null,c=0,u=r.contexts;c<u.length;c++){var p=u[c];(!s||p._score>=s._score)&&(s=p)}s&&s._score>0&&((n=this._propNames).push.apply(n,s._propNames),(i=this._messages).push.apply(i,s._messages))},e.prototype.getError=function(t){for(var n=[],i=this._propNames.length-1;i>=0;i--){var r=this._propNames[i];t+=typeof r=="number"?"["+r+"]":r?"."+r:"";var s=this._messages[i];s&&n.push(t+" "+s)}return new qE(t,n.join("; "))},e.prototype.getErrorDetail=function(t){for(var n=[],i=this._propNames.length-1;i>=0;i--){var r=this._propNames[i];t+=typeof r=="number"?"["+r+"]":r?"."+r:"";var s=this._messages[i];s&&n.push({path:t,message:s})}for(var c=null,i=n.length-1;i>=0;i--)c&&(n[i].nested=[c]),c=n[i];return c},e})();Nn.DetailContext=JE;var Yj=(function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var t=new JE;return this.contexts.push(t),t},e})()});var Ub=$t(_e=>{"use strict";g();var Lr=_e&&_e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var s in r)r.hasOwnProperty(s)&&(i[s]=r[s])},e(t,n)};return function(t,n){e(t,n);function i(){this.constructor=t}t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}})();Object.defineProperty(_e,"__esModule",{value:!0});_e.basicTypes=_e.BasicType=_e.TParamList=_e.TParam=_e.param=_e.TFunc=_e.func=_e.TProp=_e.TOptional=_e.opt=_e.TIface=_e.iface=_e.TEnumLiteral=_e.enumlit=_e.TEnumType=_e.enumtype=_e.TIntersection=_e.intersection=_e.TUnion=_e.union=_e.TTuple=_e.tuple=_e.TArray=_e.array=_e.TLiteral=_e.lit=_e.TName=_e.name=_e.TType=void 0;var HE=Jp(),Er=(function(){function e(){}return e})();_e.TType=Er;function Ri(e){return typeof e=="string"?XE(e):e}function Eb(e,t){var n=e[t];if(!n)throw new Error("Unknown type "+t);return n}function XE(e){return new Ab(e)}_e.name=XE;var Ab=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.name=n,i._failMsg="is not a "+n,i}return t.prototype.getChecker=function(n,i,r){var s=this,c=Eb(n,this.name),u=c.getChecker(n,i,r);return c instanceof lr||c instanceof t?u:function(p,f){return u(p,f)?!0:f.fail(null,s._failMsg,0)}},t})(Er);_e.TName=Ab;function Qj(e){return new Pb(e)}_e.lit=Qj;var Pb=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.value=n,i.name=JSON.stringify(n),i._failMsg="is not "+i.name,i}return t.prototype.getChecker=function(n,i){var r=this;return function(s,c){return s===r.value?!0:c.fail(null,r._failMsg,-1)}},t})(Er);_e.TLiteral=Pb;function e6(e){return new YE(Ri(e))}_e.array=e6;var YE=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.ttype=n,i}return t.prototype.getChecker=function(n,i){var r=this.ttype.getChecker(n,i);return function(s,c){if(!Array.isArray(s))return c.fail(null,"is not an array",0);for(var u=0;u<s.length;u++){var p=r(s[u],c);if(!p)return c.fail(u,null,1)}return!0}},t})(Er);_e.TArray=YE;function t6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new QE(e.map(function(n){return Ri(n)}))}_e.tuple=t6;var QE=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.ttypes=n,i}return t.prototype.getChecker=function(n,i){var r=this.ttypes.map(function(c){return c.getChecker(n,i)}),s=function(c,u){if(!Array.isArray(c))return u.fail(null,"is not an array",0);for(var p=0;p<r.length;p++){var f=r[p](c[p],u);if(!f)return u.fail(p,null,1)}return!0};return i?function(c,u){return s(c,u)?c.length<=r.length?!0:u.fail(r.length,"is extraneous",2):!1}:s},t})(Er);_e.TTuple=QE;function r6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new eA(e.map(function(n){return Ri(n)}))}_e.union=r6;var eA=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;i.ttypes=n;var r=n.map(function(c){return c instanceof Ab||c instanceof Pb?c.name:null}).filter(function(c){return c}),s=n.length-r.length;return r.length?(s>0&&r.push(s+" more"),i._failMsg="is none of "+r.join(", ")):i._failMsg="is none of "+s+" types",i}return t.prototype.getChecker=function(n,i){var r=this,s=this.ttypes.map(function(c){return c.getChecker(n,i)});return function(c,u){for(var p=u.unionResolver(),f=0;f<s.length;f++){var v=s[f](c,p.createContext());if(v)return!0}return u.resolveUnion(p),u.fail(null,r._failMsg,0)}},t})(Er);_e.TUnion=eA;function n6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new tA(e.map(function(n){return Ri(n)}))}_e.intersection=n6;var tA=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.ttypes=n,i}return t.prototype.getChecker=function(n,i){var r=new Set,s=this.ttypes.map(function(c){return c.getChecker(n,i,r)});return function(c,u){var p=s.every(function(f){return f(c,u)});return p?!0:u.fail(null,null,0)}},t})(Er);_e.TIntersection=tA;function i6(e){return new Cb(e)}_e.enumtype=i6;var Cb=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.members=n,i.validValues=new Set,i._failMsg="is not a valid enum value",i.validValues=new Set(Object.keys(n).map(function(r){return n[r]})),i}return t.prototype.getChecker=function(n,i){var r=this;return function(s,c){return r.validValues.has(s)?!0:c.fail(null,r._failMsg,0)}},t})(Er);_e.TEnumType=Cb;function o6(e,t){return new rA(e,t)}_e.enumlit=o6;var rA=(function(e){Lr(t,e);function t(n,i){var r=e.call(this)||this;return r.enumName=n,r.prop=i,r._failMsg="is not "+n+"."+i,r}return t.prototype.getChecker=function(n,i){var r=this,s=Eb(n,this.enumName);if(!(s instanceof Cb))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var c=s.members[this.prop];if(!s.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(u,p){return u===c?!0:p.fail(null,r._failMsg,-1)}},t})(Er);_e.TEnumLiteral=rA;function s6(e){return Object.keys(e).map(function(t){return a6(t,e[t])})}function a6(e,t){return t instanceof Ob?new Tb(e,t.ttype,!0):new Tb(e,Ri(t),!1)}function c6(e,t){return new nA(e,s6(t))}_e.iface=c6;var nA=(function(e){Lr(t,e);function t(n,i){var r=e.call(this)||this;return r.bases=n,r.props=i,r.propSet=new Set(i.map(function(s){return s.name})),r}return t.prototype.getChecker=function(n,i,r){var s=this,c=this.bases.map(function(k){return Eb(n,k).getChecker(n,i)}),u=this.props.map(function(k){return k.ttype.getChecker(n,i)}),p=new HE.NoopContext,f=this.props.map(function(k,I){return!k.isOpt&&!u[I](void 0,p)}),v=function(k,I){if(typeof k!="object"||k===null)return I.fail(null,"is not an object",0);for(var $=0;$<c.length;$++)if(!c[$](k,I))return!1;for(var $=0;$<u.length;$++){var O=s.props[$].name,F=k[O];if(F===void 0){if(f[$])return I.fail(O,"is missing",1)}else{var Z=u[$](F,I);if(!Z)return I.fail(O,null,1)}}return!0};if(!i)return v;var y=this.propSet;return r&&(this.propSet.forEach(function(k){return r.add(k)}),y=r),function(k,I){if(!v(k,I))return!1;for(var $ in k)if(!y.has($))return I.fail($,"is extraneous",2);return!0}},t})(Er);_e.TIface=nA;function l6(e){return new Ob(Ri(e))}_e.opt=l6;var Ob=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.ttype=n,i}return t.prototype.getChecker=function(n,i){var r=this.ttype.getChecker(n,i);return function(s,c){return s===void 0||r(s,c)}},t})(Er);_e.TOptional=Ob;var Tb=(function(){function e(t,n,i){this.name=t,this.ttype=n,this.isOpt=i}return e})();_e.TProp=Tb;function u6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new iA(new sA(t),Ri(e))}_e.func=u6;var iA=(function(e){Lr(t,e);function t(n,i){var r=e.call(this)||this;return r.paramList=n,r.result=i,r}return t.prototype.getChecker=function(n,i){return function(r,s){return typeof r=="function"?!0:s.fail(null,"is not a function",0)}},t})(Er);_e.TFunc=iA;function d6(e,t,n){return new oA(e,Ri(t),!!n)}_e.param=d6;var oA=(function(){function e(t,n,i){this.name=t,this.ttype=n,this.isOpt=i}return e})();_e.TParam=oA;var sA=(function(e){Lr(t,e);function t(n){var i=e.call(this)||this;return i.params=n,i}return t.prototype.getChecker=function(n,i){var r=this,s=this.params.map(function(f){return f.ttype.getChecker(n,i)}),c=new HE.NoopContext,u=this.params.map(function(f,v){return!f.isOpt&&!s[v](void 0,c)}),p=function(f,v){if(!Array.isArray(f))return v.fail(null,"is not an array",0);for(var y=0;y<s.length;y++){var k=r.params[y];if(f[y]===void 0){if(u[y])return v.fail(k.name,"is missing",1)}else{var I=s[y](f[y],v);if(!I)return v.fail(k.name,null,1)}}return!0};return i?function(f,v){return p(f,v)?f.length<=s.length?!0:v.fail(s.length,"is extraneous",2):!1}:p},t})(Er);_e.TParamList=sA;var lr=(function(e){Lr(t,e);function t(n,i){var r=e.call(this)||this;return r.validator=n,r.message=i,r}return t.prototype.getChecker=function(n,i){var r=this;return function(s,c){return r.validator(s)?!0:c.fail(null,r.message,0)}},t})(Er);_e.BasicType=lr;_e.basicTypes={any:new lr(function(e){return!0},"is invalid"),number:new lr(function(e){return typeof e=="number"},"is not a number"),object:new lr(function(e){return typeof e=="object"&&e},"is not an object"),boolean:new lr(function(e){return typeof e=="boolean"},"is not a boolean"),string:new lr(function(e){return typeof e=="string"},"is not a string"),symbol:new lr(function(e){return typeof e=="symbol"},"is not a symbol"),void:new lr(function(e){return e==null},"is not void"),undefined:new lr(function(e){return e===void 0},"is not undefined"),null:new lr(function(e){return e===null},"is not null"),never:new lr(function(e){return!1},"is unexpected"),Date:new lr(KE("[object Date]"),"is not a Date"),RegExp:new lr(KE("[object RegExp]"),"is not a RegExp")};var p6=Object.prototype.toString;function KE(e){return function(t){return typeof t=="object"&&t&&p6.call(t)===e}}typeof Buffer<"u"&&(_e.basicTypes.Buffer=new lr(function(e){return Buffer.isBuffer(e)},"is not a Buffer"));var f6=function(e){_e.basicTypes[e.name]=new lr(function(t){return t instanceof e},"is not a "+e.name)};for(Kp=0,Ib=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];Kp<Ib.length;Kp++)GE=Ib[Kp],f6(GE);var GE,Kp,Ib});var zb=$t(Me=>{"use strict";g();var h6=Me&&Me.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),r=0,t=0;t<n;t++)for(var s=arguments[t],c=0,u=s.length;c<u;c++,r++)i[r]=s[c];return i};Object.defineProperty(Me,"__esModule",{value:!0});Me.Checker=Me.createCheckers=void 0;var Vc=Ub(),Ws=Jp(),ct=Ub();Object.defineProperty(Me,"TArray",{enumerable:!0,get:function(){return ct.TArray}});Object.defineProperty(Me,"TEnumType",{enumerable:!0,get:function(){return ct.TEnumType}});Object.defineProperty(Me,"TEnumLiteral",{enumerable:!0,get:function(){return ct.TEnumLiteral}});Object.defineProperty(Me,"TFunc",{enumerable:!0,get:function(){return ct.TFunc}});Object.defineProperty(Me,"TIface",{enumerable:!0,get:function(){return ct.TIface}});Object.defineProperty(Me,"TLiteral",{enumerable:!0,get:function(){return ct.TLiteral}});Object.defineProperty(Me,"TName",{enumerable:!0,get:function(){return ct.TName}});Object.defineProperty(Me,"TOptional",{enumerable:!0,get:function(){return ct.TOptional}});Object.defineProperty(Me,"TParam",{enumerable:!0,get:function(){return ct.TParam}});Object.defineProperty(Me,"TParamList",{enumerable:!0,get:function(){return ct.TParamList}});Object.defineProperty(Me,"TProp",{enumerable:!0,get:function(){return ct.TProp}});Object.defineProperty(Me,"TTuple",{enumerable:!0,get:function(){return ct.TTuple}});Object.defineProperty(Me,"TType",{enumerable:!0,get:function(){return ct.TType}});Object.defineProperty(Me,"TUnion",{enumerable:!0,get:function(){return ct.TUnion}});Object.defineProperty(Me,"TIntersection",{enumerable:!0,get:function(){return ct.TIntersection}});Object.defineProperty(Me,"array",{enumerable:!0,get:function(){return ct.array}});Object.defineProperty(Me,"enumlit",{enumerable:!0,get:function(){return ct.enumlit}});Object.defineProperty(Me,"enumtype",{enumerable:!0,get:function(){return ct.enumtype}});Object.defineProperty(Me,"func",{enumerable:!0,get:function(){return ct.func}});Object.defineProperty(Me,"iface",{enumerable:!0,get:function(){return ct.iface}});Object.defineProperty(Me,"lit",{enumerable:!0,get:function(){return ct.lit}});Object.defineProperty(Me,"name",{enumerable:!0,get:function(){return ct.name}});Object.defineProperty(Me,"opt",{enumerable:!0,get:function(){return ct.opt}});Object.defineProperty(Me,"param",{enumerable:!0,get:function(){return ct.param}});Object.defineProperty(Me,"tuple",{enumerable:!0,get:function(){return ct.tuple}});Object.defineProperty(Me,"union",{enumerable:!0,get:function(){return ct.union}});Object.defineProperty(Me,"intersection",{enumerable:!0,get:function(){return ct.intersection}});Object.defineProperty(Me,"BasicType",{enumerable:!0,get:function(){return ct.BasicType}});var m6=Jp();Object.defineProperty(Me,"VError",{enumerable:!0,get:function(){return m6.VError}});function g6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=Object.assign.apply(Object,h6([{},Vc.basicTypes],e)),i={},r=0,s=e;r<s.length;r++)for(var c=s[r],u=0,p=Object.keys(c);u<p.length;u++){var f=p[u];i[f]=new aA(n,c[f])}return i}Me.createCheckers=g6;var aA=(function(){function e(t,n,i){if(i===void 0&&(i="value"),this.suite=t,this.ttype=n,this._path=i,this.props=new Map,n instanceof Vc.TIface)for(var r=0,s=n.props;r<s.length;r++){var c=s[r];this.props.set(c.name,c.ttype)}this.checkerPlain=this.ttype.getChecker(t,!1),this.checkerStrict=this.ttype.getChecker(t,!0)}return e.prototype.setReportedPath=function(t){this._path=t},e.prototype.check=function(t){return this._doCheck(this.checkerPlain,t)},e.prototype.test=function(t){return this.checkerPlain(t,new Ws.NoopContext)},e.prototype.validate=function(t){return this._doValidate(this.checkerPlain,t)},e.prototype.strictCheck=function(t){return this._doCheck(this.checkerStrict,t)},e.prototype.strictTest=function(t){return this.checkerStrict(t,new Ws.NoopContext)},e.prototype.strictValidate=function(t){return this._doValidate(this.checkerStrict,t)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw new Error("Type has no property "+t);return new e(this.suite,n,this._path+"."+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof Vc.TFunc))throw new Error("getArgs() applied to non-function");return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof Vc.TFunc))throw new Error("getResult() applied to non-function");return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(t,n){var i=new Ws.NoopContext;if(!t(n,i)){var r=new Ws.DetailContext;throw t(n,r),r.getError(this._path)}},e.prototype._doValidate=function(t,n){var i=new Ws.NoopContext;if(t(n,i))return null;var r=new Ws.DetailContext;return t(n,r),r.getErrorDetail(this._path)},e.prototype._getMethod=function(t){var n=this.props.get(t);if(!n)throw new Error("Type has no property "+t);if(!(n instanceof Vc.TFunc))throw new Error("Property "+t+" is not a method");return n},e})();Me.Checker=aA});var He,_6,v6,y6,b6,cA,lA=z(()=>{"use strict";g();He=Ln(zb()),_6=He.union(He.lit("jsx"),He.lit("typescript"),He.lit("flow"),He.lit("imports"),He.lit("react-hot-loader"),He.lit("jest")),v6=He.iface([],{compiledFilename:"string"}),y6=He.iface([],{transforms:He.array("Transform"),disableESTransforms:He.opt("boolean"),jsxRuntime:He.opt(He.union(He.lit("classic"),He.lit("automatic"),He.lit("preserve"))),production:He.opt("boolean"),jsxImportSource:He.opt("string"),jsxPragma:He.opt("string"),jsxFragmentPragma:He.opt("string"),keepUnusedImports:He.opt("boolean"),preserveDynamicImport:He.opt("boolean"),injectCreateRequireForImportRequire:He.opt("boolean"),enableLegacyTypeScriptModuleInterop:He.opt("boolean"),enableLegacyBabel5ModuleInterop:He.opt("boolean"),sourceMapOptions:He.opt("SourceMapOptions"),filePath:He.opt("string")}),b6={Transform:_6,SourceMapOptions:v6,Options:y6},cA=b6});function dA(e){x6.strictCheck(e)}var uA,x6,pA=z(()=>{"use strict";g();uA=Ln(zb());lA();({Options:x6}=(0,uA.createCheckers)(cA))});function Nb(){q(),Ot(!1)}function Rb(e){q(),Jc(e)}function pn(e){we(),Gp(e)}function Vs(){we(),d.tokens[d.tokens.length-1].identifierRole=ge.ImportDeclaration}function Gp(e){let t;d.scopeDepth===0?t=ge.TopLevelDeclaration:e?t=ge.BlockScopedDeclaration:t=ge.FunctionScopedDeclaration,d.tokens[d.tokens.length-1].identifierRole=t}function Jc(e){switch(d.type){case a._this:{let t=Ee(0);q(),Ie(t);return}case a._yield:case a.name:{d.type=a.name,pn(e);return}case a.bracketL:{q(),Kc(a.bracketR,e,!0);return}case a.braceL:Hc(!0,e);return;default:$e()}}function Kc(e,t,n=!1,i=!1,r=0){let s=!0,c=!1,u=d.tokens.length;for(;!D(e)&&!d.error;)if(s?s=!1:(V(a.comma),d.tokens[d.tokens.length-1].contextId=r,!c&&d.tokens[u].isType&&(d.tokens[d.tokens.length-1].isType=!0,c=!0)),!(n&&w(a.comma))){if(D(e))break;if(w(a.ellipsis)){Rb(t),fA(),D(a.comma),V(e);break}else w6(i,t)}}function w6(e,t){e&&Gc([S._public,S._protected,S._private,S._readonly,S._override]),qc(t),fA(),qc(t,!0)}function fA(){Le?mA():ze&&hA()}function qc(e,t=!1){if(t||Jc(e),!D(a.eq))return;let n=d.tokens.length-1;Ot(),d.tokens[n].rhsEndIndex=d.tokens.length}var Hp=z(()=>{"use strict";g();Xc();qs();Wt();Qt();je();Dr();go();Ni()});function jb(){return w(a.name)}function k6(){return w(a.name)||!!(d.type&a.IS_KEYWORD)||w(a.string)||w(a.num)||w(a.bigint)||w(a.decimal)}function xA(){let e=d.snapshot();return q(),(w(a.bracketL)||w(a.braceL)||w(a.star)||w(a.ellipsis)||w(a.hash)||k6())&&!er()?!0:(d.restoreFromSnapshot(e),!1)}function Gc(e){for(;wA(e)!==null;);}function wA(e){if(!w(a.name))return null;let t=d.contextualKeyword;if(e.indexOf(t)!==-1&&xA()){switch(t){case S._readonly:d.tokens[d.tokens.length-1].type=a._readonly;break;case S._abstract:d.tokens[d.tokens.length-1].type=a._abstract;break;case S._static:d.tokens[d.tokens.length-1].type=a._static;break;case S._public:d.tokens[d.tokens.length-1].type=a._public;break;case S._private:d.tokens[d.tokens.length-1].type=a._private;break;case S._protected:d.tokens[d.tokens.length-1].type=a._protected;break;case S._override:d.tokens[d.tokens.length-1].type=a._override;break;case S._declare:d.tokens[d.tokens.length-1].type=a._declare;break;default:break}return t}return null}function Qc(){for(we();D(a.dot);)we()}function $6(){Qc(),!er()&&w(a.lessThan)&&Gs()}function S6(){q(),Ks()}function I6(){q()}function T6(){V(a._typeof),w(a._import)?kA():Qc(),!er()&&w(a.lessThan)&&Gs()}function kA(){V(a._import),V(a.parenL),V(a.string),V(a.parenR),D(a.dot)&&Qc(),w(a.lessThan)&&Gs()}function E6(){D(a._const);let e=D(a._in),t=St(S._out);D(a._const),(e||t)&&!w(a.name)?d.tokens[d.tokens.length-1].type=a.name:we(),D(a._extends)&&bt(),D(a.eq)&&bt()}function Li(){w(a.lessThan)&&Yp()}function Yp(){let e=Ee(0);for(w(a.lessThan)||w(a.typeParameterStart)?q():$e();!D(a.greaterThan)&&!d.error;)E6(),D(a.comma);Ie(e)}function Mb(e){let t=e===a.arrow;Li(),V(a.parenL),d.scopeDepth++,A6(!1),d.scopeDepth--,(t||w(e))&&Yc(e)}function A6(e){Kc(a.parenR,e)}function Xp(){D(a.comma)||nt()}function gA(){Mb(a.colon),Xp()}function P6(){let e=d.snapshot();q();let t=D(a.name)&&w(a.colon);return d.restoreFromSnapshot(e),t}function $A(){if(!(w(a.bracketL)&&P6()))return!1;let e=Ee(0);return V(a.bracketL),we(),Ks(),V(a.bracketR),_o(),Xp(),Ie(e),!0}function _A(e){D(a.question),!e&&(w(a.parenL)||w(a.lessThan))?(Mb(a.colon),Xp()):(_o(),Xp())}function C6(){if(w(a.parenL)||w(a.lessThan)){gA();return}if(w(a._new)){q(),w(a.parenL)||w(a.lessThan)?gA():_A(!1);return}let e=!!wA([S._readonly]);$A()||((me(S._get)||me(S._set))&&xA(),vo(-1),_A(e))}function O6(){SA()}function SA(){for(V(a.braceL);!D(a.braceR)&&!d.error;)C6()}function U6(){let e=d.snapshot(),t=z6();return d.restoreFromSnapshot(e),t}function z6(){return q(),D(a.plus)||D(a.minus)?me(S._readonly):(me(S._readonly)&&q(),!w(a.bracketL)||(q(),!jb())?!1:(q(),w(a._in)))}function N6(){we(),V(a._in),bt()}function R6(){V(a.braceL),w(a.plus)||w(a.minus)?(q(),gt(S._readonly)):St(S._readonly),V(a.bracketL),N6(),St(S._as)&&bt(),V(a.bracketR),w(a.plus)||w(a.minus)?(q(),V(a.question)):D(a.question),H6(),nt(),V(a.braceR)}function D6(){for(V(a.bracketL);!D(a.bracketR)&&!d.error;)j6(),D(a.comma)}function j6(){D(a.ellipsis)?bt():(bt(),D(a.question)),D(a.colon)&&bt()}function L6(){V(a.parenL),bt(),V(a.parenR)}function F6(){for(Un(),Un();!w(a.backQuote)&&!d.error;)V(a.dollarBraceL),bt(),Un(),Un();q()}function Db(e){e===Di.TSAbstractConstructorType&>(S._abstract),(e===Di.TSConstructorType||e===Di.TSAbstractConstructorType)&&V(a._new);let t=d.inDisallowConditionalTypesContext;d.inDisallowConditionalTypesContext=!1,Mb(a.arrow),d.inDisallowConditionalTypesContext=t}function M6(){switch(d.type){case a.name:$6();return;case a._void:case a._null:q();return;case a.string:case a.num:case a.bigint:case a.decimal:case a._true:case a._false:ji();return;case a.minus:q(),ji();return;case a._this:{I6(),me(S._is)&&!er()&&S6();return}case a._typeof:T6();return;case a._import:kA();return;case a.braceL:U6()?R6():O6();return;case a.bracketL:D6();return;case a.parenL:L6();return;case a.backQuote:F6();return;default:if(d.type&a.IS_KEYWORD){q(),d.tokens[d.tokens.length-1].type=a.name;return}break}$e()}function B6(){for(M6();!er()&&D(a.bracketL);)D(a.bracketR)||(bt(),V(a.bracketR))}function Z6(){if(gt(S._infer),we(),w(a._extends)){let e=d.snapshot();V(a._extends);let t=d.inDisallowConditionalTypesContext;d.inDisallowConditionalTypesContext=!0,bt(),d.inDisallowConditionalTypesContext=t,(d.error||!d.inDisallowConditionalTypesContext&&w(a.question))&&d.restoreFromSnapshot(e)}}function Lb(){if(me(S._keyof)||me(S._unique)||me(S._readonly))q(),Lb();else if(me(S._infer))Z6();else{let e=d.inDisallowConditionalTypesContext;d.inDisallowConditionalTypesContext=!1,B6(),d.inDisallowConditionalTypesContext=e}}function vA(){if(D(a.bitwiseAND),Lb(),w(a.bitwiseAND))for(;D(a.bitwiseAND);)Lb()}function W6(){if(D(a.bitwiseOR),vA(),w(a.bitwiseOR))for(;D(a.bitwiseOR);)vA()}function V6(){return w(a.lessThan)?!0:w(a.parenL)&&J6()}function q6(){if(w(a.name)||w(a._this))return q(),!0;if(w(a.braceL)||w(a.bracketL)){let e=1;for(q();e>0&&!d.error;)w(a.braceL)||w(a.bracketL)?e++:(w(a.braceR)||w(a.bracketR))&&e--,q();return!0}return!1}function J6(){let e=d.snapshot(),t=K6();return d.restoreFromSnapshot(e),t}function K6(){return q(),!!(w(a.parenR)||w(a.ellipsis)||q6()&&(w(a.colon)||w(a.comma)||w(a.question)||w(a.eq)||w(a.parenR)&&(q(),w(a.arrow))))}function Yc(e){let t=Ee(0);V(e),X6()||bt(),Ie(t)}function G6(){w(a.colon)&&Yc(a.colon)}function _o(){w(a.colon)&&Ks()}function H6(){D(a.colon)&&bt()}function X6(){let e=d.snapshot();return me(S._asserts)?(q(),St(S._is)?(bt(),!0):jb()||w(a._this)?(q(),St(S._is)&&bt(),!0):(d.restoreFromSnapshot(e),!1)):jb()||w(a._this)?(q(),me(S._is)&&!er()?(q(),bt(),!0):(d.restoreFromSnapshot(e),!1)):!1}function Ks(){let e=Ee(0);V(a.colon),bt(),Ie(e)}function bt(){if(yA(),d.inDisallowConditionalTypesContext||er()||!D(a._extends))return;let e=d.inDisallowConditionalTypesContext;d.inDisallowConditionalTypesContext=!0,yA(),d.inDisallowConditionalTypesContext=e,V(a.question),bt(),V(a.colon),bt()}function Y6(){return me(S._abstract)&&it()===a._new}function yA(){if(V6()){Db(Di.TSFunctionType);return}if(w(a._new)){Db(Di.TSConstructorType);return}else if(Y6()){Db(Di.TSAbstractConstructorType);return}W6()}function IA(){let e=Ee(1);bt(),V(a.greaterThan),Ie(e),Hs()}function TA(){if(D(a.jsxTagStart)){d.tokens[d.tokens.length-1].type=a.typeParameterStart;let e=Ee(1);for(;!w(a.greaterThan)&&!d.error;)bt(),D(a.comma);Fr(),Ie(e)}}function EA(){for(;!w(a.braceL)&&!d.error;)Q6(),D(a.comma)}function Q6(){Qc(),w(a.lessThan)&&Gs()}function eL(){pn(!1),Li(),D(a._extends)&&EA(),SA()}function tL(){pn(!1),Li(),V(a.eq),bt(),nt()}function rL(){if(w(a.string)?ji():we(),D(a.eq)){let e=d.tokens.length-1;Ot(),d.tokens[e].rhsEndIndex=d.tokens.length}}function Bb(){for(pn(!1),V(a.braceL);!D(a.braceR)&&!d.error;)rL(),D(a.comma)}function Zb(){V(a.braceL),Xs(a.braceR)}function Fb(){pn(!1),D(a.dot)?Fb():Zb()}function AA(){me(S._global)?we():w(a.string)?tn():$e(),w(a.braceL)?Zb():nt()}function Qp(){Vs(),V(a.eq),iL(),nt()}function nL(){return me(S._require)&&it()===a.parenL}function iL(){nL()?oL():Qc()}function oL(){gt(S._require),V(a.parenL),w(a.string)||$e(),ji(),V(a.parenR)}function sL(){if(Yr())return!1;switch(d.type){case a._function:{let e=Ee(1);q();let t=d.start;return Qn(t,!0),Ie(e),!0}case a._class:{let e=Ee(1);return ti(!0,!1),Ie(e),!0}case a._const:if(w(a._const)&&Bs(S._enum)){let e=Ee(1);return V(a._const),gt(S._enum),d.tokens[d.tokens.length-1].type=a._enum,Bb(),Ie(e),!0}case a._var:case a._let:{let e=Ee(1);return tl(d.type!==a._var),Ie(e),!0}case a.name:{let e=Ee(1),t=d.contextualKeyword,n=!1;return t===S._global?(AA(),n=!0):n=ef(t,!0),Ie(e),n}default:return!1}}function bA(){return ef(d.contextualKeyword,!0)}function aL(e){switch(e){case S._declare:{let t=d.tokens.length-1;if(sL())return d.tokens[t].type=a._declare,!0;break}case S._global:if(w(a.braceL))return Zb(),!0;break;default:return ef(e,!1)}return!1}function ef(e,t){switch(e){case S._abstract:if(Js(t)&&w(a._class))return d.tokens[d.tokens.length-1].type=a._abstract,ti(!0,!1),!0;break;case S._enum:if(Js(t)&&w(a.name))return d.tokens[d.tokens.length-1].type=a._enum,Bb(),!0;break;case S._interface:if(Js(t)&&w(a.name)){let n=Ee(t?2:1);return eL(),Ie(n),!0}break;case S._module:if(Js(t)){if(w(a.string)){let n=Ee(t?2:1);return AA(),Ie(n),!0}else if(w(a.name)){let n=Ee(t?2:1);return Fb(),Ie(n),!0}}break;case S._namespace:if(Js(t)&&w(a.name)){let n=Ee(t?2:1);return Fb(),Ie(n),!0}break;case S._type:if(Js(t)&&w(a.name)){let n=Ee(t?2:1);return tL(),Ie(n),!0}break;default:break}return!1}function Js(e){return e?(q(),!0):!Yr()}function cL(){let e=d.snapshot();return Yp(),ei(),G6(),V(a.arrow),d.error?(d.restoreFromSnapshot(e),!1):(yo(!0),!0)}function Wb(){d.type===a.bitShiftL&&(d.pos-=1,Se(a.lessThan)),Gs()}function Gs(){let e=Ee(0);for(V(a.lessThan);!w(a.greaterThan)&&!d.error;)bt(),D(a.comma);e?(V(a.greaterThan),Ie(e)):(Ie(e),Mp(),V(a.greaterThan),d.tokens[d.tokens.length-1].isType=!0)}function Vb(){if(w(a.name))switch(d.contextualKeyword){case S._abstract:case S._declare:case S._enum:case S._interface:case S._module:case S._namespace:case S._type:return!0;default:break}return!1}function PA(e,t){if(w(a.colon)&&Yc(a.colon),!w(a.braceL)&&Yr()){let n=d.tokens.length-1;for(;n>=0&&(d.tokens[n].start>=e||d.tokens[n].type===a._default||d.tokens[n].type===a._export);)d.tokens[n].isType=!0,n--;return}yo(!1,t)}function CA(e,t,n){if(!er()&&D(a.bang)){d.tokens[d.tokens.length-1].type=a.nonNullAssertion;return}if(w(a.lessThan)||w(a.bitShiftL)){let i=d.snapshot();if(!t&&Jb()&&cL())return;if(Wb(),!t&&D(a.parenL)?(d.tokens[d.tokens.length-1].subscriptStartIndex=e,fn()):w(a.backQuote)?tf():(d.type===a.greaterThan||d.type!==a.parenL&&d.type&a.IS_EXPRESSION_START&&!er())&&$e(),d.error)d.restoreFromSnapshot(i);else return}else!t&&w(a.questionDot)&&it()===a.lessThan&&(q(),d.tokens[e].isOptionalChainStart=!0,d.tokens[d.tokens.length-1].subscriptStartIndex=e,Gs(),V(a.parenL),fn());el(e,t,n)}function OA(){if(D(a._import))return me(S._type)&&it()!==a.eq&>(S._type),Qp(),!0;if(D(a.eq))return Ut(),nt(),!0;if(St(S._as))return gt(S._namespace),we(),nt(),!0;if(me(S._type)){let e=it();(e===a.braceL||e===a.star)&&q()}return!1}function UA(){if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-1].identifierRole=ge.ImportDeclaration;return}if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-1].identifierRole=ge.ImportDeclaration,d.tokens[d.tokens.length-2].isType=!0,d.tokens[d.tokens.length-1].isType=!0;return}if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-3].identifierRole=ge.ImportAccess,d.tokens[d.tokens.length-1].identifierRole=ge.ImportDeclaration;return}we(),d.tokens[d.tokens.length-3].identifierRole=ge.ImportAccess,d.tokens[d.tokens.length-1].identifierRole=ge.ImportDeclaration,d.tokens[d.tokens.length-4].isType=!0,d.tokens[d.tokens.length-3].isType=!0,d.tokens[d.tokens.length-2].isType=!0,d.tokens[d.tokens.length-1].isType=!0}function zA(){if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-1].identifierRole=ge.ExportAccess;return}if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-1].identifierRole=ge.ExportAccess,d.tokens[d.tokens.length-2].isType=!0,d.tokens[d.tokens.length-1].isType=!0;return}if(we(),w(a.comma)||w(a.braceR)){d.tokens[d.tokens.length-3].identifierRole=ge.ExportAccess;return}we(),d.tokens[d.tokens.length-3].identifierRole=ge.ExportAccess,d.tokens[d.tokens.length-4].isType=!0,d.tokens[d.tokens.length-3].isType=!0,d.tokens[d.tokens.length-2].isType=!0,d.tokens[d.tokens.length-1].isType=!0}function NA(){if(me(S._abstract)&&it()===a._class)return d.type=a._abstract,q(),ti(!0,!0),!0;if(me(S._interface)){let e=Ee(2);return ef(S._interface,!0),Ie(e),!0}return!1}function RA(){if(d.type===a._const){let e=Xn();if(e.type===a.name&&e.contextualKeyword===S._enum)return V(a._const),gt(S._enum),d.tokens[d.tokens.length-1].type=a._enum,Bb(),!0}return!1}function DA(e){let t=d.tokens.length;Gc([S._abstract,S._readonly,S._declare,S._static,S._override]);let n=d.tokens.length;if($A()){let r=e?t-1:t;for(let s=r;s<n;s++)d.tokens[s].isType=!0;return!0}return!1}function jA(e){aL(e)||nt()}function LA(){let e=St(S._declare);e&&(d.tokens[d.tokens.length-1].type=a._declare);let t=!1;if(w(a.name))if(e){let n=Ee(2);t=bA(),Ie(n)}else t=bA();if(!t)if(e){let n=Ee(2);xr(!0),Ie(n)}else xr(!0)}function FA(e){if(e&&(w(a.lessThan)||w(a.bitShiftL))&&Wb(),St(S._implements)){d.tokens[d.tokens.length-1].type=a._implements;let t=Ee(1);EA(),Ie(t)}}function MA(){Li()}function BA(){Li()}function ZA(){let e=Ee(0);er()||D(a.bang),_o(),Ie(e)}function WA(){w(a.colon)&&Ks()}function VA(e,t){return Ms?lL(e,t):uL(e,t)}function lL(e,t){if(!w(a.lessThan))return en(e,t);let n=d.snapshot(),i=en(e,t);if(d.error)d.restoreFromSnapshot(n);else return i;return d.type=a.typeParameterStart,Yp(),i=en(e,t),i||$e(),i}function uL(e,t){if(!w(a.lessThan))return en(e,t);let n=d.snapshot();Yp();let i=en(e,t);if(i||$e(),d.error)d.restoreFromSnapshot(n);else return i;return en(e,t)}function qA(){if(w(a.colon)){let e=d.snapshot();Yc(a.colon),ir()&&$e(),w(a.arrow)||$e(),d.error&&d.restoreFromSnapshot(e)}return D(a.arrow)}function hA(){let e=Ee(0);D(a.question),_o(),Ie(e)}function JA(){(w(a.lessThan)||w(a.bitShiftL))&&Wb(),Kb()}var Di,qs=z(()=>{"use strict";g();Wt();Qt();je();Dr();go();Hp();rl();Ni();qb();(function(e){e[e.TSFunctionType=0]="TSFunctionType";let n=1;e[e.TSConstructorType=n]="TSConstructorType";let i=n+1;e[e.TSAbstractConstructorType=i]="TSAbstractConstructorType"})(Di||(Di={}))});function dL(){let e=!1,t=!1;for(;;){if(d.pos>=ie.length){$e("Unterminated JSX contents");return}let n=ie.charCodeAt(d.pos);if(n===U.lessThan||n===U.leftCurlyBrace){if(d.pos===d.start){if(n===U.lessThan){d.pos++,Se(a.jsxTagStart);return}gb(n);return}e&&!t?Se(a.jsxEmptyText):Se(a.jsxText);return}n===U.lineFeed?e=!0:n!==U.space&&n!==U.carriageReturn&&n!==U.tab&&(t=!0),d.pos++}}function pL(e){for(d.pos++;;){if(d.pos>=ie.length){$e("Unterminated string constant");return}if(ie.charCodeAt(d.pos)===e){d.pos++;break}d.pos++}Se(a.string)}function fL(){let e;do{if(d.pos>ie.length){$e("Unexpectedly reached the end of input.");return}e=ie.charCodeAt(++d.pos)}while(br[e]||e===U.dash);Se(a.jsxName)}function Gb(){Fr()}function KA(e){if(Gb(),!D(a.colon)){d.tokens[d.tokens.length-1].identifierRole=e;return}Gb()}function GA(){let e=d.tokens.length;KA(ge.Access);let t=!1;for(;w(a.dot);)t=!0,Fr(),Gb();if(!t){let n=d.tokens[e],i=ie.charCodeAt(n.start);i>=U.lowercaseA&&i<=U.lowercaseZ&&(n.identifierRole=null)}}function hL(){switch(d.type){case a.braceL:q(),Ut(),Fr();return;case a.jsxTagStart:Hb(),Fr();return;case a.string:Fr();return;default:$e("JSX value should be either an expression or a quoted JSX text")}}function mL(){V(a.ellipsis),Ut()}function gL(e){if(w(a.jsxTagEnd))return!1;GA(),ze&&TA();let t=!1;for(;!w(a.slash)&&!w(a.jsxTagEnd)&&!d.error;){if(D(a.braceL)){t=!0,V(a.ellipsis),Ot(),Fr();continue}t&&d.end-d.start===3&&ie.charCodeAt(d.start)===U.lowercaseK&&ie.charCodeAt(d.start+1)===U.lowercaseE&&ie.charCodeAt(d.start+2)===U.lowercaseY&&(d.tokens[e].jsxRole=jr.KeyAfterPropSpread),KA(ge.ObjectKey),w(a.eq)&&(Fr(),hL())}let n=w(a.slash);return n&&Fr(),n}function _L(){w(a.jsxTagEnd)||GA()}function HA(){let e=d.tokens.length-1;d.tokens[e].jsxRole=jr.NoChildren;let t=0;if(!gL(e))for(Ys();;)switch(d.type){case a.jsxTagStart:if(Fr(),w(a.slash)){Fr(),_L(),d.tokens[e].jsxRole!==jr.KeyAfterPropSpread&&(t===1?d.tokens[e].jsxRole=jr.OneChild:t>1&&(d.tokens[e].jsxRole=jr.StaticChildren));return}t++,HA(),Ys();break;case a.jsxText:t++,Ys();break;case a.jsxEmptyText:Ys();break;case a.braceL:q(),w(a.ellipsis)?(mL(),Ys(),t+=2):(w(a.braceR)||(t++,Ut()),Ys());break;default:$e();return}}function Hb(){Fr(),HA()}function Fr(){d.tokens.push(new mo),mb(),d.start=d.pos;let e=ie.charCodeAt(d.pos);if(Yn[e])fL();else if(e===U.quotationMark||e===U.apostrophe)pL(e);else switch(++d.pos,e){case U.greaterThan:Se(a.jsxTagEnd);break;case U.lessThan:Se(a.jsxTagStart);break;case U.slash:Se(a.slash);break;case U.equalsTo:Se(a.eq);break;case U.leftCurlyBrace:Se(a.braceL);break;case U.dot:Se(a.dot);break;case U.colon:Se(a.colon);break;default:$e()}}function Ys(){d.tokens.push(new mo),d.start=d.pos,dL()}var qb=z(()=>{"use strict";g();Wt();je();Dr();go();Ni();Rr();Zs();qs()});function XA(e){if(w(a.question)){let t=it();if(t===a.colon||t===a.comma||t===a.parenR)return}Xb(e)}function YA(){Fp(a.question),w(a.colon)&&(ze?Ks():Le&&ri())}var QA=z(()=>{"use strict";g();Wt();je();Dr();go();Xc();qs()});function Ut(e=!1){if(Ot(e),w(a.comma))for(;D(a.comma);)Ot(e)}function Ot(e=!1,t=!1){return ze?VA(e,t):Le?cP(e,t):en(e,t)}function en(e,t){if(w(a._yield))return UL(),!1;(w(a.parenL)||w(a.name)||w(a._yield))&&(d.potentialArrowAt=d.start);let n=vL(e);return t&&nx(),d.type&a.IS_ASSIGN?(q(),Ot(e),!1):n}function vL(e){return bL(e)?!0:(yL(e),!1)}function yL(e){ze||Le?XA(e):Xb(e)}function Xb(e){D(a.question)&&(Ot(),V(a.colon),Ot(e))}function bL(e){let t=d.tokens.length;return Hs()?!0:(rf(t,-1,e),!1)}function rf(e,t,n){if(ze&&(a._in&a.PRECEDENCE_MASK)>t&&!er()&&(St(S._as)||St(S._satisfies))){let r=Ee(1);bt(),Ie(r),Mp(),rf(e,t,n);return}let i=d.type&a.PRECEDENCE_MASK;if(i>0&&(!n||!w(a._in))&&i>t){let r=d.type;q(),r===a.nullishCoalescing&&(d.tokens[d.tokens.length-1].nullishStartIndex=e);let s=d.tokens.length;Hs(),rf(s,r&a.IS_RIGHT_ASSOCIATIVE?i-1:i,n),r===a.nullishCoalescing&&(d.tokens[e].numNullishCoalesceStarts++,d.tokens[d.tokens.length-1].numNullishCoalesceEnds++),rf(e,t,n)}}function Hs(){if(ze&&!Ms&&D(a.lessThan))return IA(),!1;if(me(S._module)&&pb()===U.leftCurlyBrace&&!Dp())return zL(),!1;if(d.type&a.IS_PREFIX)return q(),Hs(),!1;if(Qb())return!0;for(;d.type&a.IS_POSTFIX&&!ir();)d.type===a.preIncDec&&(d.type=a.postIncDec),q();return!1}function Qb(){let e=d.tokens.length;return tn()?!0:(ex(e),d.tokens.length>e&&d.tokens[e].isOptionalChainStart&&(d.tokens[d.tokens.length-1].isOptionalChainEnd=!0),!1)}function ex(e,t=!1){Le?uP(e,t):tx(e,t)}function tx(e,t=!1){let n=new Yb(!1);do xL(e,t,n);while(!n.stop&&!d.error)}function xL(e,t,n){ze?CA(e,t,n):Le?iP(e,t,n):el(e,t,n)}function el(e,t,n){if(!t&&D(a.doubleColon))rx(),n.stop=!0,ex(e,t);else if(w(a.questionDot)){if(d.tokens[e].isOptionalChainStart=!0,t&&it()===a.parenL){n.stop=!0;return}q(),d.tokens[d.tokens.length-1].subscriptStartIndex=e,D(a.bracketL)?(Ut(),V(a.bracketR)):D(a.parenL)?fn():nf()}else if(D(a.dot))d.tokens[d.tokens.length-1].subscriptStartIndex=e,nf();else if(D(a.bracketL))d.tokens[d.tokens.length-1].subscriptStartIndex=e,Ut(),V(a.bracketR);else if(!t&&w(a.parenL))if(Jb()){let i=d.snapshot(),r=d.tokens.length;q(),d.tokens[d.tokens.length-1].subscriptStartIndex=e;let s=ho();d.tokens[d.tokens.length-1].contextId=s,fn(),d.tokens[d.tokens.length-1].contextId=s,wL()&&(d.restoreFromSnapshot(i),n.stop=!0,d.scopeDepth++,ei(),kL(r))}else{q(),d.tokens[d.tokens.length-1].subscriptStartIndex=e;let i=ho();d.tokens[d.tokens.length-1].contextId=i,fn(),d.tokens[d.tokens.length-1].contextId=i}else w(a.backQuote)?tf():n.stop=!0}function Jb(){return d.tokens[d.tokens.length-1].contextualKeyword===S._async&&!ir()}function fn(){let e=!0;for(;!D(a.parenR)&&!d.error;){if(e)e=!1;else if(V(a.comma),D(a.parenR))break;rP(!1)}}function wL(){return w(a.colon)||w(a.arrow)}function kL(e){ze?WA():Le&&aP(),V(a.arrow),Qs(e)}function rx(){let e=d.tokens.length;tn(),ex(e,!0)}function tn(){if(D(a.modulo))return we(),!1;if(w(a.jsxText)||w(a.jsxEmptyText))return ji(),!1;if(w(a.lessThan)&&Ms)return d.type=a.jsxTagStart,Hb(),q(),!1;let e=d.potentialArrowAt===d.start;switch(d.type){case a.slash:case a.assign:yE();case a._super:case a._this:case a.regexp:case a.num:case a.bigint:case a.decimal:case a.string:case a._null:case a._true:case a._false:return q(),!1;case a._import:return q(),w(a.dot)&&(d.tokens[d.tokens.length-1].type=a.name,q(),we()),!1;case a.name:{let t=d.tokens.length,n=d.start,i=d.contextualKeyword;return we(),i===S._await?(OL(),!1):i===S._async&&w(a._function)&&!ir()?(q(),Qn(n,!1),!1):e&&i===S._async&&!ir()&&w(a.name)?(d.scopeDepth++,pn(!1),V(a.arrow),Qs(t),!0):w(a._do)&&!ir()?(q(),ni(),!1):e&&!ir()&&w(a.arrow)?(d.scopeDepth++,Gp(!1),V(a.arrow),Qs(t),!0):(d.tokens[d.tokens.length-1].identifierRole=ge.Access,!1)}case a._do:return q(),ni(),!1;case a.parenL:return eP(e);case a.bracketL:return q(),tP(a.bracketR,!0),!1;case a.braceL:return Hc(!1,!1),!1;case a._function:return $L(),!1;case a.at:cf();case a._class:return ti(!1),!1;case a._new:return IL(),!1;case a.backQuote:return tf(),!1;case a.doubleColon:return q(),rx(),!1;case a.hash:{let t=pb();return Yn[t]||t===U.backslash?nf():q(),!1}default:return $e(),!1}}function nf(){D(a.hash),we()}function $L(){let e=d.start;we(),D(a.dot)&&we(),Qn(e,!1)}function ji(){q()}function nl(){V(a.parenL),Ut(),V(a.parenR)}function eP(e){let t=d.snapshot(),n=d.tokens.length;V(a.parenL);let i=!0;for(;!w(a.parenR)&&!d.error;){if(i)i=!1;else if(V(a.comma),w(a.parenR))break;if(w(a.ellipsis)){Rb(!1),nx();break}else Ot(!1,!0)}return V(a.parenR),e&&SL()&&of()?(d.restoreFromSnapshot(t),d.scopeDepth++,ei(),of(),Qs(n),d.error?(d.restoreFromSnapshot(t),eP(!1),!1):!0):!1}function SL(){return w(a.colon)||!ir()}function of(){return ze?qA():Le?lP():D(a.arrow)}function nx(){(ze||Le)&&YA()}function IL(){if(V(a._new),D(a.dot)){we();return}TL(),Le&&oP(),D(a.parenL)&&tP(a.parenR)}function TL(){rx(),D(a.questionDot)}function tf(){for(Un(),Un();!w(a.backQuote)&&!d.error;)V(a.dollarBraceL),Ut(),Un(),Un();q()}function Hc(e,t){let n=ho(),i=!0;for(q(),d.tokens[d.tokens.length-1].contextId=n;!D(a.braceR)&&!d.error;){if(i)i=!1;else if(V(a.comma),D(a.braceR))break;let r=!1;if(w(a.ellipsis)){let s=d.tokens.length;if(Nb(),e&&(d.tokens.length===s+2&&Gp(t),D(a.braceR)))break;continue}e||(r=D(a.star)),!e&&me(S._async)?(r&&$e(),we(),w(a.colon)||w(a.parenL)||w(a.braceR)||w(a.eq)||w(a.comma)||(w(a.star)&&(q(),r=!0),vo(n))):vo(n),CL(e,t,n)}d.tokens[d.tokens.length-1].contextId=n}function EL(e){return!e&&(w(a.string)||w(a.num)||w(a.bracketL)||w(a.name)||!!(d.type&a.IS_KEYWORD))}function AL(e,t){let n=d.start;return w(a.parenL)?(e&&$e(),sf(n,!1),!0):EL(e)?(vo(t),sf(n,!1),!0):!1}function PL(e,t){if(D(a.colon)){e?qc(t):Ot(!1);return}let n;e?d.scopeDepth===0?n=ge.ObjectShorthandTopLevelDeclaration:t?n=ge.ObjectShorthandBlockScopedDeclaration:n=ge.ObjectShorthandFunctionScopedDeclaration:n=ge.ObjectShorthand,d.tokens[d.tokens.length-1].identifierRole=n,qc(t,!0)}function CL(e,t,n){ze?MA():Le&&sP(),AL(e,n)||PL(e,t)}function vo(e){Le&&af(),D(a.bracketL)?(d.tokens[d.tokens.length-1].contextId=e,Ot(),V(a.bracketR),d.tokens[d.tokens.length-1].contextId=e):(w(a.num)||w(a.string)||w(a.bigint)||w(a.decimal)?tn():nf(),d.tokens[d.tokens.length-1].identifierRole=ge.ObjectKey,d.tokens[d.tokens.length-1].contextId=e)}function sf(e,t){let n=ho();d.scopeDepth++;let i=d.tokens.length;ei(t,n),ix(e,n);let s=d.tokens.length;d.scopes.push(new Tr(i,s,!0)),d.scopeDepth--}function Qs(e){yo(!0);let t=d.tokens.length;d.scopes.push(new Tr(e,t,!0)),d.scopeDepth--}function ix(e,t=0){ze?PA(e,t):Le?nP(t):yo(!1,t)}function yo(e,t=0){e&&!w(a.braceL)?Ot():ni(!0,t)}function tP(e,t=!1){let n=!0;for(;!D(e)&&!d.error;){if(n)n=!1;else if(V(a.comma),D(e))break;rP(t)}}function rP(e){e&&w(a.comma)||(w(a.ellipsis)?(Nb(),nx()):w(a.question)?q():Ot(!1,!0))}function we(){q(),d.tokens[d.tokens.length-1].type=a.name}function OL(){Hs()}function UL(){q(),!w(a.semi)&&!ir()&&(D(a.star),Ot())}function zL(){gt(S._module),V(a.braceL),Xs(a.braceR)}var Yb,go=z(()=>{"use strict";g();Xc();qb();QA();qs();Wt();Qt();Rp();je();Rr();Zs();Dr();Hp();rl();Ni();Yb=class{constructor(t){this.stop=t}}});function NL(e){return(e.type===a.name||!!(e.type&a.IS_KEYWORD))&&e.contextualKeyword!==S._from}function Rn(e){let t=Ee(0);V(e||a.colon),Ar(),Ie(t)}function dP(){V(a.modulo),gt(S._checks),D(a.parenL)&&(Ut(),V(a.parenR))}function ax(){let e=Ee(0);V(a.colon),w(a.modulo)?dP():(Ar(),w(a.modulo)&&dP()),Ie(e)}function RL(){q(),cx(!0)}function DL(){q(),we(),w(a.lessThan)&&rn(),V(a.parenL),sx(),V(a.parenR),ax(),nt()}function ox(){w(a._class)?RL():w(a._function)?DL():w(a._var)?jL():St(S._module)?D(a.dot)?ML():LL():me(S._type)?BL():me(S._opaque)?ZL():me(S._interface)?WL():w(a._export)?FL():$e()}function jL(){q(),_P(),nt()}function LL(){for(w(a.string)?tn():we(),V(a.braceL);!w(a.braceR)&&!d.error;)w(a._import)?(q(),mx()):$e();V(a.braceR)}function FL(){V(a._export),D(a._default)?w(a._function)||w(a._class)?ox():(Ar(),nt()):w(a._var)||w(a._function)||w(a._class)||me(S._opaque)?ox():w(a.star)||w(a.braceL)||me(S._interface)||me(S._type)||me(S._opaque)?hx():$e()}function ML(){gt(S._exports),ri(),nt()}function BL(){q(),ux()}function ZL(){q(),dx(!0)}function WL(){q(),cx()}function cx(e=!1){if(ff(),w(a.lessThan)&&rn(),D(a._extends))do lf();while(!e&&D(a.comma));if(me(S._mixins)){q();do lf();while(D(a.comma))}if(me(S._implements)){q();do lf();while(D(a.comma))}uf(e,!1,e)}function lf(){hP(!1),w(a.lessThan)&&bo()}function lx(){cx()}function ff(){we()}function ux(){ff(),w(a.lessThan)&&rn(),Rn(a.eq),nt()}function dx(e){gt(S._type),ff(),w(a.lessThan)&&rn(),w(a.colon)&&Rn(a.colon),e||Rn(a.eq),nt()}function VL(){af(),_P(),D(a.eq)&&Ar()}function rn(){let e=Ee(0);w(a.lessThan)||w(a.typeParameterStart)?q():$e();do VL(),w(a.greaterThan)||V(a.comma);while(!w(a.greaterThan)&&!d.error);V(a.greaterThan),Ie(e)}function bo(){let e=Ee(0);for(V(a.lessThan);!w(a.greaterThan)&&!d.error;)Ar(),w(a.greaterThan)||V(a.comma);V(a.greaterThan),Ie(e)}function qL(){if(gt(S._interface),D(a._extends))do lf();while(D(a.comma));uf(!1,!1,!1)}function px(){w(a.num)||w(a.string)?tn():we()}function JL(){it()===a.colon?(px(),Rn()):Ar(),V(a.bracketR),Rn()}function KL(){px(),V(a.bracketR),V(a.bracketR),w(a.lessThan)||w(a.parenL)?fx():(D(a.question),Rn())}function fx(){for(w(a.lessThan)&&rn(),V(a.parenL);!w(a.parenR)&&!w(a.ellipsis)&&!d.error;)df(),w(a.parenR)||V(a.comma);D(a.ellipsis)&&df(),V(a.parenR),Rn()}function GL(){fx()}function uf(e,t,n){let i;for(t&&w(a.braceBarL)?(V(a.braceBarL),i=a.braceBarR):(V(a.braceL),i=a.braceR);!w(i)&&!d.error;){if(n&&me(S._proto)){let r=it();r!==a.colon&&r!==a.question&&(q(),e=!1)}if(e&&me(S._static)){let r=it();r!==a.colon&&r!==a.question&&q()}if(af(),D(a.bracketL))D(a.bracketL)?KL():JL();else if(w(a.parenL)||w(a.lessThan))GL();else{if(me(S._get)||me(S._set)){let r=it();(r===a.name||r===a.string||r===a.num)&&q()}HL()}XL()}V(i)}function HL(){if(w(a.ellipsis)){if(V(a.ellipsis),D(a.comma)||D(a.semi),w(a.braceR))return;Ar()}else px(),w(a.lessThan)||w(a.parenL)?fx():(D(a.question),Rn())}function XL(){!D(a.semi)&&!D(a.comma)&&!w(a.braceR)&&!w(a.braceBarR)&&$e()}function hP(e){for(e||we();D(a.dot);)we()}function YL(){hP(!0),w(a.lessThan)&&bo()}function QL(){V(a._typeof),mP()}function eF(){for(V(a.bracketL);d.pos<ie.length&&!w(a.bracketR)&&(Ar(),!w(a.bracketR));)V(a.comma);V(a.bracketR)}function df(){let e=it();e===a.colon||e===a.question?(we(),D(a.question),Rn()):Ar()}function sx(){for(;!w(a.parenR)&&!w(a.ellipsis)&&!d.error;)df(),w(a.parenR)||V(a.comma);D(a.ellipsis)&&df()}function mP(){let e=!1,t=d.noAnonFunctionType;switch(d.type){case a.name:{if(me(S._interface)){qL();return}we(),YL();return}case a.braceL:uf(!1,!1,!1);return;case a.braceBarL:uf(!1,!0,!1);return;case a.bracketL:eF();return;case a.lessThan:rn(),V(a.parenL),sx(),V(a.parenR),V(a.arrow),Ar();return;case a.parenL:if(q(),!w(a.parenR)&&!w(a.ellipsis))if(w(a.name)){let n=it();e=n!==a.question&&n!==a.colon}else e=!0;if(e)if(d.noAnonFunctionType=!1,Ar(),d.noAnonFunctionType=t,d.noAnonFunctionType||!(w(a.comma)||w(a.parenR)&&it()===a.arrow)){V(a.parenR);return}else D(a.comma);sx(),V(a.parenR),V(a.arrow),Ar();return;case a.minus:q(),ji();return;case a.string:case a.num:case a._true:case a._false:case a._null:case a._this:case a._void:case a.star:q();return;default:if(d.type===a._typeof){QL();return}else if(d.type&a.IS_KEYWORD){q(),d.tokens[d.tokens.length-1].type=a.name;return}}$e()}function tF(){for(mP();!ir()&&(w(a.bracketL)||w(a.questionDot));)D(a.questionDot),V(a.bracketL),D(a.bracketR)||(Ar(),V(a.bracketR))}function gP(){D(a.question)?gP():tF()}function pP(){gP(),!d.noAnonFunctionType&&D(a.arrow)&&Ar()}function fP(){for(D(a.bitwiseAND),pP();D(a.bitwiseAND);)pP()}function rF(){for(D(a.bitwiseOR),fP();D(a.bitwiseOR);)fP()}function Ar(){rF()}function ri(){Rn()}function _P(){we(),w(a.colon)&&ri()}function af(){(w(a.plus)||w(a.minus))&&(q(),d.tokens[d.tokens.length-1].isType=!0)}function nP(e){w(a.colon)&&ax(),yo(!1,e)}function iP(e,t,n){if(w(a.questionDot)&&it()===a.lessThan){if(t){n.stop=!0;return}q(),bo(),V(a.parenL),fn();return}else if(!t&&w(a.lessThan)){let i=d.snapshot();if(bo(),V(a.parenL),fn(),d.error)d.restoreFromSnapshot(i);else return}el(e,t,n)}function oP(){if(w(a.lessThan)){let e=d.snapshot();bo(),d.error&&d.restoreFromSnapshot(e)}}function vP(){if(w(a.name)&&d.contextualKeyword===S._interface){let e=Ee(0);return q(),lx(),Ie(e),!0}else if(me(S._enum))return CP(),!0;return!1}function yP(){return me(S._enum)?(CP(),!0):!1}function bP(e){if(e===S._declare){if(w(a._class)||w(a.name)||w(a._function)||w(a._var)||w(a._export)){let t=Ee(1);ox(),Ie(t)}}else if(w(a.name)){if(e===S._interface){let t=Ee(1);lx(),Ie(t)}else if(e===S._type){let t=Ee(1);ux(),Ie(t)}else if(e===S._opaque){let t=Ee(1);dx(!1),Ie(t)}}nt()}function xP(){return me(S._type)||me(S._interface)||me(S._opaque)||me(S._enum)}function wP(){return w(a.name)&&(d.contextualKeyword===S._type||d.contextualKeyword===S._interface||d.contextualKeyword===S._opaque||d.contextualKeyword===S._enum)}function kP(){if(me(S._type)){let e=Ee(1);q(),w(a.braceL)?(hf(),ea()):ux(),Ie(e)}else if(me(S._opaque)){let e=Ee(1);q(),dx(!1),Ie(e)}else if(me(S._interface)){let e=Ee(1);q(),lx(),Ie(e)}else xr(!0)}function $P(){return w(a.star)||me(S._type)&&it()===a.star}function SP(){if(St(S._type)){let e=Ee(2);pf(),Ie(e)}else pf()}function IP(e){if(e&&w(a.lessThan)&&bo(),me(S._implements)){let t=Ee(0);q(),d.tokens[d.tokens.length-1].type=a._implements;do ff(),w(a.lessThan)&&bo();while(D(a.comma));Ie(t)}}function sP(){w(a.lessThan)&&(rn(),w(a.parenL)||$e())}function mA(){let e=Ee(0);D(a.question),w(a.colon)&&ri(),Ie(e)}function TP(){if(w(a._typeof)||me(S._type)){let e=Xn();(NL(e)||e.type===a.braceL||e.type===a.star)&&q()}}function EP(){let e=d.contextualKeyword===S._type||d.type===a._typeof;e?q():we(),me(S._as)&&!Bs(S._as)?(we(),e&&!w(a.name)&&!(d.type&a.IS_KEYWORD)||we()):(e&&(w(a.name)||d.type&a.IS_KEYWORD)&&we(),St(S._as)&&we())}function AP(){if(w(a.lessThan)){let e=Ee(0);rn(),Ie(e)}}function PP(){w(a.colon)&&ri()}function aP(){if(w(a.colon)){let e=d.noAnonFunctionType;d.noAnonFunctionType=!0,ri(),d.noAnonFunctionType=e}}function cP(e,t){if(w(a.lessThan)){let n=d.snapshot(),i=en(e,t);if(d.error)d.restoreFromSnapshot(n),d.type=a.typeParameterStart;else return i;let r=Ee(0);if(rn(),Ie(r),i=en(e,t),i)return!0;$e()}return en(e,t)}function lP(){if(w(a.colon)){let e=Ee(0),t=d.snapshot(),n=d.noAnonFunctionType;d.noAnonFunctionType=!0,ax(),d.noAnonFunctionType=n,ir()&&$e(),w(a.arrow)||$e(),d.error&&d.restoreFromSnapshot(t),Ie(e)}return D(a.arrow)}function uP(e,t=!1){if(d.tokens[d.tokens.length-1].contextualKeyword===S._async&&w(a.lessThan)){let n=d.snapshot();if(nF()&&!d.error)return;d.restoreFromSnapshot(n)}tx(e,t)}function nF(){d.scopeDepth++;let e=d.tokens.length;return ei(),of()?(Qs(e),!0):!1}function CP(){gt(S._enum),d.tokens[d.tokens.length-1].type=a._enum,we(),iF()}function iF(){St(S._of)&&q(),V(a.braceL),oF(),V(a.braceR)}function oF(){for(;!w(a.braceR)&&!d.error&&!D(a.ellipsis);)sF(),w(a.braceR)||V(a.comma)}function sF(){we(),D(a.eq)&&q()}var Xc=z(()=>{"use strict";g();Wt();Qt();je();Dr();go();rl();Ni()});function NP(){if(Xs(a.eof),d.scopes.push(new Tr(0,d.tokens.length,!0)),d.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${d.scopeDepth}`);return new gf(d.tokens,d.scopes)}function xr(e){Le&&vP()||(w(a.at)&&cf(),aF(e))}function aF(e){if(ze&&RA())return;let t=d.type;switch(t){case a._break:case a._continue:lF();return;case a._debugger:uF();return;case a._do:dF();return;case a._for:pF();return;case a._function:if(it()===a.dot)break;e||$e(),mF();return;case a._class:e||$e(),ti(!0);return;case a._if:gF();return;case a._return:_F();return;case a._switch:vF();return;case a._throw:yF();return;case a._try:xF();return;case a._let:case a._const:e||$e();case a._var:tl(t!==a._var);return;case a._while:wF();return;case a.braceL:ni();return;case a.semi:kF();return;case a._export:case a._import:{let r=it();if(r===a.parenL||r===a.dot)break;q(),t===a._import?mx():hx();return}case a.name:if(d.contextualKeyword===S._async){let r=d.start,s=d.snapshot();if(q(),w(a._function)&&!ir()){V(a._function),Qn(r,!0);return}else d.restoreFromSnapshot(s)}else if(d.contextualKeyword===S._using&&!Dp()&&it()===a.name){tl(!0);return}else if(RP()){gt(S._await),tl(!0);return}default:break}let n=d.tokens.length;Ut();let i=null;if(d.tokens.length===n+1){let r=d.tokens[d.tokens.length-1];r.type===a.name&&(i=r.contextualKeyword)}if(i==null){nt();return}D(a.colon)?$F():SF(i)}function RP(){if(!me(S._await))return!1;let e=d.snapshot();return q(),!me(S._using)||er()?(d.restoreFromSnapshot(e),!1):(q(),!w(a.name)||er()?(d.restoreFromSnapshot(e),!1):(d.restoreFromSnapshot(e),!0))}function cf(){for(;w(a.at);)DP()}function DP(){if(q(),D(a.parenL))Ut(),V(a.parenR);else{for(we();D(a.dot);)we();cF()}}function cF(){ze?JA():Kb()}function Kb(){D(a.parenL)&&fn()}function lF(){q(),Yr()||(we(),nt())}function uF(){q(),nt()}function dF(){q(),xr(!1),V(a._while),nl(),D(a.semi)}function pF(){d.scopeDepth++;let e=d.tokens.length;hF();let t=d.tokens.length;d.scopes.push(new Tr(e,t,!1)),d.scopeDepth--}function fF(){return!(!me(S._using)||Bs(S._of))}function hF(){q();let e=!1;if(me(S._await)&&(e=!0,q()),V(a.parenL),w(a.semi)){e&&$e(),gx();return}let t=RP();if(t||w(a._var)||w(a._let)||w(a._const)||fF()){if(t&>(S._await),q(),jP(!0,d.type!==a._var),w(a._in)||me(S._of)){OP(e);return}gx();return}if(Ut(!0),w(a._in)||me(S._of)){OP(e);return}e&&$e(),gx()}function mF(){let e=d.start;q(),Qn(e,!0)}function gF(){q(),nl(),xr(!1),D(a._else)&&xr(!1)}function _F(){q(),Yr()||(Ut(),nt())}function vF(){q(),nl(),d.scopeDepth++;let e=d.tokens.length;for(V(a.braceL);!w(a.braceR)&&!d.error;)if(w(a._case)||w(a._default)){let n=w(a._case);q(),n&&Ut(),V(a.colon)}else xr(!0);q();let t=d.tokens.length;d.scopes.push(new Tr(e,t,!1)),d.scopeDepth--}function yF(){q(),Ut(),nt()}function bF(){Jc(!0),ze&&_o()}function xF(){if(q(),ni(),w(a._catch)){q();let e=null;if(w(a.parenL)&&(d.scopeDepth++,e=d.tokens.length,V(a.parenL),bF(),V(a.parenR)),ni(),e!=null){let t=d.tokens.length;d.scopes.push(new Tr(e,t,!1)),d.scopeDepth--}}D(a._finally)&&ni()}function tl(e){q(),jP(!1,e),nt()}function wF(){q(),nl(),xr(!1)}function kF(){q()}function $F(){xr(!0)}function SF(e){ze?jA(e):Le?bP(e):nt()}function ni(e=!1,t=0){let n=d.tokens.length;d.scopeDepth++,V(a.braceL),t&&(d.tokens[d.tokens.length-1].contextId=t),Xs(a.braceR),t&&(d.tokens[d.tokens.length-1].contextId=t);let i=d.tokens.length;d.scopes.push(new Tr(n,i,e)),d.scopeDepth--}function Xs(e){for(;!D(e)&&!d.error;)xr(!0)}function gx(){V(a.semi),w(a.semi)||Ut(),V(a.semi),w(a.parenR)||Ut(),V(a.parenR),xr(!1)}function OP(e){e?St(S._of):q(),Ut(),V(a.parenR),xr(!1)}function jP(e,t){for(;;){if(IF(t),D(a.eq)){let n=d.tokens.length-1;Ot(e),d.tokens[n].rhsEndIndex=d.tokens.length}if(!D(a.comma))break}}function IF(e){Jc(e),ze?ZA():Le&&PP()}function Qn(e,t,n=!1){w(a.star)&&q(),t&&!n&&!w(a.name)&&!w(a._yield)&&$e();let i=null;w(a.name)&&(t||(i=d.tokens.length,d.scopeDepth++),pn(!1));let r=d.tokens.length;d.scopeDepth++,ei(),ix(e);let s=d.tokens.length;d.scopes.push(new Tr(r,s,!0)),d.scopeDepth--,i!==null&&(d.scopes.push(new Tr(i,s,!0)),d.scopeDepth--)}function ei(e=!1,t=0){ze?BA():Le&&AP(),V(a.parenL),t&&(d.tokens[d.tokens.length-1].contextId=t),Kc(a.parenR,!1,!1,e,t),t&&(d.tokens[d.tokens.length-1].contextId=t)}function ti(e,t=!1){let n=ho();q(),d.tokens[d.tokens.length-1].contextId=n,d.tokens[d.tokens.length-1].isExpression=!e;let i=null;e||(i=d.tokens.length,d.scopeDepth++),PF(e,t),CF();let r=d.tokens.length;if(TF(n),!d.error&&(d.tokens[r].contextId=n,d.tokens[d.tokens.length-1].contextId=n,i!==null)){let s=d.tokens.length;d.scopes.push(new Tr(i,s,!1)),d.scopeDepth--}}function LP(){return w(a.eq)||w(a.semi)||w(a.braceR)||w(a.bang)||w(a.colon)}function FP(){return w(a.parenL)||w(a.lessThan)}function TF(e){for(V(a.braceL);!D(a.braceR)&&!d.error;){if(D(a.semi))continue;if(w(a.at)){DP();continue}let t=d.start;EF(t,e)}}function EF(e,t){ze&&Gc([S._declare,S._public,S._protected,S._private,S._override]);let n=!1;if(w(a.name)&&d.contextualKeyword===S._static){if(we(),FP()){ol(e,!1);return}else if(LP()){mf();return}if(d.tokens[d.tokens.length-1].type=a._static,n=!0,w(a.braceL)){d.tokens[d.tokens.length-1].contextId=t,ni();return}}AF(e,n,t)}function AF(e,t,n){if(ze&&DA(t))return;if(D(a.star)){il(n),ol(e,!1);return}il(n);let i=!1,r=d.tokens[d.tokens.length-1];r.contextualKeyword===S._constructor&&(i=!0),UP(),FP()?ol(e,i):LP()?mf():r.contextualKeyword===S._async&&!Yr()?(d.tokens[d.tokens.length-1].type=a._async,w(a.star)&&q(),il(n),UP(),ol(e,!1)):(r.contextualKeyword===S._get||r.contextualKeyword===S._set)&&!(Yr()&&w(a.star))?(r.contextualKeyword===S._get?d.tokens[d.tokens.length-1].type=a._get:d.tokens[d.tokens.length-1].type=a._set,il(n),ol(e,!1)):r.contextualKeyword===S._accessor&&!Yr()?(il(n),mf()):Yr()?mf():$e()}function ol(e,t){ze?Li():Le&&w(a.lessThan)&&rn(),sf(e,t)}function il(e){vo(e)}function UP(){if(ze){let e=Ee(0);D(a.question),Ie(e)}}function mf(){if(ze?(Fp(a.bang),_o()):Le&&w(a.colon)&&ri(),w(a.eq)){let e=d.tokens.length;q(),Ot(),d.tokens[e].rhsEndIndex=d.tokens.length}nt()}function PF(e,t=!1){ze&&(!e||t)&&me(S._implements)||(w(a.name)&&pn(!0),ze?Li():Le&&w(a.lessThan)&&rn())}function CF(){let e=!1;D(a._extends)?(Qb(),e=!0):e=!1,ze?FA(e):Le&&IP(e)}function hx(){let e=d.tokens.length-1;ze&&OA()||(NF()?RF():zF()?(we(),w(a.comma)&&it()===a.star?(V(a.comma),V(a.star),gt(S._as),we()):MP(),ea()):D(a._default)?OF():jF()?UF():(hf(),ea()),d.tokens[e].rhsEndIndex=d.tokens.length)}function OF(){if(ze&&NA()||Le&&yP())return;let e=d.start;D(a._function)?Qn(e,!0,!0):me(S._async)&&it()===a._function?(St(S._async),D(a._function),Qn(e,!0,!0)):w(a._class)?ti(!0,!0):w(a.at)?(cf(),ti(!0,!0)):(Ot(),nt())}function UF(){ze?LA():Le?kP():xr(!0)}function zF(){if(ze&&Vb())return!1;if(Le&&wP())return!1;if(w(a.name))return d.contextualKeyword!==S._async;if(!w(a._default))return!1;let e=jc(),t=Xn(),n=t.type===a.name&&t.contextualKeyword===S._from;if(t.type===a.comma)return!0;if(n){let i=ie.charCodeAt(db(e+4));return i===U.quotationMark||i===U.apostrophe}return!1}function MP(){D(a.comma)&&hf()}function ea(){St(S._from)&&(tn(),BP()),nt()}function NF(){return Le?$P():w(a.star)}function RF(){Le?SP():pf()}function pf(){V(a.star),me(S._as)?DF():ea()}function DF(){q(),d.tokens[d.tokens.length-1].type=a._as,we(),MP(),ea()}function jF(){return ze&&Vb()||Le&&xP()||d.type===a._var||d.type===a._const||d.type===a._let||d.type===a._function||d.type===a._class||me(S._async)||w(a.at)}function hf(){let e=!0;for(V(a.braceL);!D(a.braceR)&&!d.error;){if(e)e=!1;else if(V(a.comma),D(a.braceR))break;LF()}}function LF(){if(ze){zA();return}we(),d.tokens[d.tokens.length-1].identifierRole=ge.ExportAccess,St(S._as)&&we()}function FF(){let e=d.snapshot();return gt(S._module),St(S._from)?me(S._from)?(d.restoreFromSnapshot(e),!0):(d.restoreFromSnapshot(e),!1):w(a.comma)?(d.restoreFromSnapshot(e),!1):(d.restoreFromSnapshot(e),!0)}function MF(){me(S._module)&&FF()&&q()}function mx(){if(ze&&w(a.name)&&it()===a.eq){Qp();return}if(ze&&me(S._type)){let e=Xn();if(e.type===a.name&&e.contextualKeyword!==S._from){if(gt(S._type),it()===a.eq){Qp();return}}else(e.type===a.star||e.type===a.braceL)&>(S._type)}w(a.string)?tn():(MF(),ZF(),gt(S._from),tn()),BP(),nt()}function BF(){return w(a.name)}function zP(){Vs()}function ZF(){Le&&TP();let e=!0;if(!(BF()&&(zP(),!D(a.comma)))){if(w(a.star)){q(),gt(S._as),zP();return}for(V(a.braceL);!D(a.braceR)&&!d.error;){if(e)e=!1;else if(D(a.colon)&&$e("ES2015 named imports do not destructure. Use another statement for destructuring after the import."),V(a.comma),D(a.braceR))break;WF()}}}function WF(){if(ze){UA();return}if(Le){EP();return}Vs(),me(S._as)&&(d.tokens[d.tokens.length-1].identifierRole=ge.ImportAccess,q(),Vs())}function BP(){(w(a._with)||me(S._assert)&&!er())&&(q(),Hc(!1,!1))}var rl=z(()=>{"use strict";g();_x();Xc();qs();Wt();Qt();Rp();je();Rr();Dr();go();Hp();Ni()});function ZP(){return d.pos===0&&ie.charCodeAt(0)===U.numberSign&&ie.charCodeAt(1)===U.exclamationMark&&hb(2),fb(),NP()}var WP=z(()=>{"use strict";g();Wt();Rr();Dr();rl()});function VP(e,t,n,i){if(i&&n)throw new Error("Cannot combine flow and typescript plugins.");pE(e,t,n,i);let r=ZP();if(d.error)throw dE(d.error);return r}var gf,_x=z(()=>{"use strict";g();Dr();WP();gf=class{constructor(t,n){this.tokens=t,this.scopes=n}}});function vx(e){let t=e.currentIndex(),n=0,i=e.currentToken();do{let r=e.tokens[t];if(r.isOptionalChainStart&&n++,r.isOptionalChainEnd&&n--,n+=r.numNullishCoalesceStarts,n-=r.numNullishCoalesceEnds,r.contextualKeyword===S._await&&r.identifierRole==null&&r.scopeDepth===i.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var qP=z(()=>{"use strict";g();Qt()});var sl,JP=z(()=>{"use strict";g();je();qP();sl=class e{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,i,r,s){this.code=t,this.tokens=n,this.isFlowEnabled=i,this.disableESTransforms=r,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(t){this.resultCode=t.resultCode,this.tokenIndex=t.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(t){let n=this.resultCode.slice(t.resultCode.length);return this.resultCode=t.resultCode,n}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(t,n){return this.matches1AtIndex(t,a.name)&&this.tokens[t].contextualKeyword===n}identifierNameAtIndex(t){return this.identifierNameForToken(this.tokens[t])}identifierNameAtRelativeIndex(t){return this.identifierNameForToken(this.tokenAtRelativeIndex(t))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(t){return this.code.slice(t.start,t.end)}rawCodeForToken(t){return this.code.slice(t.start,t.end)}stringValueAtIndex(t){return this.stringValueForToken(this.tokens[t])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(t){return this.code.slice(t.start+1,t.end-1)}matches1AtIndex(t,n){return this.tokens[t].type===n}matches2AtIndex(t,n,i){return this.tokens[t].type===n&&this.tokens[t+1].type===i}matches3AtIndex(t,n,i,r){return this.tokens[t].type===n&&this.tokens[t+1].type===i&&this.tokens[t+2].type===r}matches1(t){return this.tokens[this.tokenIndex].type===t}matches2(t,n){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===n}matches3(t,n,i){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===i}matches4(t,n,i,r){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===i&&this.tokens[this.tokenIndex+3].type===r}matches5(t,n,i,r,s){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===n&&this.tokens[this.tokenIndex+2].type===i&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===s}matchesContextual(t){return this.matchesContextualAtIndex(this.tokenIndex,t)}matchesContextIdAndLabel(t,n){return this.matches1(t)&&this.currentToken().contextId===n}previousWhitespaceAndComments(){let t=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(t=t.replace(/@flow/g,"")),t}replaceToken(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(t){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\r\n]/g,""),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=t,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken("")}removeToken(){this.replaceTokenTrimmingLeftWhitespace("")}removeBalancedCode(){let t=0;for(;!this.isAtEnd();){if(this.matches1(a.braceL))t++;else if(this.matches1(a.braceR)){if(t===0)return;t--}this.removeToken()}}copyExpectedToken(t){if(this.tokens[this.tokenIndex].type!==t)throw new Error(`Expected token ${t}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(t){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=t,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let t=this.currentToken();if((t.numNullishCoalesceStarts||t.isOptionalChainStart)&&(t.isAsyncOperation=vx(this)),!this.disableESTransforms){if(t.numNullishCoalesceStarts)for(let n=0;n<t.numNullishCoalesceStarts;n++)t.isAsyncOperation?(this.resultCode+="await ",this.resultCode+=this.helperManager.getHelperName("asyncNullishCoalesce")):this.resultCode+=this.helperManager.getHelperName("nullishCoalesce"),this.resultCode+="(";t.isOptionalChainStart&&(t.isAsyncOperation&&(this.resultCode+="await "),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===a._delete?t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){let t=this.currentToken();if(t.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),t.numNullishCoalesceEnds&&!this.disableESTransforms)for(let n=0;n<t.numNullishCoalesceEnds;n++)this.resultCode+="))"}appendCode(t){this.resultCode+=t}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let t=this.currentToken();return this.code.slice(t.start,t.end)}tokenAtRelativeIndex(t){return this.tokens[this.tokenIndex+t]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw new Error("Unexpectedly reached end of input.");this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw new Error("Tried to finish processing tokens before reaching the end.");return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}}});function bx(e,t,n,i){let r=t.snapshot(),s=VF(t),c=[],u=[],p=[],f=null,v=[],y=[],k=t.currentToken().contextId;if(k==null)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(a.braceR,k);)if(t.matchesContextual(S._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:c,constructorInsertPos:f}=KP(t));else if(t.matches1(a.semi))i||y.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let I=t.currentIndex(),$=!1,O=!1,F=!1;for(;_f(t.currentToken());)t.matches1(a._static)&&($=!0),t.matches1(a.hash)&&(O=!0),(t.matches1(a._declare)||t.matches1(a._abstract))&&(F=!0),t.nextToken();if($&&t.matches1(a.braceL)){yx(t,k);continue}if(O){yx(t,k);continue}if(t.matchesContextual(S._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:c,constructorInsertPos:f}=KP(t));continue}let Z=t.currentIndex();if(qF(t),t.matches1(a.lessThan)||t.matches1(a.parenL)){yx(t,k);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(a.eq)){let M=t.currentIndex(),H=t.currentToken().rhsEndIndex;if(H==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex()<H;)e.processToken();let W;$?(W=n.claimFreeName("__initStatic"),p.push(W)):(W=n.claimFreeName("__init"),u.push(W)),v.push({initializerName:W,equalsIndex:M,start:Z,end:t.currentIndex()})}else(!i||F)&&y.push({start:I,end:t.currentIndex()})}return t.restoreToSnapshot(r),i?{headerInfo:s,constructorInitializerStatements:c,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:f,fields:[],rangesToRemove:y}:{headerInfo:s,constructorInitializerStatements:c,instanceInitializerNames:u,staticInitializerNames:p,constructorInsertPos:f,fields:v,rangesToRemove:y}}function yx(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;_f(e.tokenAtRelativeIndex(-1));)e.previousToken()}function VF(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw new Error("Expected context ID on class token.");let i=t.isExpression;if(i==null)throw new Error("Expected isExpression on class token.");let r=null,s=!1;for(e.nextToken(),e.matches1(a.name)&&(r=e.identifierName());!e.matchesContextIdAndLabel(a.braceL,n);)e.matches1(a._extends)&&!e.currentToken().isType&&(s=!0),e.nextToken();return{isExpression:i,className:r,hasSuperclass:s}}function KP(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw new Error("Expected context ID on open-paren starting constructor params.");for(;!e.matchesContextIdAndLabel(a.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),_f(e.currentToken())){for(e.nextToken();_f(e.currentToken());)e.nextToken();let s=e.currentToken();if(s.type!==a.name)throw new Error("Expected identifier after access modifiers in constructor arg.");let c=e.identifierNameForToken(s);t.push(`this.${c} = ${c}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let i=e.currentIndex(),r=!1;for(;!e.matchesContextIdAndLabel(a.braceR,n);){if(!r&&e.matches2(a._super,a.parenL)){e.nextToken();let s=e.currentToken().contextId;if(s==null)throw new Error("Expected a context ID on the super call");for(;!e.matchesContextIdAndLabel(a.parenR,s);)e.nextToken();i=e.currentIndex(),r=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:i}}function _f(e){return[a._async,a._get,a._set,a.plus,a.minus,a._readonly,a._static,a._public,a._private,a._protected,a._override,a._abstract,a.star,a._declare,a.hash].includes(e.type)}function qF(e){if(e.matches1(a.bracketL)){let n=e.currentToken().contextId;if(n==null)throw new Error("Expected class context ID on computed name open bracket.");for(;!e.matchesContextIdAndLabel(a.bracketR,n);)e.nextToken();e.nextToken()}else e.nextToken()}var GP=z(()=>{"use strict";g();Qt();je()});function al(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(a.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(a.dot);)e.removeToken(),e.removeToken()}var xx=z(()=>{"use strict";g();je()});function cl(e){let t=new Set,n=new Set;for(let i=0;i<e.tokens.length;i++){let r=e.tokens[i];r.type===a.name&&Lp(r)&&(r.isType?t.add(e.identifierNameForToken(r)):n.add(e.identifierNameForToken(r)))}return{typeDeclarations:t,valueDeclarations:n}}var vf,wx=z(()=>{"use strict";g();Wt();je();vf={typeDeclarations:new Set,valueDeclarations:new Set}});function ll(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,a.braceR);)t++;return e.matchesContextualAtIndex(t+1,S._from)&&e.matches1AtIndex(t+2,a.string)}var kx=z(()=>{"use strict";g();Qt();je()});function ii(e){(e.matches2(a._with,a.braceL)||e.matches2(a.name,a.braceL)&&e.matchesContextual(S._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}var $x=z(()=>{"use strict";g();Qt();je()});function ul(e,t,n,i){if(!e||t)return!1;let r=n.currentToken();if(r.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");let s=r.rhsEndIndex-n.currentIndex();if(s!==3&&!(s===4&&n.matches1AtIndex(r.rhsEndIndex-1,a.semi)))return!1;let c=n.tokenAtRelativeIndex(2);if(c.type!==a.name)return!1;let u=n.identifierNameForToken(c);return i.typeDeclarations.has(u)&&!i.valueDeclarations.has(u)}var Sx=z(()=>{"use strict";g();je()});var dl,HP=z(()=>{"use strict";g();Wt();Qt();je();xx();wx();Lc();kx();$x();Sx();Qr();dl=class e extends yt{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,i,r,s,c,u,p,f,v,y,k){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=i,this.nameManager=r,this.helperManager=s,this.reactHotLoaderTransformer=c,this.enableLegacyBabel5ModuleInterop=u,this.enableLegacyTypeScriptModuleInterop=p,this.isTypeScriptTransformEnabled=f,this.isFlowTransformEnabled=v,this.preserveDynamicImport=y,this.keepUnusedImports=k,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=f?cl(n):vf}getPrefixCode(){let t="";return this.hadExport&&(t+='Object.defineProperty(exports, "__esModule", {value: true});'),t}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
|
|
298
|
-
module.exports = exports.default;
|
|
299
|
-
`:""}process(){return this.tokens.matches3(a._import,a.name,a.eq)?this.processImportEquals():this.tokens.matches1(a._import)?(this.processImport(),!0):this.tokens.matches2(a._export,a.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(a._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(a.name,a.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(a.name)||this.tokens.matches1(a.jsxName)?this.processIdentifier():this.tokens.matches1(a.eq)?this.processAssignment():this.tokens.matches1(a.assign)?this.processComplexAssignment():this.tokens.matches1(a.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(t)?al(this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(a._import,a.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let n=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${n}require`);let i=this.tokens.currentToken().contextId;if(i==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(a.parenR,i);)this.rootTransformer.processToken();this.tokens.replaceToken(n?")))":"))");return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let n=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(n)),this.tokens.appendCode(this.importProcessor.claimImportCode(n))}ii(this.tokens),this.tokens.matches1(a.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(S._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,a.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,S._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(a.name)||this.tokens.matches1(a.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(a.string))return!1;let t=!1,n=!1;for(;!this.tokens.matches1(a.string);)(!t&&this.tokens.matches1(a.braceL)||this.tokens.matches1(a.comma))&&(this.tokens.removeToken(),this.tokens.matches1(a.braceR)||(n=!0),(this.tokens.matches2(a.name,a.comma)||this.tokens.matches2(a.name,a.braceR)||this.tokens.matches4(a.name,a.name,a.name,a.comma)||this.tokens.matches4(a.name,a.name,a.name,a.braceR))&&(t=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?n&&!t:!1}removeRemainingImport(){for(;!this.tokens.matches1(a.string);)this.tokens.removeToken()}processIdentifier(){let t=this.tokens.currentToken();if(t.shadowsGlobal)return!1;if(t.identifierRole===ge.ObjectShorthand)return this.processObjectShorthand();if(t.identifierRole!==ge.Access)return!1;let n=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(t));if(!n)return!1;let i=this.tokens.currentIndex()+1;for(;i<this.tokens.tokens.length&&this.tokens.tokens[i].type===a.parenR;)i++;return this.tokens.tokens[i].type===a.parenL?this.tokens.tokenAtRelativeIndex(1).type===a.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==a._new?(this.tokens.replaceToken(`${n}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR)):this.tokens.replaceToken(`(0, ${n})`):this.tokens.replaceToken(n),!0}processObjectShorthand(){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);return n?(this.tokens.replaceToken(`${t}: ${n}`),!0):!1}processExport(){if(this.tokens.matches2(a._export,a._enum)||this.tokens.matches3(a._export,a._const,a._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(a._export,a._default))return this.tokens.matches3(a._export,a._default,a._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(a._export,a.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(a._export,a.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,S._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(a.braceL)){for(;!this.tokens.matches1(a.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(a._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(S._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,a.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),ii(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(a._export,a._var)||this.tokens.matches2(a._export,a._let)||this.tokens.matches2(a._export,a._const))return this.processExportVar(),!0;if(this.tokens.matches2(a._export,a._function)||this.tokens.matches3(a._export,a.name,a._function))return this.processExportFunction(),!0;if(this.tokens.matches2(a._export,a._class)||this.tokens.matches3(a._export,a._abstract,a._class)||this.tokens.matches2(a._export,a.at))return this.processExportClass(),!0;if(this.tokens.matches2(a._export,a.star))return this.processExportStar(),!0;throw new Error("Unrecognized export syntax.")}processAssignment(){let t=this.tokens.currentIndex(),n=this.tokens.tokens[t-1];if(n.isType||n.type!==a.name||n.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,a.dot)||t>=2&&[a._var,a._let,a._const].includes(this.tokens.tokens[t-2].type))return!1;let i=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(n));return i?(this.tokens.copyToken(),this.tokens.appendCode(` ${i} =`),!0):!1}processComplexAssignment(){let t=this.tokens.currentIndex(),n=this.tokens.tokens[t-1];if(n.type!==a.name||n.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,a.dot))return!1;let i=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(n));return i?(this.tokens.appendCode(` = ${i}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let t=this.tokens.currentIndex(),n=this.tokens.tokens[t+1];if(n.type!==a.name||n.shadowsGlobal||t+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(t+2,a.dot)||this.tokens.matches1AtIndex(t+2,a.bracketL)||this.tokens.matches1AtIndex(t+2,a.parenL)))return!1;let i=this.tokens.identifierNameForToken(n),r=this.importProcessor.resolveExportBinding(i);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let t=this.tokens.currentIndex(),n=this.tokens.tokens[t],i=this.tokens.tokens[t+1];if(n.type!==a.name||n.shadowsGlobal||t>=1&&this.tokens.matches1AtIndex(t-1,a.dot))return!1;let r=this.tokens.identifierNameForToken(n),s=this.importProcessor.resolveExportBinding(r);if(!s)return!1;let c=this.tokens.rawCodeForToken(i),u=this.importProcessor.getIdentifierReplacement(r)||r;if(c==="++")this.tokens.replaceToken(`(${u} = ${s} = ${u} + 1, ${u} - 1)`);else if(c==="--")this.tokens.replaceToken(`(${u} = ${s} = ${u} - 1, ${u} + 1)`);else throw new Error(`Unexpected operator: ${c}`);return this.tokens.removeToken(),!0}processExportDefault(){let t=!0;if(this.tokens.matches4(a._export,a._default,a._function,a.name)||this.tokens.matches5(a._export,a._default,a.name,a._function,a.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,S._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let n=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${n};`)}else if(this.tokens.matches4(a._export,a._default,a._class,a.name)||this.tokens.matches5(a._export,a._default,a._abstract,a._class,a.name)||this.tokens.matches3(a._export,a._default,a.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(a._abstract)&&this.tokens.removeToken();let n=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${n};`)}else if(ul(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))t=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let n=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${n}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${n} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(n)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =");t&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(a.at);)if(this.tokens.copyToken(),this.tokens.matches1(a.parenL))this.tokens.copyExpectedToken(a.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR);else{for(this.tokens.copyExpectedToken(a.name);this.tokens.matches1(a.dot);)this.tokens.copyExpectedToken(a.dot),this.tokens.copyExpectedToken(a.name);this.tokens.matches1(a.parenL)&&(this.tokens.copyExpectedToken(a.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let t=this.tokens.currentIndex();if(t++,t++,!this.tokens.matches1AtIndex(t,a.name))return!1;for(t++;t<this.tokens.tokens.length&&this.tokens.tokens[t].isType;)t++;return!!this.tokens.matches1AtIndex(t,a.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let t=this.tokens.identifierName();for(;!this.tokens.matches1(a.eq);)this.rootTransformer.processToken();let n=this.tokens.currentToken().rhsEndIndex;if(n==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<n;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${t} = ${t}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let t=this.tokens.matches1(a.braceL);t&&this.tokens.appendCode("(");let n=0;for(;;)if(this.tokens.matches1(a.braceL)||this.tokens.matches1(a.dollarBraceL)||this.tokens.matches1(a.bracketL))n++,this.tokens.copyToken();else if(this.tokens.matches1(a.braceR)||this.tokens.matches1(a.bracketR))n--,this.tokens.copyToken();else{if(n===0&&!this.tokens.matches1(a.name)&&!this.tokens.currentToken().isType)break;if(this.tokens.matches1(a.eq)){let i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<i;)this.rootTransformer.processToken()}else{let i=this.tokens.currentToken();if(jp(i)){let r=this.tokens.identifierName(),s=this.importProcessor.getIdentifierReplacement(r);if(s===null)throw new Error(`Expected a replacement for ${r} in \`export var\` syntax.`);vE(i)&&(s=`${r}: ${s}`),this.tokens.replaceToken(s)}else this.rootTransformer.processToken()}}if(t){let i=this.tokens.currentToken().rhsEndIndex;if(i==null)throw new Error("Expected = token with an end index.");for(;this.tokens.currentIndex()<i;)this.rootTransformer.processToken();this.tokens.appendCode(")")}}processExportFunction(){this.tokens.replaceToken("");let t=this.processNamedFunction();this.tokens.appendCode(` exports.${t} = ${t};`)}processNamedFunction(){if(this.tokens.matches1(a._function))this.tokens.copyToken();else if(this.tokens.matches2(a.name,a._function)){if(!this.tokens.matchesContextual(S._async))throw new Error("Expected async keyword in function export.");this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(a.star)&&this.tokens.copyToken(),!this.tokens.matches1(a.name))throw new Error("Expected identifier for exported function name.");let t=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(a.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(a.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.braceR),t}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(a._abstract)&&this.tokens.removeToken();let t=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${t} = ${t};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let t=ll(this.tokens),n=[];for(;;){if(this.tokens.matches1(a.braceR)){this.tokens.removeToken();break}let i=zn(this.tokens);for(;this.tokens.currentIndex()<i.endIndex;)this.tokens.removeToken();if(!(i.isType||!t&&this.shouldElideExportedIdentifier(i.leftName))){let s=i.rightName;s==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let c=i.leftName,u=this.importProcessor.getIdentifierReplacement(c);n.push(`exports.${s} = ${u||c};`)}if(this.tokens.matches1(a.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(a.comma,a.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(a.comma))this.tokens.removeToken();else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(S._from)){this.tokens.removeToken();let i=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(i)),ii(this.tokens)}else this.tokens.appendCode(n.join(" "));this.tokens.matches1(a.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(a.string);)this.tokens.removeToken();let t=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(t)),ii(this.tokens),this.tokens.matches1(a.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(t)}}});var pl,XP=z(()=>{"use strict";g();Qt();je();xx();wx();Lc();bb();kx();$x();Sx();Qr();pl=class extends yt{constructor(t,n,i,r,s,c,u,p){super(),this.tokens=t,this.nameManager=n,this.helperManager=i,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=s,this.isFlowTransformEnabled=c,this.keepUnusedImports=u,this.nonTypeIdentifiers=s&&!u?Zp(t,p):new Set,this.declarationInfo=s&&!u?cl(t):vf,this.injectCreateRequireForImportRequire=!!p.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(a._import,a.name,a.eq))return this.processImportEquals();if(this.tokens.matches4(a._import,a.name,a.name,a.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,S._type)){this.tokens.removeInitialToken();for(let t=0;t<7;t++)this.tokens.removeToken();return!0}if(this.tokens.matches2(a._export,a.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(a._export,a._import,a.name,a.name,a.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,S._type)){this.tokens.removeInitialToken();for(let t=0;t<8;t++)this.tokens.removeToken();return!0}if(this.tokens.matches1(a._import))return this.processImport();if(this.tokens.matches2(a._export,a._default))return this.processExportDefault();if(this.tokens.matches2(a._export,a.braceL))return this.processNamedExports();if(this.tokens.matches2(a._export,a.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,S._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(a.braceL)){for(;!this.tokens.matches1(a.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(a._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(S._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,a.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),ii(this.tokens)),!0}return!1}processImportEquals(){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(t)?al(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(a._import,a.parenL))return!1;let t=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(t);!this.tokens.matches1(a.string);)this.tokens.removeToken();this.tokens.removeToken(),ii(this.tokens),this.tokens.matches1(a.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(a._import),this.tokens.matchesContextual(S._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,a.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,S._from))return!0;if(this.tokens.matches1(a.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(S._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,S._from)&&this.tokens.copyToken();let t=!1,n=!1,i=!1;if(this.tokens.matches1(a.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(a.comma)&&this.tokens.removeToken()):(t=!0,this.tokens.copyToken(),this.tokens.matches1(a.comma)&&(i=!0,this.tokens.removeToken()))),this.tokens.matches1(a.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(i&&this.tokens.appendCode(","),t=!0,this.tokens.copyExpectedToken(a.star),this.tokens.copyExpectedToken(a.name),this.tokens.copyExpectedToken(a.name));else if(this.tokens.matches1(a.braceL)){for(i&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(a.braceR);){n=!0;let r=zn(this.tokens);if(r.isType||this.shouldAutomaticallyElideImportedName(r.rightName)){for(;this.tokens.currentIndex()<r.endIndex;)this.tokens.removeToken();this.tokens.matches1(a.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<r.endIndex;)this.tokens.copyToken();this.tokens.matches1(a.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(a.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!t:this.isFlowTransformEnabled?n&&!t:!1}shouldAutomaticallyElideImportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(t)}processExportDefault(){if(ul(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(a._export,a._default,a._function,a.name)||this.tokens.matches5(a._export,a._default,a.name,a._function,a.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,S._async)||this.tokens.matches4(a._export,a._default,a._class,a.name)||this.tokens.matches5(a._export,a._default,a._abstract,a._class,a.name))&&this.reactHotLoaderTransformer){let n=this.nameManager.claimFreeName("_default");return this.tokens.replaceToken(`let ${n}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(n),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(a._export),this.tokens.copyExpectedToken(a.braceL);let t=ll(this.tokens),n=!1;for(;!this.tokens.matches1(a.braceR);){let i=zn(this.tokens);if(i.isType||!t&&this.shouldElideExportedName(i.leftName)){for(;this.tokens.currentIndex()<i.endIndex;)this.tokens.removeToken();this.tokens.matches1(a.comma)&&this.tokens.removeToken()}else{for(n=!0;this.tokens.currentIndex()<i.endIndex;)this.tokens.copyToken();this.tokens.matches1(a.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(a.braceR),!this.keepUnusedImports&&t&&!n&&(this.tokens.removeToken(),this.tokens.removeToken(),ii(this.tokens)),!0}shouldElideExportedName(t){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(t)&&!this.declarationInfo.valueDeclarations.has(t)}}});var fl,YP=z(()=>{"use strict";g();Qt();je();Qr();fl=class extends yt{constructor(t,n,i){super(),this.rootTransformer=t,this.tokens=n,this.isImportsTransformEnabled=i}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(a._enum)?(this.processEnum(),!0):this.tokens.matches2(a._export,a._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(a._export,a._default,a._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${t} = ${t};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${t};`):this.tokens.appendCode(` export default ${t};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(a.name);let t=!1;this.tokens.matchesContextual(S._of)&&(this.tokens.removeToken(),t=this.tokens.matchesContextual(S._symbol),this.tokens.removeToken());let n=this.tokens.matches3(a.braceL,a.name,a.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');let i=!t&&!n;for(this.tokens.replaceTokenTrimmingLeftWhitespace(i?".Mirrored([":"({");!this.tokens.matches1(a.braceR);){if(this.tokens.matches1(a.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(t,n),this.tokens.matches1(a.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(i?"]);":"});")}processEnumElement(t,n){if(t){let i=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${i}")`)}else n?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}}});function JF(e){let t,n=e[0],i=1;for(;i<e.length;){let r=e[i],s=e[i+1];if(i+=2,(r==="optionalAccess"||r==="optionalCall")&&n==null)return;r==="access"||r==="optionalAccess"?(t=n,n=s(n)):(r==="call"||r==="optionalCall")&&(n=s((...c)=>n.call(t,...c)),t=void 0)}return n}var yf,KF,hl,QP=z(()=>{"use strict";g();je();Qr();yf="jest",KF=["mock","unmock","enableAutomock","disableAutomock"],hl=class e extends yt{__init(){this.hoistedFunctionNames=[]}constructor(t,n,i,r){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=i,this.importProcessor=r,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(a.name,a.dot,a.name,a.parenL)&&this.tokens.identifierName()===yf?JF([this,"access",t=>t.importProcessor,"optionalAccess",t=>t.getGlobalNames,"call",t=>t(),"optionalAccess",t=>t.has,"call",t=>t(yf)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(t=>`${t}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let t=!1;for(;this.tokens.matches3(a.dot,a.name,a.parenL);){let n=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(KF.includes(n)){let r=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(r),this.tokens.replaceToken(`function ${r}(){${yf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR),this.tokens.appendCode(";}"),t=!1}else t?this.tokens.copyToken():this.tokens.replaceToken(`${yf}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.parenR),t=!0}return!0}}});var ml,eC=z(()=>{"use strict";g();je();Qr();ml=class extends yt{constructor(t){super(),this.tokens=t}process(){if(this.tokens.matches1(a.num)){let t=this.tokens.currentTokenCode();if(t.includes("_"))return this.tokens.replaceToken(t.replace(/_/g,"")),!0}return!1}}});var gl,tC=z(()=>{"use strict";g();je();Qr();gl=class extends yt{constructor(t,n){super(),this.tokens=t,this.nameManager=n}process(){return this.tokens.matches2(a._catch,a.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}}});var _l,rC=z(()=>{"use strict";g();je();Qr();_l=class extends yt{constructor(t,n){super(),this.tokens=t,this.nameManager=n}process(){if(this.tokens.matches1(a.nullishCoalescing)){let i=this.tokens.currentToken();return this.tokens.tokens[i.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(a._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let n=this.tokens.currentToken().subscriptStartIndex;if(n!=null&&this.tokens.tokens[n].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==a._super){let i=this.nameManager.claimFreeName("_"),r;if(n>0&&this.tokens.matches1AtIndex(n-1,a._delete)&&this.isLastSubscriptInChain()?r=`${i} => delete ${i}`:r=`${i} => ${i}`,this.tokens.tokens[n].isAsyncOperation&&(r=`async ${r}`),this.tokens.matches2(a.questionDot,a.parenL)||this.tokens.matches2(a.questionDot,a.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${r}`);else if(this.tokens.matches2(a.questionDot,a.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}`);else if(this.tokens.matches1(a.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}.`);else if(this.tokens.matches1(a.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}.`);else if(this.tokens.matches1(a.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}[`);else if(this.tokens.matches1(a.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${r}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let t=0;for(let n=this.tokens.currentIndex()+1;;n++){if(n>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[n].isOptionalChainStart?t++:this.tokens.tokens[n].isOptionalChainEnd&&t--,t<0)return!0;if(t===0&&this.tokens.tokens[n].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let t=0,n=this.tokens.currentIndex()-1;for(;;){if(n<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[n].isOptionalChainStart?t--:this.tokens.tokens[n].isOptionalChainEnd&&t++,t<0)return!1;if(t===0&&this.tokens.tokens[n].subscriptStartIndex!=null)return this.tokens.tokens[n-1].type===a._super;n--}}}});var vl,nC=z(()=>{"use strict";g();Wt();je();Qr();vl=class extends yt{constructor(t,n,i,r){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=i,this.options=r}process(){let t=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){let n=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return n?this.tokens.replaceToken(`(0, ${n})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}if(this.tokens.matches3(a.name,a.dot,a.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){let n=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return n?(this.tokens.replaceToken(n),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(t),!0}return!1}tryProcessCreateClassCall(t){let n=this.findDisplayName(t);n&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(a.parenL),this.tokens.copyExpectedToken(a.braceL),this.tokens.appendCode(`displayName: '${n}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(a.braceR),this.tokens.copyExpectedToken(a.parenR))}findDisplayName(t){return t<2?null:this.tokens.matches2AtIndex(t-2,a.name,a.eq)?this.tokens.identifierNameAtIndex(t-2):t>=2&&this.tokens.tokens[t-2].identifierRole===ge.ObjectKey?this.tokens.identifierNameAtIndex(t-2):this.tokens.matches2AtIndex(t-2,a._export,a._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let n=(this.options.filePath||"unknown").split("/"),i=n[n.length-1],r=i.lastIndexOf("."),s=r===-1?i:i.slice(0,r);return s==="index"&&n[n.length-2]?n[n.length-2]:s}classNeedsDisplayName(){let t=this.tokens.currentIndex();if(!this.tokens.matches2(a.parenL,a.braceL))return!1;let n=t+1,i=this.tokens.tokens[n].contextId;if(i==null)throw new Error("Expected non-null context ID on object open-brace.");for(;t<this.tokens.tokens.length;t++){let r=this.tokens.tokens[t];if(r.type===a.braceR&&r.contextId===i){t++;break}if(this.tokens.identifierNameAtIndex(t)==="displayName"&&this.tokens.tokens[t].identifierRole===ge.ObjectKey&&r.contextId===i)return!1}if(t===this.tokens.tokens.length)throw new Error("Unexpected end of input when processing React class.");return this.tokens.matches1AtIndex(t,a.parenR)||this.tokens.matches2AtIndex(t,a.comma,a.parenR)}}});var yl,iC=z(()=>{"use strict";g();Wt();Qr();yl=class e extends yt{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(t){this.extractedDefaultExportName=t}getPrefixCode(){return`
|
|
300
|
-
(function () {
|
|
301
|
-
var enterModule = require('react-hot-loader').enterModule;
|
|
302
|
-
enterModule && enterModule(module);
|
|
303
|
-
})();`.replace(/\s+/g," ").trim()}getSuffixCode(){let t=new Set;for(let i of this.tokens.tokens)!i.isType&&Lp(i)&&i.identifierRole!==ge.ImportDeclaration&&t.add(this.tokens.identifierNameForToken(i));let n=Array.from(t).map(i=>({variableName:i,uniqueLocalName:i}));return this.extractedDefaultExportName&&n.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
|
|
304
|
-
;(function () {
|
|
305
|
-
var reactHotLoader = require('react-hot-loader').default;
|
|
306
|
-
var leaveModule = require('react-hot-loader').leaveModule;
|
|
307
|
-
if (!reactHotLoader) {
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
${n.map(({variableName:i,uniqueLocalName:r})=>` reactHotLoader.register(${i}, "${r}", ${JSON.stringify(this.filePath||"")});`).join(`
|
|
311
|
-
`)}
|
|
312
|
-
leaveModule(module);
|
|
313
|
-
})();`}process(){return!1}}});function bf(e){if(e.length===0||!Yn[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!br[e.charCodeAt(t)])return!1;return!GF.has(e)}var GF,oC=z(()=>{"use strict";g();Zs();GF=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"])});var bl,sC=z(()=>{"use strict";g();je();oC();Qr();bl=class extends yt{constructor(t,n,i){super(),this.rootTransformer=t,this.tokens=n,this.isImportsTransformEnabled=i}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(a._public)||this.tokens.matches1(a._protected)||this.tokens.matches1(a._private)||this.tokens.matches1(a._abstract)||this.tokens.matches1(a._readonly)||this.tokens.matches1(a._override)||this.tokens.matches1(a.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(a._enum)||this.tokens.matches2(a._const,a._enum)?(this.processEnum(),!0):this.tokens.matches2(a._export,a._enum)||this.tokens.matches3(a._export,a._const,a._enum)?(this.processEnum(!0),!0):!1}processEnum(t=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(a._const)||this.tokens.matches1(a._enum);)this.tokens.removeToken();let n=this.tokens.identifierName();this.tokens.removeToken(),t&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${n}; (function (${n})`),this.tokens.copyExpectedToken(a.braceL),this.processEnumBody(n),this.tokens.copyExpectedToken(a.braceR),t&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${n} || (exports.${n} = ${n} = {}));`):this.tokens.appendCode(`)(${n} || (${n} = {}));`)}processEnumBody(t){let n=null;for(;!this.tokens.matches1(a.braceR);){let{nameStringCode:i,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(a.eq,a.string,a.comma)||this.tokens.matches3(a.eq,a.string,a.braceR)?this.processStringLiteralEnumMember(t,i,r):this.tokens.matches1(a.eq)?this.processExplicitValueEnumMember(t,i,r):this.processImplicitValueEnumMember(t,i,r,n),this.tokens.matches1(a.comma)&&this.tokens.removeToken(),r!=null?n=r:n=`${t}[${i}]`}}extractEnumKeyInfo(t){if(t.type===a.name){let n=this.tokens.identifierNameForToken(t);return{nameStringCode:`"${n}"`,variableName:bf(n)?n:null}}else if(t.type===a.string){let n=this.tokens.stringValueForToken(t);return{nameStringCode:this.tokens.code.slice(t.start,t.end),variableName:bf(n)?n:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(t,n,i){i!=null?(this.tokens.appendCode(`const ${i}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${t}[${n}] = ${i};`)):(this.tokens.appendCode(`${t}[${n}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(t,n,i){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected rhsEndIndex on enum assign.");if(i!=null){for(this.tokens.appendCode(`const ${i}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${t}[${t}[${n}] = ${i}] = ${n};`)}else{for(this.tokens.appendCode(`${t}[${t}[${n}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${n};`)}}processImplicitValueEnumMember(t,n,i,r){let s=r!=null?`${r} + 1`:"0";i!=null&&(this.tokens.appendCode(`const ${i} = ${s}; `),s=i),this.tokens.appendCode(`${t}[${t}[${n}] = ${s}] = ${n};`)}}});var xl,aC=z(()=>{"use strict";g();Qt();je();GP();HP();XP();YP();QP();yb();eC();tC();rC();nC();iC();sC();xl=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,i,r){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:s,importProcessor:c}=t;this.tokens=s,this.isImportsTransformEnabled=n.includes("imports"),this.isReactHotLoaderTransformEnabled=n.includes("react-hot-loader"),this.disableESTransforms=!!r.disableESTransforms,r.disableESTransforms||(this.transformers.push(new _l(s,this.nameManager)),this.transformers.push(new ml(s)),this.transformers.push(new gl(s,this.nameManager))),n.includes("jsx")&&(r.jsxRuntime!=="preserve"&&this.transformers.push(new Mc(this,s,c,this.nameManager,r)),this.transformers.push(new vl(this,s,c,r)));let u=null;if(n.includes("react-hot-loader")){if(!r.filePath)throw new Error("filePath is required when using the react-hot-loader transform.");u=new yl(s,r.filePath),this.transformers.push(u)}if(n.includes("imports")){if(c===null)throw new Error("Expected non-null importProcessor with imports transform enabled.");this.transformers.push(new dl(this,s,c,this.nameManager,this.helperManager,u,i,!!r.enableLegacyTypeScriptModuleInterop,n.includes("typescript"),n.includes("flow"),!!r.preserveDynamicImport,!!r.keepUnusedImports))}else this.transformers.push(new pl(s,this.nameManager,this.helperManager,u,n.includes("typescript"),n.includes("flow"),!!r.keepUnusedImports,r));n.includes("flow")&&this.transformers.push(new fl(this,s,n.includes("imports"))),n.includes("typescript")&&this.transformers.push(new bl(this,s,n.includes("imports"))),n.includes("jest")&&this.transformers.push(new hl(this,s,this.nameManager,c))}transform(){this.tokens.reset(),this.processBalancedCode();let n=this.isImportsTransformEnabled?'"use strict";':"";for(let c of this.transformers)n+=c.getPrefixCode();n+=this.helperManager.emitHelpers(),n+=this.generatedVariables.map(c=>` var ${c};`).join("");for(let c of this.transformers)n+=c.getHoistedCode();let i="";for(let c of this.transformers)i+=c.getSuffixCode();let r=this.tokens.finish(),{code:s}=r;if(s.startsWith("#!")){let c=s.indexOf(`
|
|
314
|
-
`);return c===-1&&(c=s.length,s+=`
|
|
315
|
-
`),{code:s.slice(0,c+1)+n+s.slice(c+1)+i,mappings:this.shiftMappings(r.mappings,n.length)}}else return{code:n+s+i,mappings:this.shiftMappings(r.mappings,n.length)}}processBalancedCode(){let t=0,n=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(a.braceL)||this.tokens.matches1(a.dollarBraceL))t++;else if(this.tokens.matches1(a.braceR)){if(t===0)return;t--}if(this.tokens.matches1(a.parenL))n++;else if(this.tokens.matches1(a.parenR)){if(n===0)return;n--}this.processToken()}}processToken(){if(this.tokens.matches1(a._class)){this.processClass();return}for(let t of this.transformers)if(t.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(a._class,a.name))throw new Error("Expected identifier for exported class name.");let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),t}processClass(){let t=bx(this,this.tokens,this.nameManager,this.disableESTransforms),n=(t.headerInfo.isExpression||!t.headerInfo.className)&&t.staticInitializerNames.length+t.instanceInitializerNames.length>0,i=t.headerInfo.className;n&&(i=this.nameManager.claimFreeName("_class"),this.generatedVariables.push(i),this.tokens.appendCode(` (${i} =`));let s=this.tokens.currentToken().contextId;if(s==null)throw new Error("Expected class to have a context ID.");for(this.tokens.copyExpectedToken(a._class);!this.tokens.matchesContextIdAndLabel(a.braceL,s);)this.processToken();this.processClassBody(t,i);let c=t.staticInitializerNames.map(u=>`${i}.${u}()`);n?this.tokens.appendCode(`, ${c.map(u=>`${u}, `).join("")}${i})`):t.staticInitializerNames.length>0&&this.tokens.appendCode(` ${c.map(u=>`${u};`).join(" ")}`)}processClassBody(t,n){let{headerInfo:i,constructorInsertPos:r,constructorInitializerStatements:s,fields:c,instanceInitializerNames:u,rangesToRemove:p}=t,f=0,v=0,y=this.tokens.currentToken().contextId;if(y==null)throw new Error("Expected non-null context ID on class.");this.tokens.copyExpectedToken(a.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode("__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}");let k=s.length+u.length>0;if(r===null&&k){let I=this.makeConstructorInitCode(s,u,n);if(i.hasSuperclass){let $=this.nameManager.claimFreeName("args");this.tokens.appendCode(`constructor(...${$}) { super(...${$}); ${I}; }`)}else this.tokens.appendCode(`constructor() { ${I}; }`)}for(;!this.tokens.matchesContextIdAndLabel(a.braceR,y);)if(f<c.length&&this.tokens.currentIndex()===c[f].start){let I=!1;for(this.tokens.matches1(a.bracketL)?this.tokens.copyTokenWithPrefix(`${c[f].initializerName}() {this`):this.tokens.matches1(a.string)||this.tokens.matches1(a.num)?(this.tokens.copyTokenWithPrefix(`${c[f].initializerName}() {this[`),I=!0):this.tokens.copyTokenWithPrefix(`${c[f].initializerName}() {this.`);this.tokens.currentIndex()<c[f].end;)I&&this.tokens.currentIndex()===c[f].equalsIndex&&this.tokens.appendCode("]"),this.processToken();this.tokens.appendCode("}"),f++}else if(v<p.length&&this.tokens.currentIndex()>=p[v].start){for(this.tokens.currentIndex()<p[v].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<p[v].end;)this.tokens.removeToken();v++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),k&&this.tokens.appendCode(`;${this.makeConstructorInitCode(s,u,n)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(a.braceR)}makeConstructorInitCode(t,n,i){return[...t,...n.map(r=>`${i}.prototype.${r}.call(this)`)].join(";")}processPossibleArrowParamEnd(){if(this.tokens.matches2(a.parenR,a.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,a.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(") =>"),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(S._async)&&!this.tokens.matches1(a._async))return!1;let t=this.tokens.tokenAtRelativeIndex(1);if(t.type!==a.lessThan||!t.isType)return!1;let n=this.tokens.currentIndex()+1;for(;this.tokens.tokens[n].isType;)n++;if(this.tokens.matches1AtIndex(n,a.parenL)){for(this.tokens.replaceToken("async ("),this.tokens.removeInitialToken();this.tokens.currentIndex()<n;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(t,n){for(let i=0;i<t.length;i++){let r=t[i];r!==void 0&&(t[i]=r+n)}return t}}});var uC=$t(wl=>{"use strict";g();wl.__esModule=!0;wl.LinesAndColumns=void 0;var xf=`
|
|
316
|
-
`,cC="\r",lC=(function(){function e(t){this.string=t;for(var n=[0],i=0;i<t.length;)switch(t[i]){case xf:i+=xf.length,n.push(i);break;case cC:i+=cC.length,t[i]===xf&&(i+=xf.length),n.push(i);break;default:i++;break}this.offsets=n}return e.prototype.locationForIndex=function(t){if(t<0||t>this.string.length)return null;for(var n=0,i=this.offsets;i[n+1]<=t;)n++;var r=t-i[n];return{line:n,column:r}},e.prototype.indexForLocation=function(t){var n=t.line,i=t.column;return n<0||n>=this.offsets.length||i<0||i>this.lengthOfLine(n)?null:this.offsets[n]+i},e.prototype.lengthOfLine=function(t){var n=this.offsets[t],i=t===this.offsets.length-1?this.string.length:this.offsets[t+1];return i-n},e})();wl.LinesAndColumns=lC;wl.default=lC});var HF,dC=z(()=>{"use strict";g();HF=Ln(uC());je()});function Ix(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,a._import)&&!e.matches3AtIndex(n,a._import,a.name,a.eq)&&XF(e,n,t);return t}function XF(e,t,n){t++,!e.matches1AtIndex(t,a.parenL)&&(e.matches1AtIndex(t,a.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,a.comma)&&t++),e.matches1AtIndex(t,a.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,a.braceL)&&(t++,YF(e,t,n)))}function YF(e,t,n){for(;;){if(e.matches1AtIndex(t,a.braceR))return;let i=zn(e,t);if(t=i.endIndex,i.isType||n.add(i.rightName),e.matches2AtIndex(t,a.comma,a.braceR))return;if(e.matches1AtIndex(t,a.braceR))return;if(e.matches1AtIndex(t,a.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}var pC=z(()=>{"use strict";g();je();Lc()});function fC(e,t){dA(t);try{let n=QF(e,t),r=new xl(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),s={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw new Error("filePath must be specified when generating a source map.");s={...s,sourceMap:$b(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return s}catch(n){throw t.filePath&&(n.message=`Error transforming ${t.filePath}: ${n.message}`),n}}function QF(e,t){let n=t.transforms.includes("jsx"),i=t.transforms.includes("typescript"),r=t.transforms.includes("flow"),s=t.disableESTransforms===!0,c=VP(e,n,i,r),u=c.tokens,p=c.scopes,f=new Wc(e,u),v=new Vp(f),y=new sl(e,u,r,s,v),k=!!t.enableLegacyTypeScriptModuleInterop,I=null;return t.transforms.includes("imports")?(I=new Bc(f,y,k,t,t.transforms.includes("typescript"),!!t.keepUnusedImports,v),I.preprocessTokens(),qp(y,p,I.getGlobalNames()),t.transforms.includes("typescript")&&!t.keepUnusedImports&&I.pruneTypeOnlyImports()):t.transforms.includes("typescript")&&!t.keepUnusedImports&&qp(y,p,Ix(y)),{tokenProcessor:y,scopes:p,nameManager:f,importProcessor:I,helperManager:v}}var hC=z(()=>{"use strict";g();TE();FE();ME();ZE();VE();pA();_x();JP();aC();dC();pC()});import{existsSync as e3,readFileSync as t3,unlinkSync as r3,writeFileSync as n3}from"fs";import{dirname as i3,join as o3,resolve as s3}from"path";import{pathToFileURL as a3}from"url";async function wf(){let e=await Ae(()=>c3(),t=>new Error(`Failed to load configuration: ${t.message}`,{cause:t}));return e.failure&&(Ze(e.failure.message),process.exit(1)),Xt.step("Loaded configuration"),e.data}async function c3(){let e=s3(process.cwd(),Ds);if(!e3(e))throw new Error(`Missing "${Ds}" file`);let t=await l3(e);return BT.parse(t)}async function l3(e){let t=t3(e,"utf-8"),{code:n}=fC(t,{transforms:["typescript"],filePath:e}),i=o3(i3(e),`.__swirls_${Date.now()}.mjs`);n3(i,n,"utf-8");try{return(await import(a3(i).href)).default}finally{r3(i)}}var Tx=z(()=>{"use strict";g();rr();Yt();Ry();hC();yr()});async function Fi(e,t){let n=mt();n.start(`Finding ${e}s`);let i=await Ae(t,s=>new Error(`Failed to find ${e}s: ${s.message}`,{cause:s}));i.failure&&(Ze(i.failure.message,n),process.exit(1));let r=i.data;return r.length===0&&(n.error(`No ${e}s found`),process.exit(1)),n.stop(`Found ${r.length} ${e}${r.length===1?"":"s"}`),r}var kl=z(()=>{"use strict";g();rr();Yt();yr()});async function mC(e){let t=mt(),n=await d3();t.start(`Creating project "${n}"`);let i=await Ae(()=>e.projects.createProject({name:n}),s=>new Error(`Failed to create project: ${s.message}`,{cause:s}));i.failure&&(Ze(i.failure.message,t),process.exit(1));let r=i.data;return Ct(`Created project "${n}"`,t),zi({keys:["ID","Name"],data:[{ID:r.id,Name:r.name}]}),r}async function nn(e,t){if(t?.preferConfig??!0)return(await wf()).projectId;let i=await Fi("project",()=>e.projects.listProjects()),r=await Na({message:"Select a project",options:i.map(s=>({value:s,label:s.name}))});return qr(r)&&process.exit(0),r.id}async function d3(){let e=await Yo({message:"What is the name of your project?",placeholder:"My Swirls Project",validate:t=>{if(!t)return"Project name is required"}});return qr(e)&&process.exit(0),e}async function gC(e){let t=await Mk({message:`Open project "${e.name}" in browser?`});qr(t)&&process.exit(0),t&&(await kp(`${u3}/${e.id}`),Xt.info(`Opened project "${e.name}"`))}var u3,Mi=z(()=>{"use strict";g();rr();Yt();_y();yr();Hr();Rc();zp();Tx();kl();u3=`${Rs.WEB_URL}/projects`});import _C from"fs/promises";import p3 from"path";async function kf(e,t){let n=p3.dirname(e);await _C.mkdir(n,{recursive:!0}),await _C.writeFile(e,t,"utf-8")}var Ex=z(()=>{"use strict";g()});var vC={};It(vC,{configure:()=>m3});import{existsSync as f3}from"fs";import{resolve as h3}from"path";import Ax from"process";async function m3(){let e=await Xe(this),t=mt(),n=Ax.cwd(),i=h3(n,Ds);f3(i)&&(Xt.info(`Configuration already exists at ${i}`),Ax.exit(0)),Xt.step("Application is ready to be powered by Swirls \u{1F300}");let r=await nn(e,{preferConfig:!1});t.start("Creating configuration file");let s=await Ae(async()=>{let c=ZT(r);await kf(i,c)},c=>new Error("Failed to create configuration",{cause:c}));s.failure&&(Ze(s.failure.message,t),Ax.exit(1)),Ct(`Created "${Ds}" file in ${n}`,t)}var yC=z(()=>{"use strict";g();rr();Yt();Ry();vr();Mi();yr();Hr();Ex()});function $f(e,t){if(e.allOf.length===0)return"z.never()";if(e.allOf.length===1){let n=e.allOf[0];return Ft(n,{...t,path:[...t.path,"allOf",n[$l]]})}else{let[n,i]=x3(w3(e.allOf));return`z.intersection(${$f({allOf:n},t)}, ${$f({allOf:i},t)})`}}function Vt(e,t,n){let i=e[t],r="";if(i!==void 0){let s=n({value:i,json:JSON.stringify(i)});if(s){let c=s[0],u=s.length===3?s[1]:"",p=s.length===3?s[2]:s[1];r+=c,e.errorMessage?.[t]!==void 0&&(r+=u+JSON.stringify(e.errorMessage[t])),r+=p}}return r}function A3(e,t){let n;e.properties&&(Object.keys(e.properties).length?(n="z.object({ ",n+=Object.keys(e.properties).map(c=>{let u=e.properties[c],p=`${JSON.stringify(c)}: ${Ft(u,{...t,path:[...t.path,"properties",c]})}`;t.withJsdocs&&typeof u=="object"&&(p=E3(u,p));let f=typeof u=="object"&&u.default!==void 0,v=Array.isArray(e.required)?e.required.includes(c):typeof u=="object"&&u.required===!0;return!f&&!v?`${p}.optional()`:p}).join(", "),n+=" })"):n="z.object({})");let i=e.additionalProperties!==void 0?Ft(e.additionalProperties,{...t,path:[...t.path,"additionalProperties"]}):void 0,r;if(e.patternProperties){let c=Object.fromEntries(Object.entries(e.patternProperties).map(([u,p])=>[u,Ft(p,{...t,path:[...t.path,"patternProperties",u]})],{}));r="",n?i?r+=`.catchall(z.union([${[...Object.values(c),i].join(", ")}]))`:Object.keys(c).length>1?r+=`.catchall(z.union([${Object.values(c).join(", ")}]))`:r+=`.catchall(${Object.values(c)})`:i?r+=`z.record(z.union([${[...Object.values(c),i].join(", ")}]))`:Object.keys(c).length>1?r+=`z.record(z.union([${Object.values(c).join(", ")}]))`:r+=`z.record(${Object.values(c)})`,r+=`.superRefine((value, ctx) => {
|
|
317
|
-
`,r+=`for (const key in value) {
|
|
318
|
-
`,i&&(e.properties?r+=`let evaluated = [${Object.keys(e.properties).map(u=>JSON.stringify(u)).join(", ")}].includes(key)
|
|
319
|
-
`:r+=`let evaluated = false
|
|
320
|
-
`);for(let u in e.patternProperties)r+="if (key.match(new RegExp("+JSON.stringify(u)+`))) {
|
|
321
|
-
`,i&&(r+=`evaluated = true
|
|
322
|
-
`),r+="const result = "+c[u]+`.safeParse(value[key])
|
|
323
|
-
`,r+=`if (!result.success) {
|
|
324
|
-
`,r+=`ctx.addIssue({
|
|
325
|
-
path: [...ctx.path, key],
|
|
326
|
-
code: 'custom',
|
|
327
|
-
message: \`Invalid input: Key matching regex /\${key}/ must match schema\`,
|
|
328
|
-
params: {
|
|
329
|
-
issues: result.error.issues
|
|
330
|
-
}
|
|
331
|
-
})
|
|
332
|
-
`,r+=`}
|
|
333
|
-
`,r+=`}
|
|
334
|
-
`;i&&(r+=`if (!evaluated) {
|
|
335
|
-
`,r+="const result = "+i+`.safeParse(value[key])
|
|
336
|
-
`,r+=`if (!result.success) {
|
|
337
|
-
`,r+=`ctx.addIssue({
|
|
338
|
-
path: [...ctx.path, key],
|
|
339
|
-
code: 'custom',
|
|
340
|
-
message: \`Invalid input: must match catchall schema\`,
|
|
341
|
-
params: {
|
|
342
|
-
issues: result.error.issues
|
|
343
|
-
}
|
|
344
|
-
})
|
|
345
|
-
`,r+=`}
|
|
346
|
-
`,r+=`}
|
|
347
|
-
`),r+=`}
|
|
348
|
-
`,r+="})"}let s=n?r?n+r:i?i==="z.never()"?n+".strict()":n+`.catchall(${i})`:n:r||(i?`z.record(${i})`:"z.record(z.any())");return Lt.an.anyOf(e)&&(s+=`.and(${xC({...e,anyOf:e.anyOf.map(c=>typeof c=="object"&&!c.type&&(c.properties||c.additionalProperties||c.patternProperties)?{...c,type:"object"}:c)},t)})`),Lt.a.oneOf(e)&&(s+=`.and(${wC({...e,oneOf:e.oneOf.map(c=>typeof c=="object"&&!c.type&&(c.properties||c.additionalProperties||c.patternProperties)?{...c,type:"object"}:c)},t)})`),Lt.an.allOf(e)&&(s+=`.and(${$f({...e,allOf:e.allOf.map(c=>typeof c=="object"&&!c.type&&(c.properties||c.additionalProperties||c.patternProperties)?{...c,type:"object"}:c)},t)})`),s}function L3(e){return e?e.toLowerCase():""}function B3(e,t={}){if(!e)return"";let{splitRegexp:n=F3,stripRegexp:i=M3,transform:r=L3,delimiter:s=" "}=t,c=bC(bC(e,n,"$1\0$2"),i,"\0"),u=0,p=c.length;for(;c.charAt(u)==="\0";)u++;for(;c.charAt(p-1)==="\0";)p--;return c.slice(u,p).split("\0").map(r).join(s)}function bC(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((i,r)=>i.replace(r,n),e)}function $C(e,t){let n=e.charAt(0),i=e.slice(1).toLowerCase();return t>0&&n>="0"&&n<="9"?`_${n}${i}`:`${n.toUpperCase()}${i}`}function SC(e,t={}){return e?B3(e,{delimiter:"",transform:$C,...t}):""}function Z3(e,t){return t===0?e.toLowerCase():$C(e,t)}function W3(e,t={}){return e?SC(e,{transform:Z3,...t}):""}function IC(e,t){let n=["import { registerForm } from '@swirls/sdk/form'","import { z } from 'zod'",""],i=e.flatMap(({name:r,schema:s})=>V3(r,s));return[...t,...n,...i,...q3(e),...J3(e),...K3(e)].join(`
|
|
349
|
-
`)}function V3(e,t){let n=j3(t,{module:"esm",name:Px(e).camel,noImport:!0,type:!0}),[i,r]=n.split(`
|
|
350
|
-
`);if(!i||!r)throw new Error("Failed to generate standard schema");return[`// Form schema: ${e}`,i,"",r,""]}function q3(e){return["// Form registry","export const registry = {",...e.flatMap(({name:t,id:n})=>[` '${t}': {`,` id: '${n}',`,` name: '${t}',`,` schema: ${Px(t).camel},`," },"]),"} as const",""]}function J3(e){return["// Form registration","export function registerForms() {",...e.map(({name:t})=>` registerForm('${t}', registry['${t}'])`),"}",""]}function K3(e){let t="@swirls/sdk/form";return[`// Module augmentation for ${t}`,`declare module '${t}' {`," interface FormRegistry {",...e.flatMap(({name:n,id:i})=>[` '${n}': {`,` id: '${i}'`,` name: '${n}'`,` schema: typeof ${Px(n).camel}`," }"])," }","}",""]}function Px(e){return{camel:`${W3(e)}Schema`,pascal:`${SC(e)}Schema`}}var xC,g3,_3,v3,y3,b3,x3,$l,w3,k3,$3,S3,I3,T3,wC,kC,E3,P3,C3,O3,U3,Ft,z3,N3,R3,D3,Lt,j3,F3,M3,TC=z(()=>{"use strict";g();xC=(e,t)=>e.anyOf.length?e.anyOf.length===1?Ft(e.anyOf[0],{...t,path:[...t.path,"anyOf",0]}):`z.union([${e.anyOf.map((n,i)=>Ft(n,{...t,path:[...t.path,"anyOf",i]})).join(", ")}])`:"z.any()",g3=e=>"z.boolean()",_3=e=>"z.any()",v3=(e,t)=>`z.union([${e.type.map(n=>Ft({...e,type:n},{...t,withoutDefaults:!0})).join(", ")}])`,y3=(e,t)=>`z.any().refine((value) => !${Ft(e.not,{...t,path:[...t.path,"not"]})}.safeParse(value).success, "Invalid input: Should NOT be valid against schema")`,b3=e=>"z.null()",x3=e=>[e.slice(0,e.length/2),e.slice(e.length/2)],$l=Symbol("Original index"),w3=e=>{let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="boolean")t.push(i?{[$l]:n}:{[$l]:n,not:{}});else{if($l in i)return e;t.push({...i,[$l]:n})}}return t};k3=(e,t)=>{if(Array.isArray(e.items))return`z.tuple([${e.items.map((i,r)=>Ft(i,{...t,path:[...t.path,"items",r]}))}])`;let n=e.items?`z.array(${Ft(e.items,{...t,path:[...t.path,"items"]})})`:"z.array(z.any())";return n+=Vt(e,"minItems",({json:i})=>[`.min(${i}`,", ",")"]),n+=Vt(e,"maxItems",({json:i})=>[`.max(${i}`,", ",")"]),e.uniqueItems===!0&&(n+=Vt(e,"uniqueItems",()=>[".unique(","",")"])),n},$3=e=>`z.literal(${JSON.stringify(e.const)})`,S3=e=>e.enum.length===0?"z.never()":e.enum.length===1?`z.literal(${JSON.stringify(e.enum[0])})`:e.enum.every(t=>typeof t=="string")?`z.enum([${e.enum.map(t=>JSON.stringify(t))}])`:`z.union([${e.enum.map(t=>`z.literal(${JSON.stringify(t)})`).join(", ")}])`,I3=(e,t)=>{let n=Ft(e.if,{...t,path:[...t.path,"if"]}),i=Ft(e.then,{...t,path:[...t.path,"then"]}),r=Ft(e.else,{...t,path:[...t.path,"else"]});return`z.union([${i}, ${r}]).superRefine((value,ctx) => {
|
|
351
|
-
const result = ${n}.safeParse(value).success
|
|
352
|
-
? ${i}.safeParse(value)
|
|
353
|
-
: ${r}.safeParse(value);
|
|
354
|
-
if (!result.success) {
|
|
355
|
-
result.error.errors.forEach((error) => ctx.addIssue(error))
|
|
356
|
-
}
|
|
357
|
-
})`},T3=e=>{let t="z.number()";return e.type==="integer"?t+=Vt(e,"type",()=>[".int(",")"]):t+=Vt(e,"format",({value:n})=>{if(n==="int64")return[".int(",")"]}),t+=Vt(e,"multipleOf",({value:n,json:i})=>n===1?t.startsWith("z.number().int(")?void 0:[".int(",")"]:[`.multipleOf(${i}`,", ",")"]),typeof e.minimum=="number"?e.exclusiveMinimum===!0?t+=Vt(e,"minimum",({json:n})=>[`.gt(${n}`,", ",")"]):t+=Vt(e,"minimum",({json:n})=>[`.gte(${n}`,", ",")"]):typeof e.exclusiveMinimum=="number"&&(t+=Vt(e,"exclusiveMinimum",({json:n})=>[`.gt(${n}`,", ",")"])),typeof e.maximum=="number"?e.exclusiveMaximum===!0?t+=Vt(e,"maximum",({json:n})=>[`.lt(${n}`,", ",")"]):t+=Vt(e,"maximum",({json:n})=>[`.lte(${n}`,", ",")"]):typeof e.exclusiveMaximum=="number"&&(t+=Vt(e,"exclusiveMaximum",({json:n})=>[`.lt(${n}`,", ",")"])),t},wC=(e,t)=>e.oneOf.length?e.oneOf.length===1?Ft(e.oneOf[0],{...t,path:[...t.path,"oneOf",0]}):`z.any().superRefine((x, ctx) => {
|
|
358
|
-
const schemas = [${e.oneOf.map((n,i)=>Ft(n,{...t,path:[...t.path,"oneOf",i]})).join(", ")}];
|
|
359
|
-
const errors = schemas.reduce<z.ZodError[]>(
|
|
360
|
-
(errors, schema) =>
|
|
361
|
-
((result) =>
|
|
362
|
-
result.error ? [...errors, result.error] : errors)(
|
|
363
|
-
schema.safeParse(x),
|
|
364
|
-
),
|
|
365
|
-
[],
|
|
366
|
-
);
|
|
367
|
-
if (schemas.length - errors.length !== 1) {
|
|
368
|
-
ctx.addIssue({
|
|
369
|
-
path: ctx.path,
|
|
370
|
-
code: "invalid_union",
|
|
371
|
-
unionErrors: errors,
|
|
372
|
-
message: "Invalid input: Should pass single schema",
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
})`:"z.any()",kC=e=>{let t=e.split(`
|
|
376
|
-
`);return`/**${t.length===1?t[0]:`
|
|
377
|
-
${t.map(i=>`* ${i}`).join(`
|
|
378
|
-
`)}
|
|
379
|
-
`}*/
|
|
380
|
-
`},E3=(e,t)=>{let n=e.description;return n?`
|
|
381
|
-
${kC(n)}${t}`:t};P3=e=>{let t="z.string()";t+=Vt(e,"format",({value:i})=>{switch(i){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime({ offset: true",", message: "," })"];case"time":return[".time(",")"];case"date":return[".date(",")"];case"binary":return[".base64(",")"];case"duration":return[".duration(",")"]}}),t+=Vt(e,"pattern",({json:i})=>[`.regex(new RegExp(${i})`,", ",")"]),t+=Vt(e,"minLength",({json:i})=>[`.min(${i}`,", ",")"]),t+=Vt(e,"maxLength",({json:i})=>[`.max(${i}`,", ",")"]),t+=Vt(e,"contentEncoding",({value:i})=>{if(i==="base64")return[".base64(",")"]});let n=Vt(e,"contentMediaType",({value:i})=>{if(i==="application/json")return['.transform((str, ctx) => { try { return JSON.parse(str); } catch (err) { ctx.addIssue({ code: "custom", message: "Invalid JSON" }); }}',", ",")"]});return n!=""&&(t+=n,t+=Vt(e,"contentSchema",({value:i})=>{if(i&&i instanceof Object)return[`.pipe(${Ft(i)}`,", ",")"]})),t},C3=(e,t)=>e.oneOf.length?e.oneOf.length===1?Ft(e.oneOf[0],{...t,path:[...t.path,"oneOf",0]}):`z.discriminatedUnion("${e.discriminator.propertyName}", [${e.oneOf.map((n,i)=>Ft(n,{...t,path:[...t.path,"oneOf",i]})).join(", ")}])`:"z.any()",O3=(e,...t)=>Object.keys(e).reduce((n,i)=>(t.includes(i)||(n[i]=e[i]),n),{}),U3=(e,t)=>`${Ft(O3(e,"nullable"),t,!0)}.nullable()`,Ft=(e,t={seen:new Map,path:[]},n)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){let s=t.parserOverride(e,t);if(typeof s=="string")return s}let i=t.seen.get(e);if(i){if(i.r!==void 0)return i.r;if(t.depth===void 0||i.n>=t.depth)return"z.any()";i.n+=1}else i={r:void 0,n:0},t.seen.set(e,i);let r=D3(e,t);return n||(t.withoutDescribes||(r=z3(e,r)),t.withoutDefaults||(r=N3(e,r)),r=R3(e,r)),i.r=r,r},z3=(e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),N3=(e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),R3=(e,t)=>(e.readOnly&&(t+=".readonly()"),t),D3=(e,t)=>Lt.a.nullable(e)?U3(e,t):Lt.an.object(e)?A3(e,t):Lt.an.array(e)?k3(e,t):Lt.an.anyOf(e)?xC(e,t):Lt.an.allOf(e)?$f(e,t):Lt.a.simpleDiscriminatedOneOf(e)?C3(e,t):Lt.a.oneOf(e)?wC(e,t):Lt.a.not(e)?y3(e,t):Lt.an.enum(e)?S3(e):Lt.a.const(e)?$3(e):Lt.a.multipleType(e)?v3(e,t):Lt.a.primitive(e,"string")?P3(e):Lt.a.primitive(e,"number")||Lt.a.primitive(e,"integer")?T3(e):Lt.a.primitive(e,"boolean")?g3(e):Lt.a.primitive(e,"null")?b3(e):Lt.a.conditional(e)?I3(e,t):_3(e),Lt={an:{object:e=>e.type==="object",array:e=>e.type==="array",anyOf:e=>e.anyOf!==void 0,allOf:e=>e.allOf!==void 0,enum:e=>e.enum!==void 0},a:{nullable:e=>e.nullable===!0,multipleType:e=>Array.isArray(e.type),not:e=>e.not!==void 0,const:e=>e.const!==void 0,primitive:(e,t)=>e.type===t,conditional:e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),simpleDiscriminatedOneOf:e=>{if(!e.oneOf||!Array.isArray(e.oneOf)||e.oneOf.length===0||!e.discriminator||typeof e.discriminator!="object"||!("propertyName"in e.discriminator)||typeof e.discriminator.propertyName!="string")return!1;let t=e.discriminator.propertyName;return e.oneOf.every(n=>{if(!n||typeof n!="object"||n.type!=="object"||!n.properties||typeof n.properties!="object"||!(t in n.properties))return!1;let i=n.properties[t];return i&&typeof i=="object"&&i.type==="string"&&(i.const!==void 0||i.enum&&Array.isArray(i.enum)&&i.enum.length===1)&&Array.isArray(n.required)&&n.required.includes(t)})},oneOf:e=>e.oneOf!==void 0}},j3=(e,{module:t,name:n,type:i,noImport:r,...s}={})=>{if(i&&(!n||t!=="esm"))throw new Error("Option `type` requires `name` to be set and `module` to be `esm`");let c=Ft(e,{module:t,name:n,path:[],seen:new Map,...s}),u=s.withJsdocs&&typeof e!="boolean"&&e.description?kC(e.description):"";if(t==="cjs"?(c=`${u}module.exports = ${n?`{ ${JSON.stringify(n)}: ${c} }`:c}
|
|
382
|
-
`,r||(c=`${u}const { z } = require("zod")
|
|
383
|
-
|
|
384
|
-
${c}`)):t==="esm"?(c=`${u}export ${n?`const ${n} =`:"default"} ${c}
|
|
385
|
-
`,r||(c=`import { z } from "zod"
|
|
386
|
-
|
|
387
|
-
${c}`)):n&&(c=`${u}const ${n} = ${c}`),i&&n){let p=typeof i=="string"?i:`${n[0].toUpperCase()}${n.substring(1)}`;c+=`export type ${p} = z.infer<typeof ${n}>
|
|
388
|
-
`}return c};F3=[new RegExp("(\\p{Ll}|\\p{N})(\\p{Lu})","gu"),new RegExp("(\\p{Lu})(\\p{Lu}\\p{Ll})","gu")],M3=/[^\p{L}\p{N}]+/gu});var EC={};It(EC,{generateCode:()=>H3});async function G3(e,t){let n=await Xe(e),{results:i}=await n.forms.listForms({projectId:t});function r(c){return c.schema!=null}return i.filter(r).map(c=>({id:c.id,name:c.name,schema:c.schema}))}async function H3(){let e=mt(),{projectId:t,genPath:n}=await wf();e.start("Generating form code...");let i=await Ae(async()=>{let s=['// This file was generated by "@swirls/cli dev generate"',"// Do not edit this file manually",""],c=await G3(this,t);return IC(c,s)},s=>new Error(`Failed to generate form code: ${s.message}`,{cause:s}));i.failure&&(Ze(i.failure.message,e),process.exit(1));let r=await Ae(()=>kf(n,i.data),s=>new Error("Failed to write code file",{cause:s}));r.failure&&(Ze(r.failure.message,e),process.exit(1)),Ct(`Generated code in ${n}`,e)}var AC=z(()=>{"use strict";g();rr();Yt();TC();vr();yr();Hr();Tx();Ex()});var CC={};It(CC,{listApiKeys:()=>Q3});async function Q3(e){let t=await Xe(this),n=e.revoked??!1,i=await Fi("API key",()=>t.apiKeys.listApiKeys({includeRevoked:n}));zi({keys:["ID","Name","Description","Revoked","Expired"],data:i.map(r=>({ID:r.id,Name:r.name,Description:r.description??"-",Revoked:r.revoked,Expired:r.expired}))})}var OC=z(()=>{"use strict";g();vr();Rc();kl()});async function UC(){let e=await Yo({message:"What is the name of your API key?",placeholder:"My API Key",validate:t=>{if(!t)return"API key name is required"}});return qr(e)&&process.exit(0),e}async function zC(){let e=await Yo({message:"Description (optional)",validate:t=>{if(t&&t.length>100)return"Description must be at most 100 characters"}});return qr(e)&&process.exit(0),e}async function NC(){let e=await Yo({message:"Reason for revoking (optional)",validate:t=>{if(t&&t.length>500)return"Reason must be at most 500 characters"}});return qr(e)&&process.exit(0),e}async function RC(e){let t=await Fi("API key",()=>e.apiKeys.listApiKeys({includeRevoked:!1})),n=await Na({message:"Select an API key to revoke",options:t.map(i=>({value:i,label:i.name}))});return qr(n)&&process.exit(0),n}async function DC(){let e=await Na({message:"Expiration",initialValue:90,options:e9.map(t=>({value:t.value,label:t.label}))});return qr(e)&&process.exit(0),e}var e9,Cx=z(()=>{"use strict";g();Yt();kl();e9=[{value:7,label:"7 days"},{value:30,label:"30 days"},{value:90,label:"90 days"},{value:365,label:"365 days"}]});var jC={};It(jC,{createApiKey:()=>t9});async function t9(){let e=await Xe(this),t=mt(),n=await UC(),i=await zC(),r=await DC();t.start("Creating API key");let s=await Ae(()=>e.apiKeys.createApiKey({name:n,description:i,expiresInDays:r}),u=>new Error(`Failed to create API key: ${u.message}`,{cause:u}));s.failure&&(Ze(s.failure.message,t),process.exit(1));let c=s.data;Ct(`Created API key "${c.name}"`,t),Au(c.secret,"Save now, the key will not be shown again")}var LC=z(()=>{"use strict";g();rr();Yt();vr();Cx();yr();Hr()});var FC={};It(FC,{revokeApiKey:()=>r9});async function r9(){let e=await Xe(this),t=mt(),n=await RC(e),i=await NC();t.start("Revoking API key");let r=await Ae(()=>e.apiKeys.revokeApiKey({apiKeyId:n.id,reason:i}),s=>new Error(`Failed to revoke API key: ${s.message}`,{cause:s}));r.failure&&(Ze(r.failure.message,t),process.exit(1)),Ct(`Revoked API key "${n.name}"`,t)}var MC=z(()=>{"use strict";g();rr();Yt();vr();Cx();yr();Hr()});var ZC={};It(ZC,{createProject:()=>s9});async function s9(){let e=await Xe(this),t=await mC(e);await gC(t)}var WC=z(()=>{"use strict";g();vr();Mi()});var VC={};It(VC,{listProjects:()=>a9});async function a9(){let e=await Xe(this),t=await Fi("project",()=>e.projects.listProjects());zi({keys:["ID","Name"],data:t.map(n=>({ID:n.id,Name:n.name}))})}var qC=z(()=>{"use strict";g();vr();Rc();kl()});var KC={};It(KC,{list:()=>u9});async function u9(e,t){let n=await Xe(this),i=mt(),r=await nn(n);i.start("Finding files");let s=await Ae(()=>n.buckets.listFiles({projectId:r,path:t}),f=>new Error(`Failed to find files: ${f.message}`,{cause:f}));s.failure&&(Ze(s.failure.message,i),process.exit(1));let{files:c,folders:u}=s.data;u.length===0&&c.length===0&&(i.error("No files or folders found"),process.exit(1)),i.stop(`Found ${c.length} file${c.length===1?"":"s"} and ${u.length} folder${u.length===1?"":"s"}`);let p=[...u.map(f=>({Type:"folder",Name:f.name,Size:"-"})),...c.map(f=>({Type:"file",Name:f.name,Size:f.size?d9(f.size):"-"}))];zi({keys:["Type","Name","Size"],data:p})}function d9(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB","TB"],i=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**i).toFixed(2))} ${n[i]}`}var GC=z(()=>{"use strict";g();rr();Yt();vr();Mi();yr();Rc()});var HC={};It(HC,{upload:()=>h9});import{readFile as p9}from"fs/promises";import{basename as f9}from"path";async function h9(e,t,n){let i=await Xe(this),r=mt(),s=await nn(i),c=await Ae(()=>p9(t),y=>new Error(`Failed to read file: ${y.message}`,{cause:y}));c.failure&&(Ze(c.failure.message),process.exit(1));let u=f9(t),p=n?`${n}/${u}`:u;r.start("Creating upload URL");let f=await Ae(()=>i.buckets.createSignedUploadUrl({projectId:s,path:p}),y=>new Error(`Failed to create upload URL: ${y.message}`,{cause:y}));f.failure&&(Ze(f.failure.message,r),process.exit(1)),r.stop("Created upload URL"),r.start("Uploading file");let v=await Ae(async()=>{let y=await fetch(f.data.signedUrl,{method:"PUT",headers:{"Content-Type":"application/octet-stream","x-upsert":"true"},body:c.data});if(!y.ok)throw new Error(`Upload failed: ${y.statusText}`);return y},y=>new Error(`Failed to upload file: ${y.message}`,{cause:y}));v.failure&&(Ze(v.failure.message,r),process.exit(1)),Ct(`Uploaded ${u} to ${p}`,r)}var XC=z(()=>{"use strict";g();rr();Yt();vr();Mi();yr();Hr()});var YC={};It(YC,{download:()=>g9});import{writeFile as m9}from"fs/promises";async function g9(e,t,n){let i=await Xe(this),r=mt(),s=await nn(i);r.start("Creating download URL");let c=await Ae(()=>i.buckets.createSignedUrl({projectId:s,path:t}),f=>new Error(`Failed to create download URL: ${f.message}`,{cause:f}));c.failure&&(Ze(c.failure.message,r),process.exit(1)),r.stop("Created download URL"),r.start("Downloading file");let u=await Ae(async()=>{let f=await fetch(c.data.signedUrl);if(!f.ok)throw new Error(`Download failed: ${f.statusText}`);return f.arrayBuffer()},f=>new Error(`Failed to download file: ${f.message}`,{cause:f}));u.failure&&(Ze(u.failure.message,r),process.exit(1));let p=await Ae(()=>m9(n,Buffer.from(u.data)),f=>new Error(`Failed to write file: ${f.message}`,{cause:f}));p.failure&&(Ze(p.failure.message,r),process.exit(1)),Ct(`Downloaded ${t} to ${n}`,r)}var QC=z(()=>{"use strict";g();rr();Yt();vr();Mi();yr();Hr()});var eO={};It(eO,{deleteFile:()=>_9});async function _9(e,t){let n=await Xe(this),i=mt(),r=await nn(n);i.start("Deleting file");let s=await Ae(()=>n.buckets.deleteFile({projectId:r,path:t}),c=>new Error(`Failed to delete file: ${c.message}`,{cause:c}));s.failure&&(Ze(s.failure.message,i),process.exit(1)),Ct(`Deleted ${t}`,i)}var tO=z(()=>{"use strict";g();rr();Yt();vr();Mi();yr();Hr()});var rO={};It(rO,{url:()=>v9});async function v9(e,t){let n=await Xe(this),i=await nn(n),r=mt();r.start("Creating signed URL");let s=await Ae(()=>n.buckets.createSignedUrl({projectId:i,path:t,expiresIn:e.expires}),c=>new Error(`Failed to create signed URL: ${c.message}`,{cause:c}));s.failure&&(Ze(s.failure.message,r),process.exit(1)),Ct(`Created signed URL for "${t}"`,r),Au(s.data.signedUrl,`URL expires at ${s.data.expiresAt}`)}var nO=z(()=>{"use strict";g();rr();Yt();vr();Mi();yr();Hr()});g();g();function sk(e,t){let n=e.env?.[t];return typeof n=="string"&&n!=="0"}var xn={UnknownCommand:-5,InvalidArgument:-4,ContextLoadError:-3,CommandLoadError:-2,InternalError:-1,Success:0,CommandRunError:1};function mh(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function kn(e){return Array.from(e).map((t,n)=>{let i=t.toUpperCase(),r=t.toLowerCase();return n===0||i!==t||i===r?t:`-${r}`}).join("")}function g2(e){let t=new Map;return{get:(...n)=>t.get(n.join(","))??e,set:(n,...i)=>{t.set(i.join(","),n)}}}function _2(e,t,n){let{threshold:i,weights:r}=n;if(e===t)return 0;let s=Math.abs(e.length-t.length);if(typeof i=="number"&&s>i)return 1/0;let c=g2(1/0);c.set(0,-1,-1);for(let f=0;f<t.length;++f)c.set((f+1)*r.insertion,-1,f);for(let f=0;f<e.length;++f)c.set((f+1)*r.deletion,f,-1);let u=-1/0;for(let f=0;f<e.length;++f){let v=1/0;for(let y=0;y<=t.length-1;++y){let k=e[f]===t[y]?0:1,I=[c.get(f-1,y)+r.deletion,c.get(f,y-1)+r.insertion,c.get(f-1,y-1)+k*r.substitution];e[f]===t[y-1]&&e[f-1]===t[y]&&I.push(c.get(f-2,y-2)+k*r.transposition);let $=Math.min(...I);c.set($,f,y),$<v&&(v=$)}if(v>i){if(u>i)return 1/0;u=v}else u=-1/0}let p=c.get(e.length-1,t.length-1);return p>i?1/0:p}function v2(e,t,n){let i=e[1]-t[1];if(i!==0)return i;let r=e[0].startsWith(n),s=t[0].startsWith(n);return r&&!s?-1:!r&&s?1:e[0].localeCompare(t[0])}function ou(e,t,n){let i=t.map(s=>[s,_2(e,s,n)]).filter(([,s])=>s<=n.threshold),r=Math.min(...i.map(([,s])=>s));return i.filter(([,s])=>s===r).sort((s,c)=>v2(s,c,e)).map(([s])=>s)}var fr=class extends Error{};function nu(e){return e instanceof Error?e.stack??String(e):String(e)}function y2(e,t){let n=[],i=Math.max(e.length,t.length);for(let r=0;r<i;++r)n[r]=Math.max(e[r],t[r]);return n}function su(e,t){if(e.length===0)return[];let n=Array(Math.max(...e.map(r=>r.length))).fill(0,0),i=e.reduce((r,s)=>{let c=s.map(u=>u.length);return y2(r,c)},n);return e.map(r=>{let s=(r[0]??"").padEnd(i[0]);return r.slice(1).reduce((c,u,p,f)=>{let v=f.length===p+1?u:u.padEnd(i[p+1]);return[...c,t?.[p]??" ",v]},[s]).join("").trimEnd()})}function gh(e,t){if(e.length<=1)return e[0]??"";if(e.length===2)return e.join(` ${t.conjunction} `);let n=e.slice(0,e.length-1).join(", ");return t.serialComma&&(n+=","),[n,t.conjunction,e[e.length-1]].join(" ")}function b2(e,t){return e.reduce((n,i)=>{let r=t(i),s=n[r]??[];return s.push(i),n[r]=s,n},{})}function x2(e,t){return b2(e,n=>n[t])}async function dh(e){let t=await Promise.allSettled(e),n=x2(t,"status");return n.rejected&&n.rejected.length>0?{status:"rejected",reasons:n.rejected.map(i=>i.reason)}:{status:"fulfilled",value:n.fulfilled?.map(i=>i.value)??[]}}var w2=new Set(["true","t","yes","y","on","1"]),k2=new Set(["false","f","no","n","off","0"]),$2=e=>{let t=e.toLowerCase();if(w2.has(t))return!0;if(k2.has(t))return!1;throw new SyntaxError(`Cannot convert ${e} to a boolean`)},S2=e=>{let t=Number(e);if(Number.isNaN(t))throw new SyntaxError(`Cannot convert ${e} to a number`);return t},$n=class extends fr{_brand};function I2(e,t){let n=e.constructor.name,i=t[n];return i?i(e):e.message}function T2(e,t,n){return Object.fromEntries(Object.entries(t).map(([i,r])=>{let s=r,c=e[s];if(!c){let u=Mn(s,n);throw new iu(u,[],i)}return[i,[s,c]]}))}var iu=class extends $n{input;corrections;aliasName;constructor(e,t,n){let i=`No flag registered for --${e}`;if(n)i+=` (aliased from -${n})`;else if(t.length>0){let r=gh(t.map(s=>`--${s}`),{kind:"conjunctive",conjunction:"or",serialComma:!0});i+=`, did you mean ${r}?`}super(i),this.input=e,this.corrections=t,this.aliasName=n}},_h=class extends $n{input;constructor(e){super(`No alias registered for -${e}`),this.input=e}};function ph(e,t){return e.placeholder?e.placeholder:typeof t=="number"?`arg${t}`:"args"}function Mn(e,t){return t==="allow-kebab-for-camel"?kn(e):e}var hh=class extends $n{externalFlagNameOrPlaceholder;input;exception;constructor(e,t,n){super(`Failed to parse "${t}" for ${e}: ${n instanceof Error?n.message:String(n)}`),this.externalFlagNameOrPlaceholder=e,this.input=t,this.exception=n}};function Xo(e,t,n,i){try{return t.parse.call(i,n)}catch(r){throw new hh(e,n,r)}}var Yw=class extends $n{externalFlagName;input;values;constructor(e,t,n,i){let r=`Expected "${t}" to be one of (${n.join("|")})`;if(i.length>0){let s=gh(i.map(c=>`"${c}"`),{kind:"conjunctive",conjunction:"or",serialComma:!0});r+=`, did you mean ${s}?`}super(r),this.externalFlagName=e,this.input=t,this.values=n}},Ho=class extends $n{externalFlagName;nextFlagName;constructor(e,t){let n=`Expected input for flag --${e}`;t&&(n+=` but encountered --${t} instead`),super(n),this.externalFlagName=e,this.nextFlagName=t}},Qw=class extends $n{expectedCount;input;constructor(e,t){super(`Too many arguments, expected ${e} but encountered "${t}"`),this.expectedCount=e,this.input=t}},ek=class extends $n{placeholder;limit;constructor(e,t){let n;t?(n=`Expected at least ${t[0]} argument(s) for ${e}`,t[1]===0?n+=" but found none":n+=` but only found ${t[1]}`):n=`Expected argument for ${e}`,super(n),this.placeholder=e,this.limit=t}};function tk(e){if(e.startsWith("no")&&e.length>2){if(e[2]==="-")return e.slice(4);let t=e[2],n=t.toUpperCase();return t!==n?void 0:t.toLowerCase()+e.slice(3)}}function ak(e,t,n){let i=e,r=t[i];if(!r){let c=tk(i);if(c&&(r=t[c],r&&r.kind=="boolean"))return{namedFlag:[c,r],negated:!0}}let s=mh(e);if(n.caseStyle==="allow-kebab-for-camel"&&!r){if(r=t[s],r)return{namedFlag:[s,r]};let c=tk(s);if(c&&(r=t[c],r&&r.kind=="boolean"))return{namedFlag:[c,r],negated:!0}}if(!r){if(s in t)throw new iu(e,[s]);let c=kn(e);if(c in t)throw new iu(e,[c]);let u=ou(i,Object.keys(t),n.distanceOptions);throw new iu(e,u)}return{namedFlag:[i,r]}}function rk(e){return e.namedFlag[1].kind==="boolean"||e.namedFlag[1].kind==="counter"}var ck=/^-([a-z]+)$/i,E2=/^--([a-z][a-z-.\d_]+)$/i;function A2(e,t,n,i){let r=ck.exec(e);if(r){let c=r[1];return Array.from(c).map(u=>{let p=u,f=n[p];if(!f)throw new _h(p);return{namedFlag:f}})}let s=E2.exec(e);if(s){let c=s[1];return[ak(c,t,i)]}return[]}var P2=/^--([a-z][a-z-.\d_]+)=(.+)$/i,C2=/^-([a-z])=(.+)$/i,O2=class extends $n{externalFlagName;valueText;constructor(e,t){super(`Cannot negate flag --${e} and pass "${t}" as value`),this.externalFlagName=e,this.valueText=t}};function U2(e,t,n,i){let r=P2.exec(e);if(r){let c=r[1],{namedFlag:u,negated:p}=ak(c,t,i),f=r[2];if(p)throw new O2(c,f);return[u,f]}let s=C2.exec(e);if(s){let c=s[1],u=n[c];if(!u)throw new _h(c);let p=s[2];return[u,p]}}async function z2(e,t,n,i,r){if(!n){if("default"in t&&typeof t.default<"u")return t.kind==="boolean"||t.kind==="enum"?t.default:Xo(e,t,t.default,r);if(t.optional)return;if(t.kind==="boolean")return!1;if(t.kind==="counter")return 0;throw new Ho(e)}if(t.kind==="counter")return n.reduce((c,u)=>{try{return c+S2.call(r,u)}catch(p){throw new hh(e,u,p)}},0);if("variadic"in t&&t.variadic){if(t.kind==="enum"){for(let c of n)if(!t.values.includes(c)){let u=ou(c,t.values,i.distanceOptions);throw new Yw(e,c,t.values,u)}return n}return Promise.all(n.map(c=>Xo(e,t,c,r)))}let s=n[0];if(t.kind==="boolean")try{return $2.call(r,s)}catch(c){throw new hh(e,s,c)}if(t.kind==="enum"){if(!t.values.includes(s)){let c=ou(s,t.values,i.distanceOptions);throw new Yw(e,s,t.values,c)}return s}return Xo(e,t,s,r)}var N2=class extends $n{externalFlagName;previousInput;input;constructor(e,t,n){super(`Too many arguments for --${e}, encountered "${n}" after "${t}"`),this.externalFlagName=e,this.previousInput=t,this.input=n}};function lk(e){return e.kind==="counter"?!0:"variadic"in e?!!e.variadic:!1}function Fn(e,t,[n,i],r){let s=e.get(n)??[];if(s.length>0&&!lk(i)){let c=Mn(n,t);throw new N2(c,s[0],r)}if("variadic"in i&&typeof i.variadic=="string"){let c=r.split(i.variadic);e.set(n,[...s,...c])}else e.set(n,[...s,r])}function fh(e,t,n){if(t.get(n)){let i=e[n];return!lk(i)}return!1}function R2(e,t){let{flags:n={},aliases:i={},positional:r={kind:"tuple",parameters:[]}}=e,s=T2(n,i,t.caseStyle),c=[],u=new Map,p=0,f,v=!1;return{next:y=>{if(!v&&t.allowArgumentEscapeSequence&&y==="--"){if(f)if(f[1].kind==="parsed"&&f[1].inferEmpty)Fn(u,t.caseStyle,f,""),f=void 0;else{let k=Mn(f[0],t.caseStyle);throw new Ho(k)}v=!0;return}if(!v){let k=U2(y,n,s,t);if(k){if(f)if(f[1].kind==="parsed"&&f[1].inferEmpty)Fn(u,t.caseStyle,f,""),f=void 0;else{let $=Mn(f[0],t.caseStyle),O=Mn(k[0][0],t.caseStyle);throw new Ho($,O)}Fn(u,t.caseStyle,...k);return}let I=A2(y,n,s,t);if(I.length>0){if(f)if(f[1].kind==="parsed"&&f[1].inferEmpty)Fn(u,t.caseStyle,f,""),f=void 0;else{let $=Mn(f[0],t.caseStyle),O=Mn(I[0].namedFlag[0],t.caseStyle);throw new Ho($,O)}if(I.every(rk))for(let $ of I)$.namedFlag[1].kind==="boolean"?Fn(u,t.caseStyle,$.namedFlag,$.negated?"false":"true"):Fn(u,t.caseStyle,$.namedFlag,"1");else if(I.length>1){let $=I.find(F=>!rk(F)),O=Mn($.namedFlag[0],t.caseStyle);throw new Ho(O)}else f=I[0].namedFlag;return}}if(f)Fn(u,t.caseStyle,f,y),f=void 0;else{if(r.kind==="tuple"){if(p>=r.parameters.length)throw new Qw(r.parameters.length,y)}else if(typeof r.maximum=="number"&&p>=r.maximum)throw new Qw(r.maximum,y);c[p]=y,++p}},parseArguments:async y=>{let k=[],I;r.kind==="array"?(typeof r.minimum=="number"&&p<r.minimum&&k.push(new ek(ph(r.parameter),[r.minimum,p])),I=dh(c.map(async(Z,M)=>{let H=ph(r.parameter,M+1);return Xo(H,r.parameter,Z,y)}))):I=dh(r.parameters.map(async(Z,M)=>{let H=ph(Z,M+1),W=c[M];if(typeof W!="string"){if(typeof Z.default=="string")return Xo(H,Z,Z.default,y);if(Z.optional)return;throw new ek(H)}return Xo(H,Z,W,y)})),f&&f[1].kind==="parsed"&&f[1].inferEmpty&&(Fn(u,t.caseStyle,f,""),f=void 0);let $=dh(Object.entries(n).map(async Z=>{let[M,H]=Z,W=Mn(M,t.caseStyle);if(f&&f[0]===M)throw new Ho(W);let ee=u.get(M),fe=await z2(W,H,ee,t,y);return[M,fe]})),[O,F]=await Promise.all([I,$]);if(O.status==="rejected")for(let Z of O.reasons)k.push(Z);if(F.status==="rejected")for(let Z of F.reasons)k.push(Z);if(k.length>0)return{success:!1,errors:k};if(O.status==="rejected")throw new fr("Unknown failure while scanning positional arguments");if(F.status==="rejected")throw new fr("Unknown failure while scanning flag arguments");return{success:!0,arguments:[Object.fromEntries(F.value),...O.value]}},proposeCompletions:async({partial:y,completionConfig:k,text:I,context:$,includeVersionFlag:O})=>{if(f)return uk(f[1],$,y);let F=[];if(!v){let Z=ck.exec(y);if(k.includeAliases){if(y===""||y==="-"){let M=Object.entries(i).filter(H=>!fh(n,u,H[1]));for(let[H]of M){let W=s[H];W&&F.push({kind:"argument:flag",completion:`-${H}`,brief:W[1].brief})}}else if(Z){let M=Array.from(Z[1]);if(M.includes("h"))return[];if(O&&M.includes("v"))return[];let H=new Map(u);for(let fe of M){let Y=s[fe];if(!Y)throw new _h(fe);Fn(H,t.caseStyle,Y,Y[1].kind==="boolean"?"true":"1")}let W=M[M.length-1];if(W){let fe=s[W];fe&&F.push({kind:"argument:flag",completion:y,brief:fe[1].brief})}let ee=Object.entries(i).filter(fe=>!fh(n,H,fe[1]));for(let[fe]of ee){let Y=s[fe];Y&&F.push({kind:"argument:flag",completion:`${y}${fe}`,brief:Y[1].brief})}}}if(y===""||y==="-"||y.startsWith("--")){t.allowArgumentEscapeSequence&&F.push({kind:"argument:flag",completion:"--",brief:I.briefs.argumentEscapeSequence});let M=Object.entries(n).filter(([W])=>!fh(n,u,W));t.caseStyle==="allow-kebab-for-camel"&&(M=M.map(([W,ee])=>[kn(W),ee]));let H=M.map(([W,ee])=>[`--${W}`,ee]).filter(([W])=>W.startsWith(y));F.push(...H.map(([W,ee])=>({kind:"argument:flag",completion:W,brief:ee.brief})))}}if(r.kind==="array"){if(r.parameter.proposeCompletions&&(typeof r.maximum!="number"||p<r.maximum)){let Z=await r.parameter.proposeCompletions.call($,y);F.push(...Z.map(M=>({kind:"argument:value",completion:M,brief:r.parameter.brief})))}}else{let Z=r.parameters[p];if(Z?.proposeCompletions){let M=await Z.proposeCompletions.call($,y);F.push(...M.map(H=>({kind:"argument:value",completion:H,brief:Z.brief})))}}return F.filter(({completion:Z})=>Z.startsWith(y))}}}async function uk(e,t,n){if(typeof e.variadic=="string"&&n.endsWith(e.variadic))return uk(e,t,"");let i;return e.kind==="enum"?i=e.values:e.proposeCompletions?i=await e.proposeCompletions.call(t,n):i=[],i.map(r=>({kind:"argument:value",completion:r,brief:e.brief})).filter(({completion:r})=>r.startsWith(n))}function D2(e,t,n){let i=t==="allow-kebab-for-camel"?"convert-camel-to-kebab":t,r=e.getAllEntries();return n.includeHiddenRoutes||(r=r.filter(s=>!s.hidden)),r.flatMap(s=>{let c=s.name[i];return n.includeAliases?[c,...s.aliases]:[c]})}var j2={headers:{usage:"USAGE",aliases:"ALIASES",commands:"COMMANDS",flags:"FLAGS",arguments:"ARGUMENTS"},keywords:{default:"default =",separator:"separator ="},briefs:{help:"Print help information and exit",helpAll:"Print help information (including hidden commands/flags) and exit",version:"Print version information and exit",argumentEscapeSequence:"All subsequent inputs should be interpreted as arguments"},noCommandRegisteredForInput:({input:e,corrections:t})=>{let n=`No command registered for \`${e}\``;if(t.length>0){let i=gh(t,{kind:"conjunctive",conjunction:"or",serialComma:!0});return`${n}, did you mean ${i}?`}else return n},noTextAvailableForLocale:({requestedLocale:e,defaultLocale:t})=>`Application does not support "${e}" locale, defaulting to "${t}"`,exceptionWhileParsingArguments:e=>e instanceof $n?I2(e,{}):`Unable to parse arguments, ${nu(e)}`,exceptionWhileLoadingCommandFunction:e=>`Unable to load command function, ${nu(e)}`,exceptionWhileLoadingCommandContext:e=>`Unable to load command context, ${nu(e)}`,exceptionWhileRunningCommand:e=>`Command failed, ${nu(e)}`,commandErrorResult:e=>e.message,currentVersionIsNotLatest:({currentVersion:e,latestVersion:t,upgradeCommand:n})=>n?`Latest available version is ${t} (currently running ${e}), upgrade with "${n}"`:`Latest available version is ${t} (currently running ${e})`};function L2(e){if(e.startsWith("en"))return j2}function wn(e,t,n){return!n.disableAnsiColor&&!sk(e,"STRICLI_NO_COLOR")&&(t.getColorDepth?.(e.env)??1)>=4}async function F2({loader:e,parameters:t},{context:n,inputs:i,scannerConfig:r,errorFormatting:s,documentationConfig:c,determineExitCode:u}){let p=e(),f;try{let y=R2(t,r);for(let I of i)y.next(I);let k=await y.parseArguments(n);if(k.success)f=k.arguments;else{let I=wn(n.process,n.process.stderr,c);for(let $ of k.errors){let O=s.exceptionWhileParsingArguments($,I);n.process.stderr.write(I?`\x1B[1m\x1B[31m${O}\x1B[39m\x1B[22m
|
|
389
|
-
`:`${O}
|
|
390
|
-
`)}return xn.InvalidArgument}}catch(y){let k=wn(n.process,n.process.stderr,c),I=s.exceptionWhileParsingArguments(y,k);return n.process.stderr.write(k?`\x1B[1m\x1B[31m${I}\x1B[39m\x1B[22m
|
|
391
|
-
`:`${I}
|
|
392
|
-
`),xn.InvalidArgument}let v;try{let y=await p;typeof y=="function"?v=y:v=y.default}catch(y){let k=wn(n.process,n.process.stderr,c),I=s.exceptionWhileLoadingCommandFunction(y,k);return n.process.stderr.write(k?`\x1B[1m\x1B[31m${I}\x1B[39m\x1B[22m
|
|
393
|
-
`:`${I}
|
|
394
|
-
`),xn.CommandLoadError}try{let y=await v.call(n,...f);if(y instanceof Error){let k=wn(n.process,n.process.stderr,c),I=s.commandErrorResult(y,k);return n.process.stderr.write(k?`\x1B[1m\x1B[31m${I}\x1B[39m\x1B[22m
|
|
395
|
-
`:`${I}
|
|
396
|
-
`),u?u(y):xn.CommandRunError}}catch(y){let k=wn(n.process,n.process.stderr,c),I=s.exceptionWhileRunningCommand(y,k);return n.process.stderr.write(k?`\x1B[1m\x1B[31m${I}\x1B[39m\x1B[22m
|
|
397
|
-
`:`${I}
|
|
398
|
-
`),u?u(y):xn.CommandRunError}return xn.Success}var au=Symbol("RouteMap"),vh=Symbol("Command");function M2(e,t,n){let i=[...n],r=[],s,c=e,u,p=!0,f=!1;return{next:v=>{if(v==="--help"||v==="-h"){f=!0,u||(u=c);return}else if(v==="--helpAll"||v==="--help-all"||v==="-H"){f="all",u||(u=c);return}if(u){r.push(v);return}if(c.kind===vh){u=c,r.push(v);return}let y=mh(v),k=v,I=c.getRoutingTargetForInput(k);if(t.caseStyle==="allow-kebab-for-camel"&&!I&&(I=c.getRoutingTargetForInput(y),I&&(k=y)),!I){let $=c.getDefaultCommand();if($){p=!1,s=[c,""],r.push(v),c=$;return}return{input:v,routeMap:c}}p=!1,s=[c,v],c=I,i.push(v)},finish:()=>{if(u=u??c,u.kind===au&&!f){let y=u.getDefaultCommand();y&&(s=[u,""],u=y,p=!1)}let v=s?s[0].getOtherAliasesForInput(s[1],t.caseStyle):{original:[],"convert-camel-to-kebab":[]};return{target:u,unprocessedInputs:r,helpRequested:f,prefix:i,rootLevel:p,aliases:v}}}}async function B2({root:e,defaultText:t,config:n},i,r){let s=t;if(r.locale){let y=n.localization.loadText(r.locale);if(y)s=y;else{let k=wn(r.process,r.process.stderr,n.documentation),I=s.noTextAvailableForLocale({requestedLocale:r.locale,defaultLocale:n.localization.defaultLocale,ansiColor:k});r.process.stderr.write(k?`\x1B[1m\x1B[33m${I}\x1B[39m\x1B[22m
|
|
399
|
-
`:`${I}
|
|
400
|
-
`)}}if(n.versionInfo?.getLatestVersion&&!sk(r.process,"STRICLI_SKIP_VERSION_CHECK")){let y;"currentVersion"in n.versionInfo?y=n.versionInfo.currentVersion:y=await n.versionInfo.getCurrentVersion.call(r);let k=await n.versionInfo.getLatestVersion.call(r,y);if(k&&y!==k){let I=wn(r.process,r.process.stderr,n.documentation),$=s.currentVersionIsNotLatest({currentVersion:y,latestVersion:k,upgradeCommand:n.versionInfo.upgradeCommand,ansiColor:I});r.process.stderr.write(I?`\x1B[1m\x1B[33m${$}\x1B[39m\x1B[22m
|
|
401
|
-
`:`${$}
|
|
402
|
-
`)}}let c=i.slice();if(n.versionInfo&&(c[0]==="--version"||c[0]==="-v")){let y;return"currentVersion"in n.versionInfo?y=n.versionInfo.currentVersion:y=await n.versionInfo.getCurrentVersion.call(r),r.process.stdout.write(y+`
|
|
403
|
-
`),xn.Success}let u=M2(e,n.scanner,[n.name]),p;for(;c.length>0&&!p;){let y=c.shift();p=u.next(y)}if(p){let y=D2(p.routeMap,n.scanner.caseStyle,n.completion),k=ou(p.input,y,n.scanner.distanceOptions).map(O=>`\`${O}\``),I=wn(r.process,r.process.stderr,n.documentation),$=s.noCommandRegisteredForInput({input:p.input,corrections:k,ansiColor:I});return r.process.stderr.write(I?`\x1B[1m\x1B[31m${$}\x1B[39m\x1B[22m
|
|
404
|
-
`:`${$}
|
|
405
|
-
`),xn.UnknownCommand}let f=u.finish();if(f.helpRequested||f.target.kind===au){let y=wn(r.process,r.process.stdout,n.documentation);return r.process.stdout.write(f.target.formatHelp({prefix:f.prefix,includeVersionFlag:!!n.versionInfo&&f.rootLevel,includeArgumentEscapeSequenceFlag:n.scanner.allowArgumentEscapeSequence,includeHelpAllFlag:f.helpRequested==="all"||n.documentation.alwaysShowHelpAllFlag,includeHidden:f.helpRequested==="all",config:n.documentation,aliases:f.aliases[n.documentation.caseStyle],text:s,ansiColor:y})),xn.Success}let v;if("forCommand"in r)try{v=await r.forCommand({prefix:f.prefix})}catch(y){let k=wn(r.process,r.process.stderr,n.documentation),I=s.exceptionWhileLoadingCommandContext(y,k);return r.process.stderr.write(k?`\x1B[1m\x1B[31m${I}\x1B[39m\x1B[22m`:I),xn.ContextLoadError}else v=r;return F2(f.target,{context:v,inputs:f.unprocessedInputs,scannerConfig:n.scanner,documentationConfig:n.documentation,errorFormatting:s,determineExitCode:n.determineExitCode})}function cu(e,t){return t==="convert-camel-to-kebab"?kn(e):e}function Z2(e,t){return t==="convert-camel-to-kebab"?`no-${kn(e)}`:`no${e[0].toUpperCase()}${e.slice(1)}`}function W2(e){let t=e.scanner?.caseStyle??"original",n;if(e.documentation?.caseStyle){if(t==="original"&&e.documentation.caseStyle==="convert-camel-to-kebab")throw new fr("Cannot convert route and flag names on display but scan as original");n=e.documentation.caseStyle}else t==="allow-kebab-for-camel"?n="convert-camel-to-kebab":n=t;let i={caseStyle:t,allowArgumentEscapeSequence:e.scanner?.allowArgumentEscapeSequence??!1,distanceOptions:e.scanner?.distanceOptions??{threshold:7,weights:{insertion:1,deletion:3,substitution:2,transposition:0}}},r={alwaysShowHelpAllFlag:e.documentation?.alwaysShowHelpAllFlag??!1,useAliasInUsageLine:e.documentation?.useAliasInUsageLine??!1,onlyRequiredInUsageLine:e.documentation?.onlyRequiredInUsageLine??!1,caseStyle:n,disableAnsiColor:e.documentation?.disableAnsiColor??!1},s={includeAliases:e.completion?.includeAliases??r.useAliasInUsageLine,includeHiddenRoutes:e.completion?.includeHiddenRoutes??!1,...e.completion};return{...e,scanner:i,completion:s,documentation:r,localization:{defaultLocale:"en",loadText:L2,...e.localization}}}function dk(e,t){let n=W2(t);if(e.kind===vh&&n.versionInfo){if(e.usesFlag("version"))throw new fr("Unable to use command with flag --version as root when version info is supplied");if(e.usesFlag("v"))throw new fr("Unable to use command with alias -v as root when version info is supplied")}let i=n.localization.loadText(n.localization.defaultLocale);if(!i)throw new fr(`No text available for the default locale "${n.localization.defaultLocale}"`);return{root:e,config:n,defaultText:i}}function pk(e){return"default"in e&&typeof e.default<"u"}function Aa(e){return e.optional??pk(e)}function nk(e){return`(${e})`}function ik(e){return`[${e}]`}function ok(e){return`${e}...`}function V2(e){return`<${e}>`}function q2(e){return`[<${e}>]`}function J2(e){return`<${e}>...`}function fk(e,t){let n=Object.entries(e.flags??{}).filter(([,s])=>!(s.hidden||t.config.onlyRequiredInUsageLine&&Aa(s))).map(([s,c])=>{let u=t.config.caseStyle==="convert-camel-to-kebab"?`--${kn(s)}`:`--${s}`;if(e.aliases&&t.config.useAliasInUsageLine){let f=Object.entries(e.aliases).filter(v=>v[1]===s);f.length===1&&f[0]&&(u=`-${f[0][0]}`)}if(c.kind==="boolean")return[c,u];if(c.kind==="enum"&&typeof c.placeholder!="string")return[c,`${u} ${c.values.join("|")}`];let p=c.placeholder??"value";return[c,`${u} ${p}`]}).map(([s,c])=>s.kind==="parsed"&&s.variadic?Aa(s)?ok(ik(c)):ok(nk(c)):Aa(s)?ik(c):nk(c)),i=[],r=e.positional;if(r)if(r.kind==="array")i=[J2(r.parameter.placeholder??"args")];else{let s=r.parameters;t.config.onlyRequiredInUsageLine&&(s=s.filter(c=>!c.optional&&typeof c.default>"u")),i=s.map((c,u)=>{let p=c.placeholder??`arg${u+1}`;return c.optional||typeof c.default<"u"?q2(p):V2(p)})}return[...t.prefix,...n,...i].join(" ")}function hk(e,t,n){let{keywords:i,briefs:r}=n.text,s=Object.entries(e).filter(([,p])=>!(p.hidden&&!n.includeHidden)),c=s.some(([,p])=>Aa(p)),u=s.map(([p,f])=>{let v=Object.entries(t).filter($=>$[1]===p).map(([$])=>`-${$}`),y="--"+cu(p,n.config.caseStyle);if(f.kind==="boolean"&&f.default!==!1){let $=Z2(p,n.config.caseStyle);y=`${y}/--${$}`}Aa(f)?y=`[${y}]`:c&&(y=` ${y}`),f.kind==="parsed"&&f.variadic&&(y=`${y}...`);let k=[];if(f.kind==="enum"){let $=f.values.join("|");k.push($)}if(pk(f)){let $=n.ansiColor?`\x1B[90m${i.default}\x1B[39m`:i.default;k.push(`${$} ${f.default===""?'""':String(f.default)}`)}if("variadic"in f&&typeof f.variadic=="string"){let $=n.ansiColor?`\x1B[90m${i.separator}\x1B[39m`:i.separator;k.push(`${$} ${f.variadic}`)}let I=k.length>0?`[${k.join(", ")}]`:void 0;return{aliases:v.join(" "),flagName:y,brief:f.brief,suffix:I,hidden:f.hidden}});if(u.push({aliases:"-h",flagName:c?" --help":"--help",brief:r.help}),n.includeHelpAllFlag){let p=cu("helpAll",n.config.caseStyle);u.push({aliases:"-H",flagName:c?` --${p}`:`--${p}`,brief:r.helpAll,hidden:!n.config.alwaysShowHelpAllFlag})}return n.includeVersionFlag&&u.push({aliases:"-v",flagName:c?" --version":"--version",brief:r.version}),n.includeArgumentEscapeSequenceFlag&&u.push({aliases:"",flagName:c?" --":"--",brief:r.argumentEscapeSequence}),su(u.map(p=>n.ansiColor?[p.hidden?`\x1B[90m${p.aliases}\x1B[39m`:`\x1B[97m${p.aliases}\x1B[39m`,p.hidden?`\x1B[90m${p.flagName}\x1B[39m`:`\x1B[97m${p.flagName}\x1B[39m`,p.hidden?`\x1B[90m${p.brief}\x1B[39m`:`\x1B[03m${p.brief}\x1B[23m`,p.suffix??""]:[p.aliases,p.flagName,p.brief,p.suffix??""]),[" "," "," "])}function*mk(e){if(yield e.config.useAliasInUsageLine?"-h":"--help",e.includeHelpAllFlag){let t=cu("helpAll",e.config.caseStyle);yield e.config.useAliasInUsageLine?"-H":`--${t}`}e.includeVersionFlag&&(yield e.config.useAliasInUsageLine?"-v":"--version")}function K2(e,t){if(e.kind==="array"){let r=e.parameter.placeholder??"args",s=t.ansiColor?`\x1B[97m${r}...\x1B[39m`:`${r}...`,c=t.ansiColor?`\x1B[3m${e.parameter.brief}\x1B[23m`:e.parameter.brief;return su([[s,c]],[" "])}let{keywords:n}=t.text,i=e.parameters.some(r=>r.optional);return su(e.parameters.map((r,s)=>{let c=r.placeholder??`arg${s+1}`,u;return r.optional?c=`[${c}]`:i&&(c=` ${c}`),r.default&&(u=`[${t.ansiColor?`\x1B[90m${n.default}\x1B[39m`:n.default} ${r.default}]`),[t.ansiColor?`\x1B[97m${c}\x1B[39m`:c,t.ansiColor?`\x1B[3m${r.brief}\x1B[23m`:r.brief,u??""]}),[" "," "])}function*G2(e,t,n){let{brief:i,fullDescription:r,customUsage:s}=t,{headers:c}=n.text,u=n.prefix.join(" ");if(yield n.ansiColor?`\x1B[1m${c.usage}\x1B[22m`:c.usage,s)for(let f of s)if(typeof f=="string")yield` ${u} ${f}`;else{let v=n.ansiColor?`\x1B[3m${f.brief}\x1B[23m`:f.brief;yield` ${u} ${f.input}
|
|
406
|
-
${v}`}else yield` ${fk(e,n)}`;for(let f of mk(n))yield` ${u} ${f}`;if(yield"",yield r??i,n.aliases&&n.aliases.length>0){let f=n.prefix.slice(0,-1).join(" ");yield"",yield n.ansiColor?`\x1B[1m${c.aliases}\x1B[22m`:c.aliases;for(let v of n.aliases)yield` ${f} ${v}`}yield"",yield n.ansiColor?`\x1B[1m${c.flags}\x1B[22m`:c.flags;for(let f of hk(e.flags??{},e.aliases??{},n))yield` ${f}`;let p=e.positional??{kind:"tuple",parameters:[]};if(p.kind==="array"||p.parameters.length>0){yield"",yield n.ansiColor?`\x1B[1m${c.arguments}\x1B[22m`:c.arguments;for(let f of K2(p,n))yield` ${f}`}}function H2(e,t){for(let n of t)if(n in e)throw new fr(`Unable to use reserved flag --${n}`)}function X2(e,t){for(let n of t)if(n in e)throw new fr(`Unable to use reserved alias -${n}`)}function*Y2(e){yield`no-${kn(e)}`,yield`no${e[0].toUpperCase()}${e.slice(1)}`}function Q2(e){let t=Object.entries(e).filter(([,n])=>n.kind==="boolean"&&!n.optional);for(let[n]of t)for(let i of Y2(n))if(i in e)throw new fr(`Unable to allow negation for --${n} as it conflicts with --${i}`)}function eU(e){for(let[t,n]of Object.entries(e))if("variadic"in n&&typeof n.variadic=="string"){if(n.variadic.length<1)throw new fr(`Unable to use "" as variadic separator for --${t} as it is empty`);if(/\s/.test(n.variadic))throw new fr(`Unable to use "${n.variadic}" as variadic separator for --${t} as it contains whitespace`)}}function Zt(e){let{flags:t={},aliases:n={}}=e.parameters;H2(t,["help","helpAll","help-all"]),X2(n,["h","H"]),Q2(t),eU(t);let i;return"func"in e?i=async()=>e.func:i=e.loader,{kind:vh,loader:i,parameters:e.parameters,get brief(){return e.docs.brief},formatUsageLine:r=>fk(e.parameters,r),formatHelp:r=>[...G2(e.parameters,e.docs,r)].join(`
|
|
407
|
-
`)+`
|
|
408
|
-
`,usesFlag:r=>r in t||r in n}}function*tU(e,t,n){let{brief:i,fullDescription:r,hideRoute:s}=t,{headers:c}=n.text;yield n.ansiColor?`\x1B[1m${c.usage}\x1B[22m`:c.usage;for(let[v,y]of Object.entries(e))if(!s||!s[v]||n.includeHidden){let k=n.config.caseStyle==="convert-camel-to-kebab"?kn(v):v;yield` ${y.formatUsageLine({...n,prefix:[...n.prefix,k]})}`}let u=n.prefix.join(" ");for(let v of mk(n))yield` ${u} ${v}`;if(yield"",yield r??i,n.aliases&&n.aliases.length>0){let v=n.prefix.slice(0,-1).join(" ");yield"",yield n.ansiColor?`\x1B[1m${c.aliases}\x1B[22m`:c.aliases;for(let y of n.aliases)yield` ${v} ${y}`}yield"",yield n.ansiColor?`\x1B[1m${c.flags}\x1B[22m`:c.flags;for(let v of hk({},{},n))yield` ${v}`;yield"",yield n.ansiColor?`\x1B[1m${c.commands}\x1B[22m`:c.commands;let p=Object.entries(e).filter(([v])=>!s||!s[v]||n.includeHidden).map(([v,y])=>({routeName:cu(v,n.config.caseStyle),brief:y.brief,hidden:s&&s[v]})),f=su(p.map(v=>n.ansiColor?[v.hidden?`\x1B[90m${v.routeName}\x1B[39m`:`\x1B[97m${v.routeName}\x1B[39m`,v.hidden?`\x1B[90m${v.brief}\x1B[39m`:`\x1B[03m${v.brief}\x1B[23m`]:[v.routeName,v.brief]),[" "]);for(let v of f)yield` ${v}`}function Vr({routes:e,defaultCommand:t,docs:n,aliases:i}){if(Object.entries(e).length===0)throw new fr("Route map must contain at least one route");let r=i??{},s=new Map;for(let[p,f]of Object.entries(r)){if(p in e)throw new fr(`Cannot use "${p}" as an alias when a route with that name already exists`);let v=s.get(f)??[];s.set(f,[...v,p])}let c=t?e[t]:void 0;if(c&&c.kind===au)throw new fr(`Cannot use "${t}" as the default command because it is not a Command`);let u=p=>{if(p in r)return r[p];if(p in e)return p};return{kind:au,get brief(){return n.brief},formatUsageLine(p){let f=this.getAllEntries().filter(v=>!v.hidden).map(v=>v.name[p.config.caseStyle]);return`${p.prefix.join(" ")} ${f.join("|")} ...`},formatHelp:p=>[...tU(e,n,p)].join(`
|
|
409
|
-
`)+`
|
|
410
|
-
`,getDefaultCommand:()=>c,getOtherAliasesForInput:(p,f)=>{if(t){if(p===t)return{original:[""],"convert-camel-to-kebab":[""]};if(p==="")return{original:[t],"convert-camel-to-kebab":[t]}}let v=mh(p),y=u(p);if(!y&&f==="allow-kebab-for-camel"&&(y=u(v)),!y)return{original:[],"convert-camel-to-kebab":[]};let k=[y,...s.get(y)??[]].filter(I=>I!==p&&I!==v);return{original:k,"convert-camel-to-kebab":k.map(kn)}},getRoutingTargetForInput:p=>{let f=p in r?r[p]:p;return e[f]},getAllEntries(){let p=n.hideRoute;return Object.entries(e).map(([f,v])=>({name:{original:f,"convert-camel-to-kebab":kn(f)},target:v,aliases:s.get(f)??[],hidden:p?.[f]??!1}))}}}async function gk(e,t,n){let i=await B2(e,t,n);n.process.exitCode=i}g();g();var eD=Zt({loader:async()=>{let{login:e}=await Promise.resolve().then(()=>(RT(),NT));return e},parameters:{},docs:{brief:"Log in with an existing account"}}),tD=Zt({loader:async()=>{let{logout:e}=await Promise.resolve().then(()=>(FT(),LT));return e},parameters:{},docs:{brief:"Log out of an existing account"}}),MT=Vr({routes:{login:eD,logout:tD},docs:{brief:"Auth commands"}});g();var X3=Zt({loader:async()=>{let{configure:e}=await Promise.resolve().then(()=>(yC(),vC));return e},parameters:{},docs:{brief:"Configure application powered by Swirls"}}),Y3=Zt({loader:async()=>{let{generateCode:e}=await Promise.resolve().then(()=>(AC(),EC));return e},parameters:{},docs:{brief:"Generate application code and types"}}),PC=Vr({routes:{configure:X3,generate:Y3},docs:{brief:"Developer commands"},aliases:{config:"configure",gen:"generate"}});g();var n9=Zt({loader:async()=>{let{listApiKeys:e}=await Promise.resolve().then(()=>(OC(),CC));return e},parameters:{flags:{revoked:{kind:"boolean",brief:"Include revoked keys in the list",optional:!0}}},docs:{brief:"List API keys bound to the current user"}}),i9=Zt({loader:async()=>{let{createApiKey:e}=await Promise.resolve().then(()=>(LC(),jC));return e},parameters:{},docs:{brief:"Create a new API key bound to the current user (secret shown only once)"}}),o9=Zt({loader:async()=>{let{revokeApiKey:e}=await Promise.resolve().then(()=>(MC(),FC));return e},parameters:{},docs:{brief:"Revoke an API key (cannot be undone)"}}),BC=Vr({routes:{list:n9,create:i9,revoke:o9},docs:{brief:"API key commands"},aliases:{ls:"list"}});g();var c9=Zt({loader:async()=>{let{createProject:e}=await Promise.resolve().then(()=>(WC(),ZC));return e},parameters:{},docs:{brief:"Create a new project"}}),l9=Zt({loader:async()=>{let{listProjects:e}=await Promise.resolve().then(()=>(qC(),VC));return e},parameters:{},docs:{brief:"List all projects"}}),JC=Vr({routes:{list:l9,create:c9},docs:{brief:"Project commands"},aliases:{ls:"list"}});g();var y9=Zt({loader:async()=>{let{list:e}=await Promise.resolve().then(()=>(GC(),KC));return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to list (optional)",parse:String,placeholder:"path",optional:!0}]}},docs:{brief:"List files in storage"}}),b9=Zt({loader:async()=>{let{upload:e}=await Promise.resolve().then(()=>(XC(),HC));return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Local file path to upload",parse:String,placeholder:"file"},{brief:"Destination path in storage (optional)",parse:String,placeholder:"dest",optional:!0}]}},docs:{brief:"Upload a file to storage"}}),x9=Zt({loader:async()=>{let{download:e}=await Promise.resolve().then(()=>(QC(),YC));return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"},{brief:"Local destination path",parse:String,placeholder:"dest"}]}},docs:{brief:"Download a file from storage"}}),w9=Zt({loader:async()=>{let{deleteFile:e}=await Promise.resolve().then(()=>(tO(),eO));return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]}},docs:{brief:"Delete a file from storage"}}),k9=Zt({loader:async()=>{let{url:e}=await Promise.resolve().then(()=>(nO(),rO));return e},parameters:{positional:{kind:"tuple",parameters:[{brief:"Path to file in storage",parse:String,placeholder:"path"}]},flags:{expires:{kind:"parsed",brief:"Expiration time in seconds (default: 86400 = 24 hours)",parse:Number,optional:!0}}},docs:{brief:"Create a signed URL for a file"}}),iO=Vr({routes:{list:y9,upload:b9,download:x9,delete:w9,url:k9},docs:{brief:"Storage commands"},aliases:{ls:"list"}});var oO="@swirls/cli",sO="0.0.23",aO="Swirls command line application";var $9=Vr({routes:{auth:MT,dev:PC,key:BC,project:JC,storage:iO},docs:{brief:aO}}),cO=dk($9,{name:oO,versionInfo:{currentVersion:sO}});g();import S9 from"fs";import I9 from"fs/promises";import T9 from"os";import E9 from"path";function lO(e){return{fs:S9,fsPromise:I9,os:T9,path:E9,process:e}}await gk(cO,process.argv.slice(2),lO(process));
|