@webflow/webflow-cli 1.17.0 → 1.17.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/dist/index.js CHANGED
@@ -1,48 +1,48 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var sb=Object.create;var Ki=Object.defineProperty;var ab=Object.getOwnPropertyDescriptor;var lb=Object.getOwnPropertyNames;var cb=Object.getPrototypeOf,ub=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bc=(e,t)=>{for(var n in t)Ki(e,n,{get:t[n],enumerable:!0})},db=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lb(t))!ub.call(e,o)&&o!==n&&Ki(e,o,{get:()=>t[o],enumerable:!(r=ab(t,o))||r.enumerable});return e};var D=(e,t,n)=>(n=e!=null?sb(cb(e)):{},db(t||!e||!e.__esModule?Ki(n,"default",{value:e,enumerable:!0}):n,e));function mb(){let e=new Map;for(let[t,n]of Object.entries(ie)){for(let[r,o]of Object.entries(n))ie[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=ie[r],e.set(o[0],o[1]);Object.defineProperty(ie,t,{value:n,enumerable:!1})}return Object.defineProperty(ie,"codes",{value:e,enumerable:!1}),ie.color.close="\x1B[39m",ie.bgColor.close="\x1B[49m",ie.color.ansi=wc(),ie.color.ansi256=Dc(),ie.color.ansi16m=vc(),ie.bgColor.ansi=wc(10),ie.bgColor.ansi256=Dc(10),ie.bgColor.ansi16m=vc(10),Object.defineProperties(ie,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>ie.rgbToAnsi256(...ie.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(n,r,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>ie.ansi256ToAnsi(ie.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>ie.ansi256ToAnsi(ie.hexToAnsi256(t)),enumerable:!1}}),ie}var wc,Dc,vc,ie,E_,pb,fb,__,hb,We,kc=A(()=>{"use strict";wc=(e=0)=>t=>`\x1B[${t+e}m`,Dc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,vc=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,ie={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},E_=Object.keys(ie.modifier),pb=Object.keys(ie.color),fb=Object.keys(ie.bgColor),__=[...pb,...fb];hb=mb(),We=hb});function Ie(e,t=globalThis.Deno?globalThis.Deno.args:co.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}function gb(){if("FORCE_COLOR"in ce)return ce.FORCE_COLOR==="true"?1:ce.FORCE_COLOR==="false"?0:ce.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ce.FORCE_COLOR,10),3)}function yb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function bb(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=gb();r!==void 0&&(lo=r);let o=n?lo:r;if(o===0)return 0;if(n){if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2}if("TF_BUILD"in ce&&"AGENT_NAME"in ce)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(ce.TERM==="dumb")return i;if(co.default.platform==="win32"){let s=Cc.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ce)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ce)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ce)||ce.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ce)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ce.TEAMCITY_VERSION)?1:0;if(ce.COLORTERM==="truecolor"||ce.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ce){let s=Number.parseInt((ce.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ce.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ce.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ce.TERM)||"COLORTERM"in ce?1:i}function xc(e,t={}){let n=bb(e,{streamIsTTY:e&&e.isTTY,...t});return yb(n)}var co,Cc,Xi,ce,lo,wb,Fc,Ec=A(()=>{"use strict";co=D(require("process"),1),Cc=D(require("os"),1),Xi=D(require("tty"),1);({env:ce}=co.default);Ie("no-color")||Ie("no-colors")||Ie("color=false")||Ie("color=never")?lo=0:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(lo=1);wb={stdout:xc({isTTY:Xi.default.isatty(1)}),stderr:xc({isTTY:Xi.default.isatty(2)})},Fc=wb});function _c(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(r!==-1);return s+=e.slice(i),s}function Sc(e,t,n,r){let o=0,i="";do{let s=e[r-1]==="\r";i+=e.slice(o,s?r-1:r)+t+(s?`\r
2
+ "use strict";var lb=Object.create;var Ki=Object.defineProperty;var cb=Object.getOwnPropertyDescriptor;var ub=Object.getOwnPropertyNames;var db=Object.getPrototypeOf,pb=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wc=(e,t)=>{for(var n in t)Ki(e,n,{get:t[n],enumerable:!0})},fb=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ub(t))!pb.call(e,o)&&o!==n&&Ki(e,o,{get:()=>t[o],enumerable:!(r=cb(t,o))||r.enumerable});return e};var D=(e,t,n)=>(n=e!=null?lb(db(e)):{},fb(t||!e||!e.__esModule?Ki(n,"default",{value:e,enumerable:!0}):n,e));function gb(){let e=new Map;for(let[t,n]of Object.entries(ie)){for(let[r,o]of Object.entries(n))ie[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=ie[r],e.set(o[0],o[1]);Object.defineProperty(ie,t,{value:n,enumerable:!1})}return Object.defineProperty(ie,"codes",{value:e,enumerable:!1}),ie.color.close="\x1B[39m",ie.bgColor.close="\x1B[49m",ie.color.ansi=Dc(),ie.color.ansi256=vc(),ie.color.ansi16m=kc(),ie.bgColor.ansi=Dc(10),ie.bgColor.ansi256=vc(10),ie.bgColor.ansi16m=kc(10),Object.defineProperties(ie,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(i=>i+i).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>ie.rgbToAnsi256(...ie.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let a=t%36;n=Math.floor(t/36)/5,r=Math.floor(a/6)/5,o=a%6/5}let i=Math.max(n,r,o)*2;if(i===0)return 30;let s=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>ie.ansi256ToAnsi(ie.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>ie.ansi256ToAnsi(ie.hexToAnsi256(t)),enumerable:!1}}),ie}var Dc,vc,kc,ie,T_,mb,hb,A_,yb,Ue,xc=A(()=>{"use strict";Dc=(e=0)=>t=>`\x1B[${t+e}m`,vc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,kc=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,ie={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},T_=Object.keys(ie.modifier),mb=Object.keys(ie.color),hb=Object.keys(ie.bgColor),A_=[...mb,...hb];yb=gb(),Ue=yb});function Ie(e,t=globalThis.Deno?globalThis.Deno.args:co.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}function bb(){if("FORCE_COLOR"in ce)return ce.FORCE_COLOR==="true"?1:ce.FORCE_COLOR==="false"?0:ce.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ce.FORCE_COLOR,10),3)}function wb(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Db(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=bb();r!==void 0&&(lo=r);let o=n?lo:r;if(o===0)return 0;if(n){if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2}if("TF_BUILD"in ce&&"AGENT_NAME"in ce)return 1;if(e&&!t&&o===void 0)return 0;let i=o||0;if(ce.TERM==="dumb")return i;if(co.default.platform==="win32"){let s=Fc.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in ce)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in ce)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in ce)||ce.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in ce)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ce.TEAMCITY_VERSION)?1:0;if(ce.COLORTERM==="truecolor"||ce.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in ce){let s=Number.parseInt((ce.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ce.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ce.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ce.TERM)||"COLORTERM"in ce?1:i}function Cc(e,t={}){let n=Db(e,{streamIsTTY:e&&e.isTTY,...t});return wb(n)}var co,Fc,Xi,ce,lo,vb,Ec,_c=A(()=>{"use strict";co=D(require("process"),1),Fc=D(require("os"),1),Xi=D(require("tty"),1);({env:ce}=co.default);Ie("no-color")||Ie("no-colors")||Ie("color=false")||Ie("color=never")?lo=0:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(lo=1);vb={stdout:Cc({isTTY:Xi.default.isatty(1)}),stderr:Cc({isTTY:Xi.default.isatty(2)})},Ec=vb});function Sc(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let o=t.length,i=0,s="";do s+=e.slice(i,r)+t+n,i=r+o,r=e.indexOf(t,i);while(r!==-1);return s+=e.slice(i),s}function Tc(e,t,n,r){let o=0,i="";do{let s=e[r-1]==="\r";i+=e.slice(o,s?r-1:r)+t+(s?`\r
3
3
  `:`
4
4
  `)+n,o=r+1,r=e.indexOf(`
5
- `,o)}while(r!==-1);return i+=e.slice(o),i}var Tc=A(()=>{"use strict"});function gr(e){return vb(e)}var Ac,Oc,Qi,xn,hr,Ic,Cn,Db,vb,es,kb,xb,ts,uo,Cb,Fb,R_,E,Ee=A(()=>{"use strict";kc();Ec();Tc();({stdout:Ac,stderr:Oc}=Fc),Qi=Symbol("GENERATOR"),xn=Symbol("STYLER"),hr=Symbol("IS_EMPTY"),Ic=["ansi","ansi","ansi256","ansi16m"],Cn=Object.create(null),Db=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Ac?Ac.level:0;e.level=t.level===void 0?n:t.level},vb=e=>{let t=(...n)=>n.join(" ");return Db(t,e),Object.setPrototypeOf(t,gr.prototype),t};Object.setPrototypeOf(gr.prototype,Function.prototype);for(let[e,t]of Object.entries(We))Cn[e]={get(){let n=uo(this,ts(t.open,t.close,this[xn]),this[hr]);return Object.defineProperty(this,e,{value:n}),n}};Cn.visible={get(){let e=uo(this,this[xn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};es=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?We[n].ansi16m(...r):t==="ansi256"?We[n].ansi256(We.rgbToAnsi256(...r)):We[n].ansi(We.rgbToAnsi(...r)):e==="hex"?es("rgb",t,n,...We.hexToRgb(...r)):We[n][e](...r),kb=["rgb","hex","ansi256"];for(let e of kb){Cn[e]={get(){let{level:n}=this;return function(...r){let o=ts(es(e,Ic[n],"color",...r),We.color.close,this[xn]);return uo(this,o,this[hr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Cn[t]={get(){let{level:n}=this;return function(...r){let o=ts(es(e,Ic[n],"bgColor",...r),We.bgColor.close,this[xn]);return uo(this,o,this[hr])}}}}xb=Object.defineProperties(()=>{},{...Cn,level:{enumerable:!0,get(){return this[Qi].level},set(e){this[Qi].level=e}}}),ts=(e,t,n)=>{let r,o;return n===void 0?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},uo=(e,t,n)=>{let r=(...o)=>Cb(r,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(r,xb),r[Qi]=e,r[xn]=t,r[hr]=n,r},Cb=(e,t)=>{if(e.level<=0||!t)return e[hr]?"":t;let n=e[xn];if(n===void 0)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=_c(t,n.close,n.open),n=n.parent;let i=t.indexOf(`
6
- `);return i!==-1&&(t=Sc(t,o,r,i)),r+t+o};Object.defineProperties(gr.prototype,Cn);Fb=gr(),R_=gr({level:Oc?Oc.level:0}),E=Fb});function ns(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))Eb(e,t,o,n);return Sb(e,t),Ib(e,t,r),e}var Eb,_b,Sb,Tb,Ab,Ob,Ib,Pc=A(()=>{"use strict";Eb=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!_b(o,i)&&r||Object.defineProperty(e,n,i)},_b=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Sb=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Tb=(e,t)=>`/* Wrapped ${e}*/
7
- ${t}`,Ab=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ob=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ib=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=Tb.bind(null,r,t.toString());Object.defineProperty(o,"name",Ob);let{writable:i,enumerable:s,configurable:a}=Ab;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var po,Rc,jc,Bc=A(()=>{"use strict";Pc();po=new WeakMap,Rc=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(po.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return ns(i,e),po.set(i,r),i};Rc.callCount=e=>{if(!po.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return po.get(e)};jc=Rc});var Vt,$c=A(()=>{"use strict";Vt=[];Vt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Vt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Vt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var fo,rs,os,Pb,is,mo,Rb,ss,as,ls,Nc,z_,U_,Lc=A(()=>{"use strict";$c();fo=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",rs=Symbol.for("signal-exit emitter"),os=globalThis,Pb=Object.defineProperty.bind(Object),is=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(os[rs])return os[rs];Pb(os,rs,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}},mo=class{},Rb=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),ss=class extends mo{onExit(){return()=>{}}load(){}unload(){}},as=class extends mo{#s=ls.platform==="win32"?"SIGINT":"SIGHUP";#n=new is;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of Vt)this.#t[n]=()=>{let r=this.#e.listeners(n),{count:o}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,a)}};this.#p=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!fo(this.#e))return()=>{};this.#i===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,t),()=>{this.#n.removeListener(r,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of Vt)try{let n=this.#t[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#f(t,...n),this.#e.reallyExit=t=>this.#r(t)}}unload(){this.#i&&(this.#i=!1,Vt.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#p,this.#n.count-=1)}#r(t){return fo(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#p.call(this.#e,this.#e.exitCode)):0}#f(t,...n){let r=this.#o;if(t==="exit"&&fo(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let o=r.call(this.#e,t,...n);return this.#n.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}},ls=globalThis.process,{onExit:Nc,load:z_,unload:U_}=Rb(fo(ls)?new as(ls):new ss)});var yr,Mc,jb,zc,Uc=A(()=>{"use strict";yr=D(require("process"),1);Bc();Lc();Mc=yr.default.stderr.isTTY?yr.default.stderr:yr.default.stdout.isTTY?yr.default.stdout:void 0,jb=Mc?jc(()=>{Nc(()=>{Mc.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},zc=jb});var cs,ho,Fn,us,Wc=A(()=>{"use strict";cs=D(require("process"),1);Uc();ho=!1,Fn={};Fn.show=(e=cs.default.stderr)=>{e.isTTY&&(ho=!1,e.write("\x1B[?25h"))};Fn.hide=(e=cs.default.stderr)=>{e.isTTY&&(zc(),ho=!0,e.write("\x1B[?25l"))};Fn.toggle=(e,t)=>{e!==void 0&&(ho=e),ho?Fn.show(t):Fn.hide(t)};us=Fn});var Vc=Yi((Z_,Bb)=>{Bb.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var ds=Yi((K_,Gc)=>{"use strict";var go=Object.assign({},Vc()),qc=Object.keys(go);Object.defineProperty(go,"random",{get(){let e=Math.floor(Math.random()*qc.length),t=qc[e];return go[t]}});Gc.exports=go});function ps(){return Pe.default.platform!=="win32"?Pe.default.env.TERM!=="linux":!!Pe.default.env.CI||!!Pe.default.env.WT_SESSION||!!Pe.default.env.TERMINUS_SUBLIME||Pe.default.env.ConEmuTask==="{cmd::Cmder}"||Pe.default.env.TERM_PROGRAM==="Terminus-Sublime"||Pe.default.env.TERM_PROGRAM==="vscode"||Pe.default.env.TERM==="xterm-256color"||Pe.default.env.TERM==="alacritty"||Pe.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Pe,Jc=A(()=>{"use strict";Pe=D(require("process"),1)});var $b,Nb,Lb,br,Hc=A(()=>{"use strict";Ee();Jc();$b={info:E.blue("\u2139"),success:E.green("\u2714"),warning:E.yellow("\u26A0"),error:E.red("\u2716")},Nb={info:E.blue("i"),success:E.green("\u221A"),warning:E.yellow("\u203C"),error:E.red("\xD7")},Lb=ps()?$b:Nb,br=Lb});function fs({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var Zc=A(()=>{"use strict"});function wr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Mb,"")}var Mb,ms=A(()=>{"use strict";Zc();Mb=fs()});function Kc(e){return 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}function Yc(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Xc(e){return 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>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||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<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&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>=101631&&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>=119552&&e<=119638||e>=119648&&e<=119670||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<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Qc=A(()=>{"use strict"});function zb(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function eu(e,{ambiguousAsWide:t=!1}={}){return zb(e),Yc(e)||Xc(e)||t&&Kc(e)?2:1}var tu=A(()=>{"use strict";Qc()});var nu,ru=A(()=>{"use strict";nu=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function hs(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=wr(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of Ub.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!Wb.test(s)){if(nu().test(s)){o+=2;continue}o+=eu(a,i)}}return o}var Ub,Wb,ou=A(()=>{"use strict";ms();tu();ru();Ub=new Intl.Segmenter,Wb=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function gs({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var iu=A(()=>{"use strict"});function bs(){let{env:e}=ys.default,{TERM:t,TERM_PROGRAM:n}=e;return ys.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ys,su=A(()=>{"use strict";ys=D(require("process"),1)});var Ve,Vb,ws,qb,Ds,au=A(()=>{"use strict";Ve=D(require("process"),1),Vb=3,ws=class{#s=0;start(){this.#s++,this.#s===1&&this.#n()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#n(){Ve.default.platform==="win32"||!Ve.default.stdin.isTTY||(Ve.default.stdin.setRawMode(!0),Ve.default.stdin.on("data",this.#o),Ve.default.stdin.resume())}#e(){Ve.default.stdin.isTTY&&(Ve.default.stdin.off("data",this.#o),Ve.default.stdin.pause(),Ve.default.stdin.setRawMode(!1))}#o(t){t[0]===Vb&&Ve.default.emit("SIGINT")}},qb=new ws,Ds=qb});function En(e){return new vs(e)}var Dr,vr,Gb,vs,ks=A(()=>{"use strict";Dr=D(require("process"),1);Ee();Wc();vr=D(ds(),1);Hc();ms();ou();iu();su();au();Gb=D(ds(),1),vs=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#h;#c;#u;#d;#g;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:Dr.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:gs({stream:this.#r}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Dr.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(n){this.#s=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!bs())this.#i=vr.default.line;else if(t===void 0)this.#i=vr.default.dots;else if(t!=="default"&&vr.default[t])this.#i=vr.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#b(t=this.#l,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#m(){let t=this.#r.columns??80,n=this.#y(this.#a,"-"),r=this.#b(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#g+"--"+r;this.#e=0;for(let i of wr(o).split(`
5
+ `,o)}while(r!==-1);return i+=e.slice(o),i}var Ac=A(()=>{"use strict"});function gr(e){return xb(e)}var Oc,Ic,Qi,xn,hr,Pc,Cn,kb,xb,es,Cb,Fb,ts,uo,Eb,_b,$_,E,Ee=A(()=>{"use strict";xc();_c();Ac();({stdout:Oc,stderr:Ic}=Ec),Qi=Symbol("GENERATOR"),xn=Symbol("STYLER"),hr=Symbol("IS_EMPTY"),Pc=["ansi","ansi","ansi256","ansi16m"],Cn=Object.create(null),kb=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=Oc?Oc.level:0;e.level=t.level===void 0?n:t.level},xb=e=>{let t=(...n)=>n.join(" ");return kb(t,e),Object.setPrototypeOf(t,gr.prototype),t};Object.setPrototypeOf(gr.prototype,Function.prototype);for(let[e,t]of Object.entries(Ue))Cn[e]={get(){let n=uo(this,ts(t.open,t.close,this[xn]),this[hr]);return Object.defineProperty(this,e,{value:n}),n}};Cn.visible={get(){let e=uo(this,this[xn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};es=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?Ue[n].ansi16m(...r):t==="ansi256"?Ue[n].ansi256(Ue.rgbToAnsi256(...r)):Ue[n].ansi(Ue.rgbToAnsi(...r)):e==="hex"?es("rgb",t,n,...Ue.hexToRgb(...r)):Ue[n][e](...r),Cb=["rgb","hex","ansi256"];for(let e of Cb){Cn[e]={get(){let{level:n}=this;return function(...r){let o=ts(es(e,Pc[n],"color",...r),Ue.color.close,this[xn]);return uo(this,o,this[hr])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Cn[t]={get(){let{level:n}=this;return function(...r){let o=ts(es(e,Pc[n],"bgColor",...r),Ue.bgColor.close,this[xn]);return uo(this,o,this[hr])}}}}Fb=Object.defineProperties(()=>{},{...Cn,level:{enumerable:!0,get(){return this[Qi].level},set(e){this[Qi].level=e}}}),ts=(e,t,n)=>{let r,o;return n===void 0?(r=e,o=t):(r=n.openAll+e,o=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:o,parent:n}},uo=(e,t,n)=>{let r=(...o)=>Eb(r,o.length===1?""+o[0]:o.join(" "));return Object.setPrototypeOf(r,Fb),r[Qi]=e,r[xn]=t,r[hr]=n,r},Eb=(e,t)=>{if(e.level<=0||!t)return e[hr]?"":t;let n=e[xn];if(n===void 0)return t;let{openAll:r,closeAll:o}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=Sc(t,n.close,n.open),n=n.parent;let i=t.indexOf(`
6
+ `);return i!==-1&&(t=Tc(t,o,r,i)),r+t+o};Object.defineProperties(gr.prototype,Cn);_b=gr(),$_=gr({level:Ic?Ic.level:0}),E=_b});function ns(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))Sb(e,t,o,n);return Ab(e,t),Rb(e,t,r),e}var Sb,Tb,Ab,Ob,Ib,Pb,Rb,Rc=A(()=>{"use strict";Sb=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!Tb(o,i)&&r||Object.defineProperty(e,n,i)},Tb=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Ab=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Ob=(e,t)=>`/* Wrapped ${e}*/
7
+ ${t}`,Ib=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Pb=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Rb=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=Ob.bind(null,r,t.toString());Object.defineProperty(o,"name",Pb);let{writable:i,enumerable:s,configurable:a}=Ib;Object.defineProperty(e,"toString",{value:o,writable:i,enumerable:s,configurable:a})}});var po,jc,Bc,$c=A(()=>{"use strict";Rc();po=new WeakMap,jc=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(po.set(i,++r),r===1)n=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return ns(i,e),po.set(i,r),i};jc.callCount=e=>{if(!po.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return po.get(e)};Bc=jc});var Vt,Nc=A(()=>{"use strict";Vt=[];Vt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Vt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Vt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});var fo,rs,os,jb,is,mo,Bb,ss,as,ls,Lc,V_,q_,Mc=A(()=>{"use strict";Nc();fo=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",rs=Symbol.for("signal-exit emitter"),os=globalThis,jb=Object.defineProperty.bind(Object),is=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(os[rs])return os[rs];jb(os,rs,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let r=this.listeners[t],o=r.indexOf(n);o!==-1&&(o===0&&r.length===1?r.length=0:r.splice(o,1))}emit(t,n,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let o=!1;for(let i of this.listeners[t])o=i(n,r)===!0||o;return t==="exit"&&(o=this.emit("afterExit",n,r)||o),o}},mo=class{},Bb=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),ss=class extends mo{onExit(){return()=>{}}load(){}unload(){}},as=class extends mo{#s=ls.platform==="win32"?"SIGINT":"SIGHUP";#n=new is;#e;#o;#p;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let n of Vt)this.#t[n]=()=>{let r=this.#e.listeners(n),{count:o}=this.#n,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(o+=i.__signal_exit_emitter__.count),r.length===o){this.unload();let s=this.#n.emit("exit",null,n),a=n==="SIGHUP"?this.#s:n;s||t.kill(t.pid,a)}};this.#p=t.reallyExit,this.#o=t.emit}onExit(t,n){if(!fo(this.#e))return()=>{};this.#i===!1&&this.load();let r=n?.alwaysLast?"afterExit":"exit";return this.#n.on(r,t),()=>{this.#n.removeListener(r,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#n.count+=1;for(let t of Vt)try{let n=this.#t[t];n&&this.#e.on(t,n)}catch{}this.#e.emit=(t,...n)=>this.#f(t,...n),this.#e.reallyExit=t=>this.#r(t)}}unload(){this.#i&&(this.#i=!1,Vt.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,n)}catch{}}),this.#e.emit=this.#o,this.#e.reallyExit=this.#p,this.#n.count-=1)}#r(t){return fo(this.#e)?(this.#e.exitCode=t||0,this.#n.emit("exit",this.#e.exitCode,null),this.#p.call(this.#e,this.#e.exitCode)):0}#f(t,...n){let r=this.#o;if(t==="exit"&&fo(this.#e)){typeof n[0]=="number"&&(this.#e.exitCode=n[0]);let o=r.call(this.#e,t,...n);return this.#n.emit("exit",this.#e.exitCode,null),o}else return r.call(this.#e,t,...n)}},ls=globalThis.process,{onExit:Lc,load:V_,unload:q_}=Bb(fo(ls)?new as(ls):new ss)});var yr,zc,$b,Wc,Uc=A(()=>{"use strict";yr=D(require("process"),1);$c();Mc();zc=yr.default.stderr.isTTY?yr.default.stderr:yr.default.stdout.isTTY?yr.default.stdout:void 0,$b=zc?Bc(()=>{Lc(()=>{zc.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Wc=$b});var cs,ho,Fn,us,Vc=A(()=>{"use strict";cs=D(require("process"),1);Uc();ho=!1,Fn={};Fn.show=(e=cs.default.stderr)=>{e.isTTY&&(ho=!1,e.write("\x1B[?25h"))};Fn.hide=(e=cs.default.stderr)=>{e.isTTY&&(Wc(),ho=!0,e.write("\x1B[?25l"))};Fn.toggle=(e,t)=>{e!==void 0&&(ho=e),ho?Fn.show(t):Fn.hide(t)};us=Fn});var qc=Yi((X_,Nb)=>{Nb.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var ds=Yi((Q_,Jc)=>{"use strict";var go=Object.assign({},qc()),Gc=Object.keys(go);Object.defineProperty(go,"random",{get(){let e=Math.floor(Math.random()*Gc.length),t=Gc[e];return go[t]}});Jc.exports=go});function ps(){return Pe.default.platform!=="win32"?Pe.default.env.TERM!=="linux":!!Pe.default.env.CI||!!Pe.default.env.WT_SESSION||!!Pe.default.env.TERMINUS_SUBLIME||Pe.default.env.ConEmuTask==="{cmd::Cmder}"||Pe.default.env.TERM_PROGRAM==="Terminus-Sublime"||Pe.default.env.TERM_PROGRAM==="vscode"||Pe.default.env.TERM==="xterm-256color"||Pe.default.env.TERM==="alacritty"||Pe.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Pe,Hc=A(()=>{"use strict";Pe=D(require("process"),1)});var Lb,Mb,zb,br,Zc=A(()=>{"use strict";Ee();Hc();Lb={info:E.blue("\u2139"),success:E.green("\u2714"),warning:E.yellow("\u26A0"),error:E.red("\u2716")},Mb={info:E.blue("i"),success:E.green("\u221A"),warning:E.yellow("\u203C"),error:E.red("\xD7")},zb=ps()?Lb:Mb,br=zb});function fs({onlyFirst:e=!1}={}){let o="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(o,e?void 0:"g")}var Kc=A(()=>{"use strict"});function wr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Wb,"")}var Wb,ms=A(()=>{"use strict";Kc();Wb=fs()});function Yc(e){return 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}function Xc(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Qc(e){return 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>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||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<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&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>=101631&&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>=119552&&e<=119638||e>=119648&&e<=119670||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<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var eu=A(()=>{"use strict"});function Ub(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function tu(e,{ambiguousAsWide:t=!1}={}){return Ub(e),Xc(e)||Qc(e)||t&&Yc(e)?2:1}var nu=A(()=>{"use strict";eu()});var ru,ou=A(()=>{"use strict";ru=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});function hs(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:r=!1}=t;if(r||(e=wr(e)),e.length===0)return 0;let o=0,i={ambiguousAsWide:!n};for(let{segment:s}of Vb.segment(e)){let a=s.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!qb.test(s)){if(ru().test(s)){o+=2;continue}o+=tu(a,i)}}return o}var Vb,qb,iu=A(()=>{"use strict";ms();nu();ou();Vb=new Intl.Segmenter,qb=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u")});function gs({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var su=A(()=>{"use strict"});function bs(){let{env:e}=ys.default,{TERM:t,TERM_PROGRAM:n}=e;return ys.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ys,au=A(()=>{"use strict";ys=D(require("process"),1)});var Ve,Gb,ws,Jb,Ds,lu=A(()=>{"use strict";Ve=D(require("process"),1),Gb=3,ws=class{#s=0;start(){this.#s++,this.#s===1&&this.#n()}stop(){if(this.#s<=0)throw new Error("`stop` called more times than `start`");this.#s--,this.#s===0&&this.#e()}#n(){Ve.default.platform==="win32"||!Ve.default.stdin.isTTY||(Ve.default.stdin.setRawMode(!0),Ve.default.stdin.on("data",this.#o),Ve.default.stdin.resume())}#e(){Ve.default.stdin.isTTY&&(Ve.default.stdin.off("data",this.#o),Ve.default.stdin.pause(),Ve.default.stdin.setRawMode(!1))}#o(t){t[0]===Gb&&Ve.default.emit("SIGINT")}},Jb=new ws,Ds=Jb});function En(e){return new vs(e)}var Dr,vr,Hb,vs,ks=A(()=>{"use strict";Dr=D(require("process"),1);Ee();Vc();vr=D(ds(),1);Zc();ms();iu();su();au();lu();Hb=D(ds(),1),vs=class{#s=0;#n=!1;#e=0;#o=-1;#p=0;#t;#i;#r;#f;#h;#c;#u;#d;#g;#a;#l;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:Dr.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#h=this.#t.interval,this.#r=this.#t.stream,this.#c=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:gs({stream:this.#r}),this.#u=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,Dr.default.env.NODE_ENV==="test"&&(this._stream=this.#r,this._isEnabled=this.#c,Object.defineProperty(this,"_linesToClear",{get(){return this.#s},set(n){this.#s=n}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#o}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#d}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#d=t,this.#m()}get interval(){return this.#h??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#o=-1,this.#h=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!bs())this.#i=vr.default.line;else if(t===void 0)this.#i=vr.default.dots;else if(t!=="default"&&vr.default[t])this.#i=vr.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#g}set text(t=""){this.#g=t,this.#m()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#m()}get suffixText(){return this.#l}set suffixText(t=""){this.#l=t,this.#m()}get isSpinning(){return this.#f!==void 0}#y(t=this.#a,n=" "){return typeof t=="string"&&t!==""?t+n:typeof t=="function"?t()+n:""}#b(t=this.#l,n=" "){return typeof t=="string"&&t!==""?n+t:typeof t=="function"?n+t():""}#m(){let t=this.#r.columns??80,n=this.#y(this.#a,"-"),r=this.#b(this.#l,"-"),o=" ".repeat(this.#d)+n+"--"+this.#g+"--"+r;this.#e=0;for(let i of wr(o).split(`
8
8
  `))this.#e+=Math.max(1,Math.ceil(hs(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#c&&!this.#u}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#c=t}get isSilent(){return this.#u}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#u=t}frame(){let t=Date.now();(this.#o===-1||t-this.#p>=this.interval)&&(this.#o=++this.#o%this.#i.frames.length,this.#p=t);let{frames:n}=this.#i,r=n[this.#o];this.color&&(r=E[this.color](r));let o=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",s=typeof this.#l=="string"&&this.#l!==""?" "+this.#l:"";return o+r+i+s}clear(){if(!this.#c||!this.#r.isTTY)return this;this.#r.cursorTo(0);for(let t=0;t<this.#s;t++)t>0&&this.#r.moveCursor(0,-1),this.#r.clearLine(1);return(this.#d||this.lastIndent!==this.#d)&&this.#r.cursorTo(this.#d),this.lastIndent=this.#d,this.#s=0,this}render(){return this.#u?this:(this.clear(),this.#r.write(this.frame()),this.#s=this.#e,this)}start(t){return t&&(this.text=t),this.#u?this:this.#c?this.isSpinning?this:(this.#t.hideCursor&&us.hide(this.#r),this.#t.discardStdin&&Dr.default.stdin.isTTY&&(this.#n=!0,Ds.start()),this.render(),this.#f=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#r.write(`- ${this.text}
9
9
  `),this)}stop(){return this.#c?(clearInterval(this.#f),this.#f=void 0,this.#o=0,this.clear(),this.#t.hideCursor&&us.show(this.#r),this.#t.discardStdin&&Dr.default.stdin.isTTY&&this.#n&&(Ds.stop(),this.#n=!1),this):this}succeed(t){return this.stopAndPersist({symbol:br.success,text:t})}fail(t){return this.stopAndPersist({symbol:br.error,text:t})}warn(t){return this.stopAndPersist({symbol:br.warning,text:t})}info(t){return this.stopAndPersist({symbol:br.info,text:t})}stopAndPersist(t={}){if(this.#u)return this;let n=t.prefixText??this.#a,r=this.#y(n," "),o=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(o?" ":"")+i:"",l=t.suffixText??this.#l,c=this.#b(l," "),u=r+o+a+c+`
10
- `;return this.stop(),this.#r.write(u),this}}});function Fs(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),yo.default.platform==="darwin"?Jb(e):yo.default.platform==="win32"?Hb(e):Zb(e)}var se,xs,yo,kt,Cs,_n,Jb,Hb,Zb,lu=A(()=>{"use strict";se=D(require("path"),1),xs=D(require("os"),1),yo=D(require("process"),1),kt=xs.default.homedir(),Cs=xs.default.tmpdir(),{env:_n}=yo.default,Jb=e=>{let t=se.default.join(kt,"Library");return{data:se.default.join(t,"Application Support",e),config:se.default.join(t,"Preferences",e),cache:se.default.join(t,"Caches",e),log:se.default.join(t,"Logs",e),temp:se.default.join(Cs,e)}},Hb=e=>{let t=_n.APPDATA||se.default.join(kt,"AppData","Roaming"),n=_n.LOCALAPPDATA||se.default.join(kt,"AppData","Local");return{data:se.default.join(n,e,"Data"),config:se.default.join(t,e,"Config"),cache:se.default.join(n,e,"Cache"),log:se.default.join(n,e,"Log"),temp:se.default.join(Cs,e)}},Zb=e=>{let t=se.default.basename(kt);return{data:se.default.join(_n.XDG_DATA_HOME||se.default.join(kt,".local","share"),e),config:se.default.join(_n.XDG_CONFIG_HOME||se.default.join(kt,".config"),e),cache:se.default.join(_n.XDG_CACHE_HOME||se.default.join(kt,".cache"),e),log:se.default.join(_n.XDG_STATE_HOME||se.default.join(kt,".local","state"),e),temp:se.default.join(Cs,t,e)}}});function bo(){return/[<>:"/\\|?*\u0000-\u001F]/g}function cu(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var uu=A(()=>{"use strict"});function kr(e,t={}){let n=/[\u0000-\u001F\u0080-\u009F]/g,r=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(bo().test(o)&&n.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(r,"$1")),e=e.normalize("NFD"),e=e.replace(Yb,o),e=e.replace(bo(),o),e=e.replace(n,o),e=e.replace(Xb,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=cu().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Kb;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),l=e.slice(s);e=a.slice(0,Math.max(1,i-l.length))+l}}return e}var Kb,Yb,Xb,Es=A(()=>{"use strict";uu();Kb=100,Yb=/^\.+(\\|\/)|^\.+$/,Xb=/\.+$/});var Qb,du=A(()=>{"use strict";Qb=D(require("path"),1);Es()});var pu=A(()=>{"use strict";Es();du()});var wo,_s=A(()=>{"use strict";wo="webflow.json"});var qt,Ss=A(()=>{"use strict";qt=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function mu(e){Ts=e}function ue(){return Ts}function xt(){return!Ts}function hu(e){fu=e}function gu(){return fu}var Ts,fu,_e=A(()=>{"use strict";Ts=!1});function Gt(){let e=gu();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,yu.statSync)(e)?.isDirectory())return{path:(0,bu.join)(e,wo),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${wo}`,isUserDefined:!1}}var yu,bu,As=A(()=>{"use strict";yu=require("fs"),bu=require("path");_s();_e()});var wu,ew,tw,Os,Du=A(()=>{"use strict";wu=D(require("ajv")),ew=new wu.default,tw={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},Os=ew.compile(tw)});function vu(e){return e instanceof Error?e:new Error("Unknown error")}function H(){let{path:e}=Gt();if(!(0,Do.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Do.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${vu(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let r;try{r=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${vu(o).message}`)}if(!Os(r)){let o=Os.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var Do,vo=A(()=>{"use strict";Do=require("fs");As();Du()});function xr(e,t){let n=e[t];if(!n)throw new qt(t);return n}var ku=A(()=>{"use strict";Ss()});function he(e){let t=H(),n=t.manifest,r=t.manifestPath,o={...n};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let l=o[s];o[s]={...typeof l=="object"&&l!==null?l:{},...a}}}return(0,xu.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var xu,Is=A(()=>{"use strict";xu=require("fs");vo()});var be=A(()=>{"use strict";_s();Ss();vo();As();ku();Is()});var ko=Yi((nS,nw)=>{nw.exports={name:"@webflow/webflow-cli",version:"1.17.0",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2","css-tree":"^2.3.1",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",prettier:"^2.7.1",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.2.2",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/css-tree":"^2.3.1","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/prettier":"^2.7.1","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function ut(){try{return ko().version}catch{return"unknown"}}function Qe(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let n=Cr.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=Cr.default.userInfo().username;if(r){let o=new RegExp(`/Users/${r}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function Ps(e){if(e.stack)return Qe(e.stack)}function Ct(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],n={};for(let[r,o]of Object.entries(e)){let i=r.toLowerCase();t.some(s=>i.includes(s))?n[r]="[REDACTED]":typeof o=="string"?n[r]=Qe(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=Ct(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?Ct(s):typeof s=="string"?Qe(s):s):n[r]=o}return n}function Cu(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${Cr.default.type()} ${Cr.default.release()}`}}function Rs(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var Cr,Fr=A(()=>{"use strict";Cr=D(require("os"))});var te,X,Sn,Tn,js,Bs,Se=A(()=>{"use strict";Ee();te=E.green("\u2714"),X=E.red("\u2716"),Sn=E.cyan("\u2139"),Tn=E.green("\u279C"),js=E.red("\u279C"),Bs=E.yellow("\u26A0")});var Ft,$s=A(()=>{"use strict";Ee();be();Fr();V();Se();Ft=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await H(),n=t?.telemetry?.global?.allowTelemetry;return this.cache=n,n}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(p.info(`${Sn} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(p.info(`${Sn} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),p.info(`${Sn} To opt out, run: ${E.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let n={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:ut()}}};await he(n),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,n){this.cache=n}}});async function Y(e,t){let r={"User-Agent":`webflow-cli@${ut()}`};return(0,Fu.default)(e,{...t,headers:{...t?.headers,...r}})}var Fu,Et=A(()=>{"use strict";Fu=D(require("node-fetch"));qe()});var Eu,_u=A(()=>{"use strict";Eu=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Ns,U,xo,An,Er,Ls,_r,Sr,On,pe=A(()=>{"use strict";_u();Ns=(e,t)=>(Eu(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),U=process.env.WEBFLOW_API_HOST?Ns("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",xo=process.env.WEBFLOW_CDN_API_HOST?Ns("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",An=process.env.WEBFLOW_HOST?Ns("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Er="wf-manifest.json",Ls="mf-manifest.json",_r="@webflow_renderer",Sr="ssr-bundle.tar",On="index.js"});var Z,Ms=A(()=>{"use strict";$s();Fr();V();Et();pe();Z=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=Ft.getInstance(),this.sessionId=Rs(),this.platformInfo=Cu()}async sendEvent(t){try{if(!await this.isEnabled())return;let n=this.enrichEvent(t),r=this.sanitizeEvent(n);await this.transmitEvent(r)}catch(n){p.debug(`Failed to send telemetry event: ${n}`)}}async sendError(t,n,r){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:Ps(t),context:n,metadata:r?Ct(r):void 0})}async sendUsage(t,n){let{duration:r,...o}=n??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof r=="number"?r:void 0,data:Object.keys(o).length>0?Ct(o):void 0})}async sendPerformance(t,n,r){await this.sendEvent({eventType:"performance",operation:t,duration:n,metrics:r})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let n=Ft.getInstance(),r=await n.getPreference();return r!==void 0?r:await n.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:ut(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let n=JSON.parse(JSON.stringify(t));return n.message&&(n.message=Qe(n.message)),n.stack&&(n.stack=Qe(n.stack)),n.context&&(n.context=Qe(n.context)),n.metadata&&(n.metadata=Ct(n.metadata)),n.data&&(n.data=Ct(n.data)),n}async transmitEvent(t){let n=this.getEndpoint(),r=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(r){console.log(`\u{1F4CA} [Telemetry] Sending to: ${n}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await Y(n,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)r&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw r&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:n}=this.config;return`${t}/webflow-cli/${n}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||U,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||U,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}}});var Su=A(()=>{"use strict"});function Tu(e){return async(t,n,r)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await n(),a=Date.now()-o,l=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:l-i,...r}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...r}),s}}}var qe=A(()=>{"use strict";Ms();$s();Su();Fr();Fr()});var Us,zs,rw,dt,Ws=A(()=>{"use strict";Us=Symbol("webflow-cli-warn"),zs=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
11
- `);for(let r=2;r<n.length;r++){let o=n[r],i=o.match(/at .+? \((.+?):\d+:\d+\)/)||o.match(/at (.+?):\d+:\d+/);if(i){let s=i[1];if(s.includes("node_modules")){let a=s.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)/);return a?`External: ${a[1]}`:"External Dependencies"}else if(s.includes("webflow-cli"))return s.includes("/metadata/")?"Metadata Collection":s.includes("/bundler/")?"Bundling":s.includes("/commands/")?"CLI Commands":"Webflow CLI"}}return"General"}start(){this.isActive||(this.warnings=[],this.originalConsoleWarn=console.warn,this.isActive=!0,console.warn=(...t)=>{if(t.length>1&&t[t.length-1]===Us){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let n=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),r=new Error().stack||"",o=this.parseSource(r);this.warnings.push({message:n,timestamp:Date.now(),source:o,stackTrace:r})})}stop(){this.isActive&&(this.originalConsoleWarn&&(console.warn=this.originalConsoleWarn,this.originalConsoleWarn=null),this.isActive=!1)}displayGrouped(){if(this.warnings.length===0)return;console.log(`
10
+ `;return this.stop(),this.#r.write(u),this}}});function Fs(e,{suffix:t="nodejs"}={}){if(typeof e!="string")throw new TypeError(`Expected a string, got ${typeof e}`);return t&&(e+=`-${t}`),yo.default.platform==="darwin"?Zb(e):yo.default.platform==="win32"?Kb(e):Yb(e)}var se,xs,yo,kt,Cs,_n,Zb,Kb,Yb,cu=A(()=>{"use strict";se=D(require("path"),1),xs=D(require("os"),1),yo=D(require("process"),1),kt=xs.default.homedir(),Cs=xs.default.tmpdir(),{env:_n}=yo.default,Zb=e=>{let t=se.default.join(kt,"Library");return{data:se.default.join(t,"Application Support",e),config:se.default.join(t,"Preferences",e),cache:se.default.join(t,"Caches",e),log:se.default.join(t,"Logs",e),temp:se.default.join(Cs,e)}},Kb=e=>{let t=_n.APPDATA||se.default.join(kt,"AppData","Roaming"),n=_n.LOCALAPPDATA||se.default.join(kt,"AppData","Local");return{data:se.default.join(n,e,"Data"),config:se.default.join(t,e,"Config"),cache:se.default.join(n,e,"Cache"),log:se.default.join(n,e,"Log"),temp:se.default.join(Cs,e)}},Yb=e=>{let t=se.default.basename(kt);return{data:se.default.join(_n.XDG_DATA_HOME||se.default.join(kt,".local","share"),e),config:se.default.join(_n.XDG_CONFIG_HOME||se.default.join(kt,".config"),e),cache:se.default.join(_n.XDG_CACHE_HOME||se.default.join(kt,".cache"),e),log:se.default.join(_n.XDG_STATE_HOME||se.default.join(kt,".local","state"),e),temp:se.default.join(Cs,t,e)}}});function bo(){return/[<>:"/\\|?*\u0000-\u001F]/g}function uu(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}var du=A(()=>{"use strict"});function kr(e,t={}){let n=/[\u0000-\u001F\u0080-\u009F]/g,r=/([<>:"/\\|?*\u0000-\u001F]){2,}/g;if(typeof e!="string")throw new TypeError("Expected a string");let o=t.replacement===void 0?"!":t.replacement;if(bo().test(o)&&n.test(o))throw new Error("Replacement string cannot contain reserved filename characters");o.length>0&&(e=e.replace(r,"$1")),e=e.normalize("NFD"),e=e.replace(Qb,o),e=e.replace(bo(),o),e=e.replace(n,o),e=e.replace(ew,""),o.length>0&&(!(e[0]===".")&&e[0]==="."&&(e=o+e),e[e.length-1]==="."&&(e+=o)),e=uu().test(e)?e+o:e;let i=typeof t.maxLength=="number"?t.maxLength:Xb;if(e.length>i){let s=e.lastIndexOf(".");if(s===-1)e=e.slice(0,i);else{let a=e.slice(0,s),l=e.slice(s);e=a.slice(0,Math.max(1,i-l.length))+l}}return e}var Xb,Qb,ew,Es=A(()=>{"use strict";du();Xb=100,Qb=/^\.+(\\|\/)|^\.+$/,ew=/\.+$/});var tw,pu=A(()=>{"use strict";tw=D(require("path"),1);Es()});var fu=A(()=>{"use strict";Es();pu()});var wo,_s=A(()=>{"use strict";wo="webflow.json"});var qt,Ss=A(()=>{"use strict";qt=class extends Error{constructor(t){super(`Manifest config for key "${t}" not found`),this.name="ManifestConfigKeyNotFoundError"}}});function hu(e){Ts=e}function ue(){return Ts}function xt(){return!Ts}function gu(e){mu=e}function yu(){return mu}var Ts,mu,_e=A(()=>{"use strict";Ts=!1});function Gt(){let e=yu();if(e){if(e.endsWith(".json"))return{path:e,isUserDefined:!0};try{if((0,bu.statSync)(e)?.isDirectory())return{path:(0,wu.join)(e,wo),isUserDefined:!0}}catch{if(e.endsWith(".json"))return{path:e,isUserDefined:!0}}throw new Error(`Manifest path must be either a directory or a .json file. Got: ${e}`)}return{path:`./${wo}`,isUserDefined:!1}}var bu,wu,As=A(()=>{"use strict";bu=require("fs"),wu=require("path");_s();_e()});var Du,nw,rw,Os,vu=A(()=>{"use strict";Du=D(require("ajv")),nw=new Du.default,rw={type:"object",properties:{library:{type:"object",properties:{name:{type:"string",minLength:1},id:{type:"string",minLength:1},components:{type:"array",items:{type:"string"},minItems:1},renderer:{anyOf:[{type:"object",properties:{client:{type:"string",minLength:1},server:{type:"string",minLength:1}}},{type:"string",minLength:1}]},globals:{type:"string",minLength:1}},required:[]},devlink:{type:"object",properties:{rootDir:{type:"string",minLength:1},cssModules:{type:"boolean"},allowTelemetry:{type:"boolean"},overwriteModule:{type:"boolean"},skipTagSelectors:{type:"boolean"},envVariables:{type:"object",additionalProperties:{type:"string"}},components:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},fileExtensions:{type:"object",properties:{js:{type:"string"},css:{type:"string"}}},relativeHrefRoot:{oneOf:[{type:"boolean"},{type:"string"}]}},required:["rootDir"]},"devlink-export":{type:"object",properties:{rootDir:{type:"string",minLength:1},components:{type:"string"},componentGroups:{type:"string"},ts:{type:"boolean"},cssScopes:{type:"boolean"},relativeHrefRoot:{oneOf:[{type:"boolean",const:!1},{type:"string"}]},treeShake:{type:"boolean"}},required:[]}}},Os=nw.compile(rw)});function ku(e){return e instanceof Error?e:new Error("Unknown error")}function H(){let{path:e}=Gt();if(!(0,Do.existsSync)(e))return{manifest:{},manifestPath:e};let t;try{t=(0,Do.readFileSync)(e,"utf8")}catch(o){throw new Error(`Failed to read manifest file: ${ku(o).message}`)}if(t.trim()==="")return{manifest:{},manifestPath:e};let r;try{r=JSON.parse(t)}catch(o){throw new Error(`Invalid JSON in manifest file: ${ku(o).message}`)}if(!Os(r)){let o=Os.errors?.map(i=>`${i.instancePath} ${i.message}`).join(", ")||"Unknown error";throw new Error(`Invalid manifest: ${o}.`)}return{manifest:r,manifestPath:e}}var Do,vo=A(()=>{"use strict";Do=require("fs");As();vu()});function xr(e,t){let n=e[t];if(!n)throw new qt(t);return n}var xu=A(()=>{"use strict";Ss()});function he(e){let t=H(),n=t.manifest,r=t.manifestPath,o={...n};for(let i in e){let s=i,a=e[s];if(a!==void 0)if(typeof a=="string"||typeof a=="number"||typeof a=="boolean"||a===null)o[s]=a;else{let l=o[s];o[s]={...typeof l=="object"&&l!==null?l:{},...a}}}return(0,Cu.writeFileSync)(r,JSON.stringify(o,null,2),"utf-8"),o}var Cu,Is=A(()=>{"use strict";Cu=require("fs");vo()});var be=A(()=>{"use strict";_s();Ss();vo();As();xu();Is()});var ko=Yi((iS,ow)=>{ow.exports={name:"@webflow/webflow-cli",version:"1.17.1",license:"MIT",bin:{webflow:"./dist/index.js"},scripts:{build:"tsup",dev:"tsup",lint:"eslint .",test:"jest --ci","test:unit":"jest --ci --ignoreProjects e2e","test:local":"jest","test:e2e-cache-clear":"bash scripts/clear-e2e-cache.sh"},files:["CHANGELOG.md","dist/**/*"],publishConfig:{access:"public"},dependencies:{"@babel/preset-env":"^7.26.9","@babel/preset-react":"^7.26.3","@babel/preset-typescript":"^7.27.0","@dotenvx/dotenvx":"^1.44.1","@inquirer/prompts":"^7.9.0","@module-federation/enhanced":"0.20.0","@rspack/core":"^1.7.8","@webflow/data-types":"*",ajv:"^8.17.1",archiver:"^5.3.1","babel-loader":"^10.0.0",commander:"^10.0.0",cosmiconfig:"^8.2.0","css-loader":"^7.1.2","css-tree":"^2.3.1",dotenv:"^16.0.3","env-paths":"^3.0.0","fast-glob":"^3.3.3",filenamify:"^6.0.0","fork-ts-checker-webpack-plugin":"9.1.0","form-data":"4.0.4","fs-extra":"^11.3.0",jsdom:"^26.0.0","jsonc-parser":"^3.2.0",md5:"^2.2.1",memfs:"4.17.0","mime-types":"^2.1.35","mini-css-extract-plugin":"^2.9.2","node-fetch":"^2.6.7",open:"^8.4.2",ora:"^8.2.0",postcss:"^8.5.6","postcss-loader":"^8.1.1","postcss-selector-parser":"^7.1.0",prettier:"^2.7.1",semver:"^7.7.2","serve-handler":"^6.1.5","source-map-support":"^0.5.21",tar:"^7.4.3","ts-checker-rspack-plugin":"^1.0.0","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.2.0",unionfs:"^4.5.4","webflow-api":"3.2.2",webpack:">=5.99.7 <5.106.0","webpack-merge":"^6.0.1","webpack-node-externals":"^3.0.0",zod:"^3.22.4"},devDependencies:{"@types/archiver":"^5.3.2","@types/css-tree":"^2.3.1","@types/express":"^4.17.13","@types/fs-extra":"^11.0.4","@types/jest":"^29.2.3","@types/md5":"^2.3.2","@types/mime-types":"^2.1.4","@types/nock":"^8.0.33","@types/node":"^18.16.0","@types/node-fetch":"2.6.13","@types/prettier":"^2.7.1","@types/serve-handler":"^6.1.1","@types/source-map":"^0.5.2","@types/webpack-node-externals":"^3.0.4",astro:"^5.17.2","eslint-config-custom":"*",express:"^4.18.1",jest:"^29.3.1",nock:"13.3.1",tar:"^7.4.3","ts-jest":"^29.0.3","ts-node":"^10.9.1",tsconfig:"*",tsup:"^8.4.0",typescript:"^4.9.3"},engines:{node:">=18.16.0"}}});function ut(){try{return ko().version}catch{return"unknown"}}function Qe(e=""){if(!e)return"";let t=e;t=t.replace(/\/.*?\/webflow-cli/gi,"/REDACTED_PII/webflow-cli"),t=t.replace(/\/.*?\/node_modules/gi,"/REDACTED_PII/node_modules");let n=Cr.default.homedir();if(n){let o=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi");t=t.replace(o,"~/REDACTED_PII")}let r=Cr.default.userInfo().username;if(r){let o=new RegExp(`/Users/${r}`,"gi");t=t.replace(o,"/Users/REDACTED_PII")}return t=t.replace(/\/Users\/[^\/\s]+/gi,"/Users/REDACTED_PII"),t=t.replace(/C:\\Users\\[^\\]+/gi,"C:\\Users\\REDACTED_PII"),t=t.replace(/[a-zA-Z0-9]{32,}/g,"[REDACTED_TOKEN]"),t=t.replace(/Bearer\s+[^\s]+/gi,"Bearer [REDACTED_TOKEN]"),t=t.replace(/token[=:]\s*[^\s]+/gi,"token=[REDACTED_TOKEN]"),t=t.replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,"[REDACTED_EMAIL]"),t=t.replace(/\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,"[REDACTED_IP]"),t}function Ps(e){if(e.stack)return Qe(e.stack)}function Ct(e){let t=["password","token","secret","key","auth","bearer","authorization","apikey","api_key","access_token","refresh_token","client_secret","private_key"],n={};for(let[r,o]of Object.entries(e)){let i=r.toLowerCase();t.some(s=>i.includes(s))?n[r]="[REDACTED]":typeof o=="string"?n[r]=Qe(o):typeof o=="object"&&o!==null&&!Array.isArray(o)?n[r]=Ct(o):Array.isArray(o)?n[r]=o.map(s=>typeof s=="object"&&s!==null?Ct(s):typeof s=="string"?Qe(s):s):n[r]=o}return n}function Fu(){return{platform:process.platform,nodeVersion:process.version,arch:process.arch,os:`${Cr.default.type()} ${Cr.default.release()}`}}function Rs(){let e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${e}-${t}`}var Cr,Fr=A(()=>{"use strict";Cr=D(require("os"))});var te,X,Sn,Tn,js,Bs,Se=A(()=>{"use strict";Ee();te=E.green("\u2714"),X=E.red("\u2716"),Sn=E.cyan("\u2139"),Tn=E.green("\u279C"),js=E.red("\u279C"),Bs=E.yellow("\u26A0")});var Ft,$s=A(()=>{"use strict";Ee();be();Fr();V();Se();Ft=class e{static instance;cache=void 0;static isDoNotTrackEnabled(){let t=process.env.DO_NOT_TRACK;return t==="1"||t?.toLowerCase()==="true"}static getInstance(){return e.instance||(e.instance=new e),e.instance}async getPreference(){if(e.isDoNotTrackEnabled())return!1;if(this.cache!==void 0)return this.cache;try{let{manifest:t}=await H(),n=t?.telemetry?.global?.allowTelemetry;return this.cache=n,n}catch{return}}async setPreference(t){this.cache=t,await this.setGlobalPreference(t)}async promptForConsent(t){return e.isDoNotTrackEnabled()?(p.info(`${Sn} Telemetry is disabled because the DO_NOT_TRACK environment variable is set.`),!1):(p.info(`${Sn} Telemetry is enabled. Usage data and error reports help us improve Webflow CLI.`),p.info(`${Sn} To opt out, run: ${E.blue("webflow auth telemetry --disable")}`),await this.setPreference(!0),!0)}clearCache(){this.cache=void 0}async getGlobalPreference(){return this.getPreference()}async setGlobalPreference(t){let n={telemetry:{global:{allowTelemetry:t,lastPrompted:Date.now(),version:ut()}}};await he(n),this.cache=t}async hasGlobalPreference(){return await this.getPreference()!==void 0}async getTelemetryStatus(){let t=await this.getPreference();return t!==void 0?{enabled:t,source:"global",hasPreference:!0}:{enabled:!1,source:"none",hasPreference:!1}}setCacheValue(t,n){this.cache=n}}});async function Y(e,t){let r={"User-Agent":`webflow-cli@${ut()}`};return(0,Eu.default)(e,{...t,headers:{...t?.headers,...r}})}var Eu,Et=A(()=>{"use strict";Eu=D(require("node-fetch"));qe()});var _u,Su=A(()=>{"use strict";_u=e=>{try{let t=new URL(e);return!(!["http:","https:"].includes(t.protocol)||e.includes("?")||e.includes("#")||t.search||t.hash)}catch{return!1}}});var Ns,W,xo,An,Er,Ls,_r,Sr,On,pe=A(()=>{"use strict";Su();Ns=(e,t)=>(_u(t)||(console.error(`Error: Invalid ${e} environment variable. Only valid plain HTTP/HTTPS URLs without query parameters and anchors is allowed.`),process.exit(1)),t),W=process.env.WEBFLOW_API_HOST?Ns("WEBFLOW_API_HOST",process.env.WEBFLOW_API_HOST):"https://api.webflow.com",xo=process.env.WEBFLOW_CDN_API_HOST?Ns("WEBFLOW_CDN_API_HOST",process.env.WEBFLOW_CDN_API_HOST):"https://api-cdn.webflow.com",An=process.env.WEBFLOW_HOST?Ns("WEBFLOW_HOST",process.env.WEBFLOW_HOST):"https://webflow.com",Er="wf-manifest.json",Ls="mf-manifest.json",_r="@webflow_renderer",Sr="ssr-bundle.tar",On="index.js"});var Z,Ms=A(()=>{"use strict";$s();Fr();V();Et();pe();Z=class e{config;consentManager;sessionId;platformInfo;constructor(t){this.config=t,this.consentManager=Ft.getInstance(),this.sessionId=Rs(),this.platformInfo=Fu()}async sendEvent(t){try{if(!await this.isEnabled())return;let n=this.enrichEvent(t),r=this.sanitizeEvent(n);await this.transmitEvent(r)}catch(n){p.debug(`Failed to send telemetry event: ${n}`)}}async sendError(t,n,r){await this.sendEvent({eventType:"error",success:!1,name:t.name,message:t.message,cause:t.cause,stack:Ps(t),context:n,metadata:r?Ct(r):void 0})}async sendUsage(t,n){let{duration:r,...o}=n??{};await this.sendEvent({eventType:"usage",success:!0,feature:t,duration:typeof r=="number"?r:void 0,data:Object.keys(o).length>0?Ct(o):void 0})}async sendPerformance(t,n,r){await this.sendEvent({eventType:"performance",operation:t,duration:n,metrics:r})}async isEnabled(){return await this.consentManager.getPreference()!==!1}async isGloballyEnabled(){return await this.consentManager.getGlobalPreference()!==!1}async updatePreferences(t){await this.consentManager.setPreference(t)}static async promptForConsentIfNeeded(t){let n=Ft.getInstance(),r=await n.getPreference();return r!==void 0?r:await n.promptForConsent(t)}enrichEvent(t){return{...{eventType:t.eventType||"usage",timestamp:Date.now(),sessionId:this.sessionId,platform:this.platformInfo.platform,nodeVersion:this.platformInfo.nodeVersion,cliVersion:ut(),command:process.argv.slice(2).join(" ")||void 0,metadata:{...t.metadata,commandType:this.config.commandType,siteId:this.config.siteId,projectId:this.config.projectId,os:this.platformInfo.os,arch:this.platformInfo.arch}},...t}}sanitizeEvent(t){let n=JSON.parse(JSON.stringify(t));return n.message&&(n.message=Qe(n.message)),n.stack&&(n.stack=Qe(n.stack)),n.context&&(n.context=Qe(n.context)),n.metadata&&(n.metadata=Ct(n.metadata)),n.data&&(n.data=Ct(n.data)),n}async transmitEvent(t){let n=this.getEndpoint(),r=process.env.WEBFLOW_TELEMETRY_DEBUG==="true";if(r){console.log(`\u{1F4CA} [Telemetry] Sending to: ${n}`);let i={...t};i.metadata&&(delete i.metadata.authToken,delete i.metadata.apiToken),console.log("\u{1F4CA} [Telemetry] Payload:",JSON.stringify(i,null,2))}let o=await Y(n,{method:"POST",headers:{Authorization:`Bearer ${this.config.authToken}`,"Content-Type":"application/json"},body:JSON.stringify(t),timeout:5e3});if(o.ok)r&&console.log(`\u{1F4CA} [Telemetry] Request successful: ${o.status}`);else throw r&&console.error(`\u{1F4CA} [Telemetry] Request failed: ${o.status} ${o.statusText}`),new Error(`Telemetry request failed: ${o.status} ${o.statusText}`)}getEndpoint(){let{host:t,commandType:n}=this.config;return`${t}/webflow-cli/${n}/telemetry`}static forDevlinkSync(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,commandType:"devlink"})}static forExport(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,commandType:"export"})}static forCloud(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,projectId:t.projectId,commandType:"cloud"})}static forExtension(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,commandType:"extension"})}static forCodeLibraries(t){return new e({host:t.host||W,authToken:t.authToken,commandType:"library"})}static forCms(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,commandType:"cms"})}static forAssets(t){return new e({host:t.host||W,authToken:t.authToken,siteId:t.siteId,commandType:"assets"})}}});var Tu=A(()=>{"use strict"});function Au(e){return async(t,n,r)=>{let o=Date.now(),i=process.memoryUsage().heapUsed;try{let s=await n(),a=Date.now()-o,l=process.memoryUsage().heapUsed;return await e.sendPerformance(t,a,{memoryDelta:l-i,...r}),s}catch(s){let a=Date.now()-o;throw await e.sendPerformance(t,a,{failed:1,...r}),s}}}var qe=A(()=>{"use strict";Ms();$s();Tu();Fr();Fr()});var Ws,zs,iw,dt,Us=A(()=>{"use strict";Ws=Symbol("webflow-cli-warn"),zs=class{warnings=[];originalConsoleWarn=null;isActive=!1;parseSource(t){let n=t.split(`
11
+ `);for(let r=2;r<n.length;r++){let o=n[r],i=o.match(/at .+? \((.+?):\d+:\d+\)/)||o.match(/at (.+?):\d+:\d+/);if(i){let s=i[1];if(s.includes("node_modules")){let a=s.match(/node_modules\/(@?[^/]+(?:\/[^/]+)?)/);return a?`External: ${a[1]}`:"External Dependencies"}else if(s.includes("webflow-cli"))return s.includes("/metadata/")?"Metadata Collection":s.includes("/bundler/")?"Bundling":s.includes("/commands/")?"CLI Commands":"Webflow CLI"}}return"General"}start(){this.isActive||(this.warnings=[],this.originalConsoleWarn=console.warn,this.isActive=!0,console.warn=(...t)=>{if(t.length>1&&t[t.length-1]===Ws){let i=t.slice(0,-1);this.originalConsoleWarn&&this.originalConsoleWarn(...i);return}let n=t.map(i=>{if(typeof i=="string")return i;if(i instanceof Error)return i.message;try{return String(i)}catch{return"[Object]"}}).join(" "),r=new Error().stack||"",o=this.parseSource(r);this.warnings.push({message:n,timestamp:Date.now(),source:o,stackTrace:r})})}stop(){this.isActive&&(this.originalConsoleWarn&&(console.warn=this.originalConsoleWarn,this.originalConsoleWarn=null),this.isActive=!1)}displayGrouped(){if(this.warnings.length===0)return;console.log(`
12
12
  \u26A0\uFE0F Warnings:
13
13
  `);let t=this.warnings.reduce((n,r)=>{let o=r.source||"General";return n[o]||(n[o]=[]),n[o].push(r),n},{});Object.entries(t).forEach(([n,r])=>{n!=="General"&&console.log(` ${n}:`),r.forEach((o,i)=>{let s=n!=="General"?" ":" ",a=o.message||"[Empty warning message]";console.log(`${s}${i+1}. ${a}`)}),n!=="General"&&console.log("")}),t.General&&console.log("")}debug(){console.log(`
14
14
  \u{1F41B} Debug: Captured Warnings
15
15
  `),this.warnings.forEach((t,n)=>{console.log(`Warning ${n+1}:`),console.log(` Source: ${t.source}`),console.log(` Message: ${t.message}`),console.log(` Message length: ${t.message.length}`),console.log(` Timestamp: ${new Date(t.timestamp).toISOString()}`),t.stackTrace&&(console.log(" Stack (first 3 lines):"),t.stackTrace.split(`
16
- `).slice(0,3).forEach(r=>{console.log(` ${r}`)})),console.log("")})}},rw=new zs,dt=rw});function ow(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function Ou(e,t){if(!e)return t;let n=parseInt(e,10);return isNaN(n)||n<=0?t:n}function _t(e){Tr.push(Qe(e)),Tr.length>aw&&Tr.shift()}function cw(e){return _t(`DEBUG: ${e}`),e}function uw(e){return _t(`INFO: ${e}`),e}function dw(e){return _t(`WARN: ${e}`),e}function pw(e,t){let n=e instanceof Error?e.stack||e.message:e,r=t?.prefix?`${t.prefix} `:"";_t(`ERROR: ${r}${n}`),qs=!0;let o=e instanceof Error?e.message:e;return`${r}${o}`}function fw(e){return _t(`SUCCESS: ${e}`),`${E.green(e)}`}function mw(e){let t=En(`${e}...`).start(),n=!1,r=o=>i=>{_t(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(qs=!0),!n&&(n=!0,t[o](i||e))};return{succeed:r("succeed"),fail:r("fail"),warn:r("warn"),info:r("info")}}function hw(){let e=In.default.readdirSync(Te).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:In.default.statSync(Co.default.join(Te,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);for(;e.length>=sw;)try{let t=e.pop();if(!t)break;In.default.removeSync(Co.default.join(Te,t.name))}catch{}}function Gs(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;In.default.ensureDirSync(Te),hw(),Tr.unshift(`CLI Version: ${ut()}`,`Node Version: ${process.version}`,`Platform: ${process.platform}`,`Architecture: ${process.arch}`,`Command: ${t||"N/A"}`,`Exit Code: ${e??0}`,`Memory Usage: ${Math.round(process.memoryUsage().heapUsed/1024/1024)}MB`,`Timestamp: ${new Date().toISOString()}`,...Au?[`Sync ID: ${Au}`]:[],"");let n=Tr.map(ow);In.default.writeFileSync(Vs,n.join(`
16
+ `).slice(0,3).forEach(r=>{console.log(` ${r}`)})),console.log("")})}},iw=new zs,dt=iw});function sw(e){return e.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"")}function Iu(e,t){if(!e)return t;let n=parseInt(e,10);return isNaN(n)||n<=0?t:n}function _t(e){Tr.push(Qe(e)),Tr.length>cw&&Tr.shift()}function dw(e){return _t(`DEBUG: ${e}`),e}function pw(e){return _t(`INFO: ${e}`),e}function fw(e){return _t(`WARN: ${e}`),e}function mw(e,t){let n=e instanceof Error?e.stack||e.message:e,r=t?.prefix?`${t.prefix} `:"";_t(`ERROR: ${r}${n}`),qs=!0;let o=e instanceof Error?e.message:e;return`${r}${o}`}function hw(e){return _t(`SUCCESS: ${e}`),`${E.green(e)}`}function gw(e){let t=En(`${e}...`).start(),n=!1,r=o=>i=>{_t(`${{succeed:"INFO",fail:"ERROR",warn:"WARN",info:"INFO"}[o]||"INFO"}: ${i||e}`),o==="fail"&&(qs=!0),!n&&(n=!0,t[o](i||e))};return{succeed:r("succeed"),fail:r("fail"),warn:r("warn"),info:r("info")}}function yw(){let e=In.default.readdirSync(Te).filter(t=>t.endsWith(".log")).map(t=>({name:t,time:In.default.statSync(Co.default.join(Te,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);for(;e.length>=lw;)try{let t=e.pop();if(!t)break;In.default.removeSync(Co.default.join(Te,t.name))}catch{}}function Gs(e){try{let t=process.argv.slice(2).join(" ");if(/^(log|library\s+log)(\s|$)/.test(t))return;In.default.ensureDirSync(Te),yw(),Tr.unshift(`CLI Version: ${ut()}`,`Node Version: ${process.version}`,`Platform: ${process.platform}`,`Architecture: ${process.arch}`,`Command: ${t||"N/A"}`,`Exit Code: ${e??0}`,`Memory Usage: ${Math.round(process.memoryUsage().heapUsed/1024/1024)}MB`,`Timestamp: ${new Date().toISOString()}`,...Ou?[`Sync ID: ${Ou}`]:[],"");let n=Tr.map(sw);In.default.writeFileSync(Vs,n.join(`
17
17
  `)),qs&&(console.info(`
18
18
  ${X} An error occurred. See logs for more information:`),console.info(`${js} Latest log: ${Vs}`),console.info(`${js} All logs: ${Te}`)),(process.env.DEBUG||process.argv.includes("--verbose"))&&(console.info(`
19
- ${te} Command completed successfully. Logs written to:`),console.info(`${Tn} Latest log: ${Vs}`),console.info(`${Tn} All logs: ${Te}`))}catch(t){console.error("Failed to write logs:",t)}}var In,Co,PS,iw,Te,sw,aw,lw,Vs,Tr,qs,Au,Pn,p,V=A(()=>{"use strict";In=D(require("fs-extra")),Co=D(require("path"));Ee();PS=require("source-map-support/register");ks();lu();pu();qe();Ws();Se();iw=Fs("webflow-cli"),Te=iw.log;sw=Ou(process.env.MAX_PERSISTED_LOGS,50),aw=Ou(process.env.MAX_IN_MEMORY_LOGS,1e3),lw=`${kr(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,Vs=Co.default.join(Te,lw);Tr=[],qs=!1;Pn=!1;process.on("uncaughtException",e=>{Pn||(Pn=!0,_t(`UNCAUGHT EXCEPTION: ${e?.stack}`),Gs(1)),dt.displayGrouped(),dt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{Pn||(Pn=!0,_t(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),Gs(1)),dt.displayGrouped(),dt.stop(),process.exit(1)});process.on("exit",e=>{Pn||(Pn=!0,Gs(e))});p={debug:e=>{let t=cw(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(uw(e)),warn:e=>console.warn(dw(e),Us),error:(e,t)=>{console.error(pw(e,t))},success:e=>console.log(fw(e)),spinner:mw}});async function Ar(e){try{return await e()}catch(t){throw t instanceof Error&&yw.test(t.message)&&(p.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function Ge(e){return ue()?e.default??!1:Ar(()=>et.confirm(e))}async function tt(e){return ue()?"default"in e?e.default:null:Ar(()=>et.select(e))}async function Re(e){return ue()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:Ar(()=>et.input(e))}async function Eo(e){if(ue()){let t=[];return await e.validate?.(t)!==!0?null:t}return Ar(()=>et.checkbox(e))}async function Ru(e){return ue()?"default"in e?e.default:null:Ar(()=>et.search(e))}var et,yw,Je=A(()=>{"use strict";et=D(require("@inquirer/prompts"));_e();V();yw=/SIGINT/i});function _o({apiToken:e,directory:t}){let n=Ir.resolve(t?Ir.join(t,".env"):Ir.join(process.cwd(),".env"));t&&!Kt.existsSync(t)&&Kt.mkdirSync(t,{recursive:!0}),Kt.existsSync(n)||Kt.writeFileSync(n,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),Ks.default.config({path:n,quiet:!0}),e&&Ks.default.set("WEBFLOW_API_TOKEN",e,{path:n,encrypt:!1})}var Kt,Ir,Ks,Ys=A(()=>{"use strict";Kt=D(require("fs")),Ir=D(require("path")),Ks=D(require("@dotenvx/dotenvx"))});var b,ae=A(()=>{"use strict";b=class e extends Error{prefix;skipLogging;isUserError;constructor(t,n){let r=t instanceof Error?t.message:String(t);super(r),this.name="CLIError",this.prefix=n?.prefix,this.skipLogging=n?.skipLogging??!1,this.isUserError=n?.isUserError??(t instanceof e?t.isUserError:!1),t instanceof Error?(this.cause=t,this.stack=t.stack):Error.captureStackTrace&&Error.captureStackTrace(this,e)}}});var Pr,Xs=A(()=>{"use strict";pe();Pr={serverUrl:An,timeoutMs:5*60*1e3}});var Mu,zu,Uu,Wu,Dw,Vu,vw,qu,Gu=A(()=>{"use strict";Mu=require("crypto"),zu=D(require("open"));Xs();V();Et();Uu=e=>{let t=new Uint8Array(e);return Mu.webcrypto.getRandomValues(t),Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")},Wu=({pollId:e,clientId:t,scope:n})=>`${Pr.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(n.join(" "))}`,Dw=e=>`${Pr.serverUrl}/oauth/webflow/poll?pollId=${e}`,Vu=async e=>{let t=p.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(n=>setTimeout(n,3e3)),await(0,zu.default)(e),t.succeed()}catch{t.fail(),p.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},vw=async e=>{let t=Dw(e),n=await Y(t);if(!n.ok){let r=`Failed to poll for authentication status (${n.status})`;try{let o=await n.json();o&&o.error&&(r+=`: ${o.error}`)}catch{}throw new Error(r)}return n.json()},qu=(e,t)=>{let n=p.spinner("Waiting for authentication");return new Promise((r,o)=>{let i=setTimeout(()=>{clearTimeout(i),clearInterval(s),o(new Error("Authentication timed out. Please try again."))},t),s=setInterval(async()=>{try{let a=await vw(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),n.succeed("Authentication successful! You can close the browser window."),r(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function So(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return e&&!Ju&&(Ju=!0,p.warn(`${Bs} WEBFLOW_SITE_API_TOKEN / WEBFLOW_WORKSPACE_API_TOKEN are deprecated. Please use WEBFLOW_API_TOKEN instead. Run 'webflow auth login --force' to update your .env file.`)),e}async function le(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let r=So();if(r)return r}if(ue())throw new b(`No API token found. To authenticate in CI/CD environments:
19
+ ${te} Command completed successfully. Logs written to:`),console.info(`${Tn} Latest log: ${Vs}`),console.info(`${Tn} All logs: ${Te}`))}catch(t){console.error("Failed to write logs:",t)}}var In,Co,BS,aw,Te,lw,cw,uw,Vs,Tr,qs,Ou,Pn,p,V=A(()=>{"use strict";In=D(require("fs-extra")),Co=D(require("path"));Ee();BS=require("source-map-support/register");ks();cu();fu();qe();Us();Se();aw=Fs("webflow-cli"),Te=aw.log;lw=Iu(process.env.MAX_PERSISTED_LOGS,50),cw=Iu(process.env.MAX_IN_MEMORY_LOGS,1e3),uw=`${kr(new Date().toISOString(),{replacement:"_"}).replace(/\./g,"_")}-debug.log`,Vs=Co.default.join(Te,uw);Tr=[],qs=!1;Pn=!1;process.on("uncaughtException",e=>{Pn||(Pn=!0,_t(`UNCAUGHT EXCEPTION: ${e?.stack}`),Gs(1)),dt.displayGrouped(),dt.stop(),process.exit(1)});process.on("unhandledRejection",e=>{Pn||(Pn=!0,_t(`UNHANDLED REJECTION: ${e instanceof Error?e.stack:String(e)}`),Gs(1)),dt.displayGrouped(),dt.stop(),process.exit(1)});process.on("exit",e=>{Pn||(Pn=!0,Gs(e))});p={debug:e=>{let t=dw(e);process.env.DEBUG&&console.debug(t)},dir:e=>console.dir(e,{depth:100}),info:e=>console.info(pw(e)),warn:e=>console.warn(fw(e),Ws),error:(e,t)=>{console.error(mw(e,t))},success:e=>console.log(hw(e)),spinner:gw}});async function Ar(e){try{return await e()}catch(t){throw t instanceof Error&&ww.test(t.message)&&(p.debug(t.message),process.stdin.isTTY&&typeof process.stdin.setRawMode=="function"&&process.stdin.setRawMode(!1),process.exit(130)),t}}async function Ge(e){return ue()?e.default??!1:Ar(()=>et.confirm(e))}async function tt(e){return ue()?"default"in e?e.default:null:Ar(()=>et.select(e))}async function Re(e){return ue()?e.default!==void 0?await e.validate?.(e.default)!==!0?null:e.default:null:Ar(()=>et.input(e))}async function Eo(e){if(ue()){let t=[];return await e.validate?.(t)!==!0?null:t}return Ar(()=>et.checkbox(e))}async function ju(e){return ue()?"default"in e?e.default:null:Ar(()=>et.search(e))}var et,ww,Je=A(()=>{"use strict";et=D(require("@inquirer/prompts"));_e();V();ww=/SIGINT/i});function _o({apiToken:e,directory:t}){let n=Ir.resolve(t?Ir.join(t,".env"):Ir.join(process.cwd(),".env"));t&&!Kt.existsSync(t)&&Kt.mkdirSync(t,{recursive:!0}),Kt.existsSync(n)||Kt.writeFileSync(n,`# automatically generated at ${new Date().toISOString()}`,{encoding:"utf8"}),Ks.default.config({path:n,quiet:!0}),e&&Ks.default.set("WEBFLOW_API_TOKEN",e,{path:n,encrypt:!1})}var Kt,Ir,Ks,Ys=A(()=>{"use strict";Kt=D(require("fs")),Ir=D(require("path")),Ks=D(require("@dotenvx/dotenvx"))});var b,ae=A(()=>{"use strict";b=class e extends Error{prefix;skipLogging;isUserError;constructor(t,n){let r=t instanceof Error?t.message:String(t);super(r),this.name="CLIError",this.prefix=n?.prefix,this.skipLogging=n?.skipLogging??!1,this.isUserError=n?.isUserError??(t instanceof e?t.isUserError:!1),t instanceof Error?(this.cause=t,this.stack=t.stack):Error.captureStackTrace&&Error.captureStackTrace(this,e)}}});var Pr,Xs=A(()=>{"use strict";pe();Pr={serverUrl:An,timeoutMs:5*60*1e3}});var zu,Wu,Uu,Vu,kw,qu,xw,Gu,Ju=A(()=>{"use strict";zu=require("crypto"),Wu=D(require("open"));Xs();V();Et();Uu=e=>{let t=new Uint8Array(e);return zu.webcrypto.getRandomValues(t),Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")},Vu=({pollId:e,clientId:t,scope:n})=>`${Pr.serverUrl}/oauth/webflow/initiate?pollId=${e}&clientId=${t}&scope=${encodeURIComponent(n.join(" "))}`,kw=e=>`${Pr.serverUrl}/oauth/webflow/poll?pollId=${e}`,qu=async e=>{let t=p.spinner("Opening browser for authentication. Please follow the instructions in your browser");try{await new Promise(n=>setTimeout(n,3e3)),await(0,Wu.default)(e),t.succeed()}catch{t.fail(),p.warn(`Could not automatically open browser. Please open this URL manually: ${e}`)}},xw=async e=>{let t=kw(e),n=await Y(t);if(!n.ok){let r=`Failed to poll for authentication status (${n.status})`;try{let o=await n.json();o&&o.error&&(r+=`: ${o.error}`)}catch{}throw new Error(r)}return n.json()},Gu=(e,t)=>{let n=p.spinner("Waiting for authentication");return new Promise((r,o)=>{let i=setTimeout(()=>{clearTimeout(i),clearInterval(s),o(new Error("Authentication timed out. Please try again."))},t),s=setInterval(async()=>{try{let a=await xw(e);a.status==="success"&&a.accessToken?(clearTimeout(i),clearInterval(s),n.succeed("Authentication successful! You can close the browser window."),r(a.accessToken)):a.status==="error"&&(clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(new Error(a.error||"Authentication failed")))}catch(a){clearTimeout(i),clearInterval(s),n.fail("Authentication failed"),o(a instanceof Error?a:new Error(String(a)))}},2e3)})}});function So(){if(process.env.WEBFLOW_API_TOKEN)return process.env.WEBFLOW_API_TOKEN;let e=process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN??null;return e&&!Hu&&(Hu=!0,p.warn(`${Bs} WEBFLOW_SITE_API_TOKEN / WEBFLOW_WORKSPACE_API_TOKEN are deprecated. Please use WEBFLOW_API_TOKEN instead. Run 'webflow auth login --force' to update your .env file.`)),e}async function le(e){if(e?.apiToken&&!e.force)return e.apiToken;if(!e?.force){let r=So();if(r)return r}if(ue())throw new b(`No API token found. To authenticate in CI/CD environments:
20
20
  1. Generate a Workspace API token in your Webflow Dashboard > Apps & Integrations > Manage > Workspace API Token
21
- 2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=Uu(16),n=kw();try{let r=Wu({pollId:t,clientId:n,scope:Hu});await Vu(r);let o=await qu(t,Pr.timeoutMs);return _o({apiToken:o}),o}catch(r){throw new b(r)}}function kw(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var Hu,Ju,Qs=A(()=>{"use strict";_e();V();Se();ae();Ys();Xs();Gu();Hu=["assets:read","assets:write","authorized_user:read","cloud_apps:write","cms:read","cms:write","code_components:read","code_components:write","devlink_export:read","sites:read","sites:write","workspace:read"],Ju=!1});function Rr(e){let t=e.siteId??process.env.WEBFLOW_SITE_ID??null;return t&&!e.siteId&&he({siteId:t}),t}async function ea(e){try{let n=await new Zu.WebflowClient({accessToken:e,environment:{base:`${U}/v2`,dataApi:`${U}/v2`,contentDeliveryApi:`${xo}/v2`}}).sites.list();if(!n||typeof n!="object"||!n.sites||!Array.isArray(n.sites))throw new b("Invalid response from Webflow API");let r=n.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return r.sort((o,i)=>!o.lastUpdated&&!i.lastUpdated?0:o.lastUpdated?i.lastUpdated?i.lastUpdated.getTime()-o.lastUpdated.getTime():-1:1),r}catch(t){throw new b(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
22
- `})}}async function ta(e){let t=e.map(r=>({name:`${r.displayName} (${r.shortName})`,value:r})),n=await Ru({message:"Search for a Webflow site:",source:r=>{if(!r)return t;let o=r.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!n){if(e.length===0)throw new b("No sites available for selection");return p.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return n}var Zu,To=A(()=>{"use strict";Zu=require("webflow-api");Je();V();be();pe();pe();ae()});async function we(e,t){let n=t?.site??Rr(e);if(ue()&&!n)throw new b(`No site ID configured for this project.
21
+ 2. Set it as the WEBFLOW_API_TOKEN environment variable in your CI/CD pipeline`);let t=Uu(16),n=Cw();try{let r=Vu({pollId:t,clientId:n,scope:Zu});await qu(r);let o=await Gu(t,Pr.timeoutMs);return _o({apiToken:o}),o}catch(r){throw new b(r)}}function Cw(){return"fbab9abdbeeb35bb2554a1b83b8bd060d719f22eca26ff9119b87608c87c0074"}var Zu,Hu,Qs=A(()=>{"use strict";_e();V();Se();ae();Ys();Xs();Ju();Zu=["assets:read","assets:write","authorized_user:read","cloud_apps:write","cms:read","cms:write","code_components:read","code_components:write","devlink_export:read","sites:read","sites:write","workspace:read"],Hu=!1});function Rr(e){let t=e.siteId??process.env.WEBFLOW_SITE_ID??null;return t&&!e.siteId&&he({siteId:t}),t}async function ea(e){try{let n=await new Ku.WebflowClient({accessToken:e,environment:{base:`${W}/v2`,dataApi:`${W}/v2`,contentDeliveryApi:`${xo}/v2`}}).sites.list();if(!n||typeof n!="object"||!n.sites||!Array.isArray(n.sites))throw new b("Invalid response from Webflow API");let r=n.sites.map(o=>({id:o.id,displayName:o.displayName??"",shortName:o.shortName||(o.displayName??"").toLowerCase().replace(/\s+/g,"-"),lastUpdated:o.lastUpdated??null}));return r.sort((o,i)=>!o.lastUpdated&&!i.lastUpdated?0:o.lastUpdated?i.lastUpdated?i.lastUpdated.getTime()-o.lastUpdated.getTime():-1:1),r}catch(t){throw new b(t,{prefix:`Failed to fetch Webflow sites. Please check your authorization.
22
+ `})}}async function ta(e){let t=e.map(r=>({name:`${r.displayName} (${r.shortName})`,value:r})),n=await ju({message:"Search for a Webflow site:",source:r=>{if(!r)return t;let o=r.toLowerCase();return t.filter(i=>i.value.displayName.toLowerCase().includes(o)||i.value.shortName.toLowerCase().includes(o))},pageSize:15});if(!n){if(e.length===0)throw new b("No sites available for selection");return p.warn(`Auto fallback to first site: ${e[0].displayName}`),e[0]}return n}var Ku,To=A(()=>{"use strict";Ku=require("webflow-api");Je();V();be();pe();pe();ae()});async function we(e,t){let n=t?.site??Rr(e);if(ue()&&!n)throw new b(`No site ID configured for this project.
23
23
  Run 'webflow auth login' locally to authenticate and associate this project with a Webflow site,
24
- or provide --site and --api-token when running a CLI command`);let r=await le({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=p.spinner("Fetching your Webflow sites"),i=await ea(r);if(i.length===0)throw o.fail("No Webflow sites found in your account"),new b("Please make sure you have at least one authorized site in your Webflow account");o.succeed(`Found ${i.length} site${i.length>1?"s":""} in your account`);let s=i.length>1?await ta(i):i[0];n=s.id;let a=he({siteId:n});return e.siteId=a.siteId,{siteId:n,siteName:s.displayName,accessToken:r}}return{siteId:n,accessToken:r}}var Ku=A(()=>{"use strict";V();be();_e();Qs();To();ae()});var nt=A(()=>{"use strict";Ys();Qs();Ku();To();To()});async function Ew(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,od.pathToFileURL)(e).href:e)).default}function rd(e,t){let n=t.filter(r=>!e[r]);if(n.length)throw new sa(n.join(", "))}async function Rn(e=[],t=!1){if(!ad){if(t)return{};throw new Ro(pt)}if(!ft)throw new ia;switch(ft){case"js":case"cjs":{await rt.access(pt);let n=await Ew(pt);return rd(n,e),n}case"json":{let n=JSON.parse(await rt.readFile(pt,"utf8"));return rd(n,e),n}default:throw new Po}}function _w(e,t){if(ft==="js"||ft==="cjs"){let r=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(r)return r[1]}}function Sw(e,t,n){let r=_w(t,n);if(r){let o=new RegExp(`${n}: ".*?",`,"g");return e.replace(o,`${n}: process.env.${r},`)}return e}async function Tw(e){let t=["authToken","host","siteId"],n=await rt.readFile(pt,"utf-8");for(let r of t)e=Sw(e,n,r);return e}async function Aw(){try{let e=jr.join(aa,"package.json");return await rt.access(e),JSON.parse(await rt.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function ld(e){if(!ad)throw new Ro(pt);let t=JSON.stringify(e,null,2);switch(ft){case"js":case"cjs":{let n=await Tw(t.replace(/"([^"]+)":/g,"$1:")),r=await Aw()&&ft==="js"?"export default ":"module.exports = ";return rt.writeFile(pt,r+n)}case"json":return rt.writeFile(pt,t);default:throw new Po}}var jr,rt,jo,od,KT,id,aa,sd,ft,pt,ad,ia,Po,Ro,sa,Bo=A(()=>{"use strict";jr=D(require("path")),rt=D(require("fs/promises")),jo=D(require("fs")),od=require("url"),KT=require("dotenv/config"),id=["js","cjs","json"],aa=process.cwd(),sd=".webflowrc",ft=jr.extname(jo.readdirSync(aa).find(e=>e.includes(sd))??"").replace(/\./g,""),pt=jr.join(aa,`${sd}${ft&&`.${ft}`}`),ad=jo.existsSync(pt),ia=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${id.join(", ")}`)}},Po=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${ft}. The supported extensions are: ${id.join(", ")}`)}},Ro=class extends Error{constructor(t){let n=t.includes(".webflowrc"),r=t.includes("webflow.json"),o;n?o=`It seems like you don't have a .webflowrc file in your project (${t}). Make sure there is a .webflowrc file in your project root.`:r?o=`It seems like you don't have a webflow.json file in your project (${t}). Make sure there is a webflow.json file in your project root.`:o=`It seems like you don't have a config file in your project (${t}). Make sure there is a config file in your project root.`,super(o)}},sa=class extends Error{constructor(t){super(`The following required fields are missing or undefined in your .webflowrc file: ${t}. If you're using process.env variables, make sure they're set up correctly.`)}}});async function Lo(e){let{authToken:t,siteId:n}=e||{},{path:r,isUserDefined:o}=Gt(),i=Id.existsSync(r),s=!1;try{let{manifest:a}=H();s=!0,o&&p.info(`Using manifest file: ${r}`);try{let l=xr(a,"devlink");if(!t||!n)throw new Error(`Missing Site ID or API token. Make sure you have WEBFLOW_API_TOKEN and WEBFLOW_SITE_ID set in your environment variables, or pass them as arguments --site and --api-token.
24
+ or provide --site and --api-token when running a CLI command`);let r=await le({apiToken:t?.apiToken,force:t?.force});if(!n||t?.force){let o=p.spinner("Fetching your Webflow sites"),i=await ea(r);if(i.length===0)throw o.fail("No Webflow sites found in your account"),new b("Please make sure you have at least one authorized site in your Webflow account");o.succeed(`Found ${i.length} site${i.length>1?"s":""} in your account`);let s=i.length>1?await ta(i):i[0];n=s.id;let a=he({siteId:n});return e.siteId=a.siteId,{siteId:n,siteName:s.displayName,accessToken:r}}return{siteId:n,accessToken:r}}var Yu=A(()=>{"use strict";V();be();_e();Qs();To();ae()});var nt=A(()=>{"use strict";Ys();Qs();Yu();To();To()});async function Sw(e){return(await import(process.platform==="win32"&&e?.match(/[a-zA-Z]:[\\\/]/)?(0,id.pathToFileURL)(e).href:e)).default}function od(e,t){let n=t.filter(r=>!e[r]);if(n.length)throw new sa(n.join(", "))}async function Rn(e=[],t=!1){if(!ld){if(t)return{};throw new Ro(pt)}if(!ft)throw new ia;switch(ft){case"js":case"cjs":{await rt.access(pt);let n=await Sw(pt);return od(n,e),n}case"json":{let n=JSON.parse(await rt.readFile(pt,"utf8"));return od(n,e),n}default:throw new Po}}function Tw(e,t){if(ft==="js"||ft==="cjs"){let r=new RegExp(`${t}: process.env.([\\w]+),`,"gi").exec(e);if(r)return r[1]}}function Aw(e,t,n){let r=Tw(t,n);if(r){let o=new RegExp(`${n}: ".*?",`,"g");return e.replace(o,`${n}: process.env.${r},`)}return e}async function Ow(e){let t=["authToken","host","siteId"],n=await rt.readFile(pt,"utf-8");for(let r of t)e=Aw(e,n,r);return e}async function Iw(){try{let e=jr.join(aa,"package.json");return await rt.access(e),JSON.parse(await rt.readFile(e,"utf-8"))?.type==="module"}catch{return!1}}async function cd(e){if(!ld)throw new Ro(pt);let t=JSON.stringify(e,null,2);switch(ft){case"js":case"cjs":{let n=await Ow(t.replace(/"([^"]+)":/g,"$1:")),r=await Iw()&&ft==="js"?"export default ":"module.exports = ";return rt.writeFile(pt,r+n)}case"json":return rt.writeFile(pt,t);default:throw new Po}}var jr,rt,jo,id,QT,sd,aa,ad,ft,pt,ld,ia,Po,Ro,sa,Bo=A(()=>{"use strict";jr=D(require("path")),rt=D(require("fs/promises")),jo=D(require("fs")),id=require("url"),QT=require("dotenv/config"),sd=["js","cjs","json"],aa=process.cwd(),ad=".webflowrc",ft=jr.extname(jo.readdirSync(aa).find(e=>e.includes(ad))??"").replace(/\./g,""),pt=jr.join(aa,`${ad}${ft&&`.${ft}`}`),ld=jo.existsSync(pt),ia=class extends Error{constructor(){super(`Missing extension for .webflowrc file. The supported extensions are: ${sd.join(", ")}`)}},Po=class extends Error{constructor(){super(`Unsupported extension for .webflowrc: ${ft}. The supported extensions are: ${sd.join(", ")}`)}},Ro=class extends Error{constructor(t){let n=t.includes(".webflowrc"),r=t.includes("webflow.json"),o;n?o=`It seems like you don't have a .webflowrc file in your project (${t}). Make sure there is a .webflowrc file in your project root.`:r?o=`It seems like you don't have a webflow.json file in your project (${t}). Make sure there is a webflow.json file in your project root.`:o=`It seems like you don't have a config file in your project (${t}). Make sure there is a config file in your project root.`,super(o)}},sa=class extends Error{constructor(t){super(`The following required fields are missing or undefined in your .webflowrc file: ${t}. If you're using process.env variables, make sure they're set up correctly.`)}}});async function Lo(e){let{authToken:t,siteId:n}=e||{},{path:r,isUserDefined:o}=Gt(),i=Pd.existsSync(r),s=!1;try{let{manifest:a}=H();s=!0,o&&p.info(`Using manifest file: ${r}`);try{let l=xr(a,"devlink");if(!t||!n)throw new Error(`Missing Site ID or API token. Make sure you have WEBFLOW_API_TOKEN and WEBFLOW_SITE_ID set in your environment variables, or pass them as arguments --site and --api-token.
25
25
 
26
26
  To set up your credentials, run:
27
- webflow auth login`);return Od(l?.relativeHrefRoot),{...l,host:U,authToken:t,siteId:n,cssModules:!!l?.cssModules,components:jn(l?.components),fileExtensions:{...Ad,...l.fileExtensions},...e}}catch(l){throw new b(l,{prefix:`Failed to read devlink config from manifest file: ${r}
27
+ webflow auth login`);return Id(l?.relativeHrefRoot),{...l,host:W,authToken:t,siteId:n,cssModules:!!l?.cssModules,components:jn(l?.components),fileExtensions:{...Od,...l.fileExtensions},...e}}catch(l){throw new b(l,{prefix:`Failed to read devlink config from manifest file: ${r}
28
28
  `})}}catch(a){if(o||i||s){let l=o?`The manifest file specified via --manifest flag was not found or is invalid: ${r}
29
29
  `:`Your manifest file exists but is invalid or missing required properties: ${r}
30
- `;throw new b(a,{prefix:l})}}try{let a=[];t||a.push("authToken"),n||a.push("siteId");let l=await Rn(a);return Od(l?.relativeHrefRoot),{...l,host:l.host||U,cssModules:!!l?.cssModules,components:jn(l?.components),fileExtensions:{...Ad,...l.fileExtensions},...e}}catch(a){throw a instanceof Error&&a.message.includes(".webflowrc")&&(a.message=`No configuration file found. Please create either:
30
+ `;throw new b(a,{prefix:l})}}try{let a=[];t||a.push("authToken"),n||a.push("siteId");let l=await Rn(a);return Id(l?.relativeHrefRoot),{...l,host:l.host||W,cssModules:!!l?.cssModules,components:jn(l?.components),fileExtensions:{...Od,...l.fileExtensions},...e}}catch(a){throw a instanceof Error&&a.message.includes(".webflowrc")&&(a.message=`No configuration file found. Please create either:
31
31
  - webflow.json with a "devlink" section, or
32
32
  - .webflowrc file
33
- in your project root.`),new b(a)}}function Od(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function jn(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}var Id,Ad,$r=A(()=>{"use strict";V();pe();Bo();be();Id=D(require("fs"));ae();Ad={js:"js",css:"css"}});function Rw(e,t){if(e.includes("..")||He.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let n=He.resolve(t,e),r=He.resolve(t);if(!n.startsWith(r+He.sep)&&n!==r)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function pa(e,t,n){let r=He.join(process.cwd(),t);n&&(0,At.existsSync)(r)&&await(0,Mo.rm)(r,{recursive:!0,force:!0}),(0,At.existsSync)(r)||await(0,Mo.mkdir)(r);for(let o of e){Rw(o.path,r);let i=jw(r,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));Bw(r,s)}(0,At.writeFileSync)(i,o.content,{flag:"w+"})}}function jw(e,t){return He.join(e,...t.split("/"))}function Bw(e,t){let n=t.split("/"),r=e;for(let o of n)r=He.join(r,o),(0,At.existsSync)(r)||(0,At.mkdirSync)(r)}var At,Mo,He,fa=A(()=>{"use strict";At=require("fs"),Mo=require("fs/promises"),He=D(require("path"))});function zo(e,t,n){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:n||`${t}s`;return`${e} ${i}`}var Uo=A(()=>{"use strict"});function ge(e){return e>=48&&e<=57}function Rt(e){return ge(e)||e>=65&&e<=70||e>=97&&e<=102}function Ya(e){return e>=65&&e<=90}function kD(e){return e>=97&&e<=122}function xD(e){return Ya(e)||kD(e)}function CD(e){return e>=128}function ti(e){return xD(e)||CD(e)||e===95}function Xa(e){return ti(e)||ge(e)||e===45}function FD(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ni(e){return e===10||e===13||e===12}function Qt(e){return ni(e)||e===32||e===9}function Ke(e,t){return!(e!==92||ni(t)||t===0)}function Ko(e,t,n){return e===45?ti(t)||t===45||Ke(t,n):ti(e)?!0:e===92?Ke(e,t):!1}function ma(e,t,n){return e===43||e===45?ge(t)?2:t===46&&ge(n)?3:0:e===46?ge(t)?2:0:ge(e)?1:0}function Tp(e){return e===65279||e===65534?1:0}function ha(e){return e<128?Pa[e]:Qa}function zn(e,t){return t<e.length?e.charCodeAt(t):0}function Ra(e,t,n){return n===13&&zn(e,t+1)===10?2:1}function Un(e,t,n){let r=e.charCodeAt(t);return Ya(r)&&(r=r|32),r===n}function Gr(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let i=r.charCodeAt(o-t),s=e.charCodeAt(o);if(Ya(s)&&(s=s|32),s!==i)return!1}return!0}function _D(e,t){for(;t>=0&&Qt(e.charCodeAt(t));t--);return t+1}function Wo(e,t){for(;t<e.length&&Qt(e.charCodeAt(t));t++);return t}function ga(e,t){for(;t<e.length&&ge(e.charCodeAt(t));t++);return t}function en(e,t){if(t+=2,Rt(zn(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&Rt(zn(e,t));t++);let n=zn(e,t);Qt(n)&&(t+=Ra(e,t,n))}return t}function Vo(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!Xa(n)){if(Ke(n,zn(e,t+1))){t=en(e,t)-1;continue}break}}return t}function ci(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),ge(n)&&(t=ga(e,t+1),n=e.charCodeAt(t)),n===46&&ge(e.charCodeAt(t+1))&&(t+=2,t=ga(e,t)),Un(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),ge(n)&&(t=ga(e,t+1+r+1))}return t}function ya(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}Ke(n,zn(e,t+1))&&(t=en(e,t))}return t}function el(e){if(e.length===1&&!Rt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}function ri(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function jd(e){let t=e.source,n=t.length,r=t.length>0?Tp(t.charCodeAt(0)):0,o=ri(e.lines,n),i=ri(e.columns,n),s=e.startLine,a=e.startColumn;for(let l=r;l<n;l++){let c=t.charCodeAt(l);o[l]=s,i[l]=a++,(c===Pd||c===Rd||c===SD)&&(c===Rd&&l+1<n&&t.charCodeAt(l+1)===Pd&&(l++,o[l]=s,i[l]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}function ui(e,t){function n(d){return d<a?e.charCodeAt(d):0}function r(){if(c=ci(e,c),Ko(n(c),n(c+1),n(c+2))){u=12,c=Vo(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let d=c;if(c=Vo(e,c),Gr(e,d,c,"url")&&n(c)===40){if(c=Wo(e,c+1),n(c)===34||n(c)===39){u=2,c=d+4;return}s();return}if(n(c)===40){u=2,c++;return}u=1}function i(d){for(d||(d=n(c++)),u=5;c<e.length;c++){let f=e.charCodeAt(c);switch(ha(f)){case d:c++;return;case Yo:if(ni(f)){c+=Ra(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);ni(m)?c+=Ra(e,c+1,m):Ke(f,m)&&(c=en(e,c)-1);break}}}function s(){for(u=7,c=Wo(e,c);c<e.length;c++){let d=e.charCodeAt(c);switch(ha(d)){case 41:c++;return;case Yo:if(c=Wo(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=ya(e,c),u=8;return;case 34:case 39:case 40:case Op:c=ya(e,c),u=8;return;case 92:if(Ke(d,n(c+1))){c=en(e,c)-1;break}c=ya(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=Tp(n(0)),c=l,u;for(;c<a;){let d=e.charCodeAt(c);switch(ha(d)){case Yo:u=13,c=Wo(e,c+1);break;case 34:i();break;case 35:Xa(n(c+1))||Ke(n(c+1),n(c+2))?(u=4,c=Vo(e,c+1)):(u=9,c++);break;case 39:i();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:ma(d,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:ma(d,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):Ko(d,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:ma(d,n(c+1),n(c+2))?r():(u=9,c++);break;case 47:n(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:n(c+1)===33&&n(c+2)===45&&n(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:Ko(n(c+1),n(c+2),n(c+3))?(u=3,c=Vo(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:Ke(d,n(c+1))?o():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case Ap:r();break;case Qa:o();break;default:u=9,c++}t(u,l,l=c)}}function di(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
34
- `)}})}function Nd({source:e,line:t,column:n},r){function o(u,d){return i.slice(u,d).map((f,m)=>String(u+m+1).padStart(l)+" |"+f).join(`
35
- `)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;n+=($d.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>ba&&(c=n-Bd+3,n=Bd-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,$d),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,ba-2)+(i[u].length>c+ba-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
36
- `)}function Ld(e,t,n,r,o){return Object.assign(di("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return Nd({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
37
- `+Nd({source:t,line:r,column:o},2)}})}function ID(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(o===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}function jD(e){return function(){return this[e]()}}function Da(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}function BD(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Da(e.atrule),pseudo:Da(e.pseudo),node:Da(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=jD(e.parseContext[n]);break}return{config:t,...t,...t.node}}function $D(e){let t="",n="<unknown>",r=!1,o=Md,i=!1,s=new TD,a=Object.assign(new OD,BD(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ID,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===zd?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===zd||l===wa?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===PD||l===wa?1:0},consumeUntilSemicolonIncluded(l){return l===wa?2:0},createList(){return new fe},createSingleNodeList(l){return new fe().appendData(l)},getFirstListNode(l){return l&&l.first},getLastListNode(l){return l&&l.last},parseWithFallback(l,c){let u=this.tokenIndex;try{return l.call(this)}catch(d){if(i)throw d;let f=c.call(this,u);return i=!0,o(d,f),i=!1,f}},lookupNonWSType(l){let c;do if(c=this.lookupType(l++),c!==13)return c;while(c!==Ud);return Ud},charCodeAt(l){return l>=0&&l<t.length?t.charCodeAt(l):0},substring(l,c){return t.substring(l,c)},substrToCursor(l){return this.source.substring(l,this.tokenStart)},cmpChar(l,c){return Un(t,l,c)},cmpStr(l,c,u){return Gr(t,l,c,u)},consume(l){let c=this.tokenStart;return this.eat(l),this.substrToCursor(c)},consumeFunctionName(){let l=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),l},consumeNumber(l){let c=t.substring(this.tokenStart,ci(t,this.tokenStart));return this.eat(l),c},eat(l){if(this.tokenType!==l){let c=Ip[l].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),u=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,d=this.tokenStart;switch(l){case 1:this.tokenType===2||this.tokenType===7?(d=this.tokenEnd-1,u="Identifier is expected but function found"):u="Identifier is expected";break;case 4:this.isDelim(RD)&&(this.next(),d++,u="Name is expected");break;case 11:this.tokenType===10&&(d=this.tokenEnd,u="Percent sign is expected");break}this.error(u,d)}this.next()},eatIdent(l){(this.tokenType!==1||this.lookupValue(0,l)===!1)&&this.error(`Identifier "${l}" is expected`),this.next()},eatDelim(l){this.isDelim(l)||this.error(`Delim "${String.fromCharCode(l)}" is expected`),this.next()},getLocation(l,c){return r?s.getLocationRange(l,c,n):null},getLocationFromList(l){if(r){let c=this.getFirstListNode(l),u=this.getLastListNode(l);return s.getLocationRange(c!==null?c.loc.start.offset-s.startOffset:this.tokenStart,u!==null?u.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(l,c){let u=typeof c<"u"&&c<t.length?s.getLocation(c):this.eof?s.getLocation(_D(t,t.length-1)):s.getLocation(this.tokenStart);throw new Ld(l||"Unexpected input",t,u.offset,u.line,u.column)}});return Object.assign(function(l,c){t=l,c=c||{},a.setSource(t,ui),s.setSource(t,c.offset,c.line,c.column),n=c.filename||"<unknown>",r=!!c.positions,o=typeof c.onParseError=="function"?c.onParseError:Md,i=!1,a.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,a.parseValue="parseValue"in c?!!c.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in c?!!c.parseCustomProperty:!1;let{context:u="default",onComment:d}=c;if(!(u in a.context))throw new Error("Unknown context `"+u+"`");typeof d=="function"&&a.forEachToken((m,g,v)=>{if(m===25){let F=a.getLocation(g,v),S=Gr(t,v-2,v,"*/")?t.slice(g+2,v-2):t.slice(g+2,v);d(S,F)}});let f=a.context[u].call(a,c);return a.eof||a.error(),f},{SyntaxError:Ld,config:a.config})}function LD(e){let t=new ND.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(f){if(f.loc&&f.loc.start&&Wd.has(f.type)){let m=f.loc.start.line,g=f.loc.start.column-1;(r.line!==m||r.column!==g)&&(r.line=m,r.column=g,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:f.loc.source,original:r,generated:n}))}c.call(this,f),l&&Wd.has(f.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(f,m,g){for(let v=0;v<f.length;v++)f.charCodeAt(v)===10?(s++,a=0):a++;u(f,m,g)};let d=e.result;return e.result=function(){return l&&t.addMapping(i),{css:d(),map:t}},e}function Rp(e){let t=new Set(e.map(([n,r])=>va(n)<<16|va(r)));return function(n,r,o){let i=va(r,o),s=o.charCodeAt(0);return(s===zD&&r!==1&&r!==2&&r!==15||s===MD?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}function qD(e,t){if(typeof t=="function"){let n=null;e.children.forEach(r=>{n!==null&&t.call(this,n),this.node(r),n=r});return}e.children.forEach(this.node,this)}function GD(e){ui(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function JD(e){let t=new Map;for(let n in e.node){let r=e.node[n];typeof(r.generate||r)=="function"&&t.set(n,r.generate||r)}return function(n,r){let o="",i=0,s={node(l){if(t.has(l.type))t.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:jp,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===VD&&this.emit(`
38
- `,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=LD(s)),r.mode in ja&&(s.tokenBefore=ja[r.mode]));let a={node:l=>s.node(l),children:qD,token:(l,c)=>s.token(l,c),tokenize:GD};return s.node(n),s.result()}}function HD(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof fe)&&(n.children=new fe().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof fe&&(n.children=n.children.toArray())}}),t}}}function Vd(e){return typeof e=="function"?e:Lr}function qd(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function ZD(e,t){let n=t.structure,r=[];for(let o in n){if(tl.call(n,o)===!1)continue;let i=n[o],s={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let a of i)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function KD(e){let t={};for(let n in e.node)if(tl.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=ZD(n,r)}return t}function Gd(e,t){let n=e.fields.slice(),r=e.context,o=typeof r=="string";return t&&n.reverse(),function(i,s,a,l){let c;o&&(c=s[r],s[r]=i);for(let u of n){let d=i[u.name];if(!u.nullable||d){if(u.type==="list"){if(t?d.reduceRight(l,!1):d.reduce(l,!1))return!0}else if(a(d))return!0}}o&&(s[r]=c)}}function Jd({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function YD(e){let t=KD(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)tl.call(t,c)&&t[c]!==null&&(n[c]=Gd(t[c],!1),r[c]=Gd(t[c],!0));let s=Jd(n),a=Jd(r),l=function(c,u){function d(S,L,x){let O=f.call(F,S,L,x);return O===o?!0:O===i?!1:!!(g.hasOwnProperty(S.type)&&g[S.type](S,F,d,v)||m.call(F,S,L,x)===o)}let f=Lr,m=Lr,g=n,v=(S,L,x,O)=>S||d(L,x,O),F={break:o,skip:i,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")f=u;else if(u&&(f=Vd(u.enter),m=Vd(u.leave),u.reverse&&(g=r),u.visit)){if(s.hasOwnProperty(u.visit))g=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");f=qd(f,u.visit),m=qd(m,u.visit)}if(f===Lr&&m===Lr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");d(c)};return l.break=o,l.skip=i,l.find=function(c,u){let d=null;return l(c,function(f,m,g){if(u.call(this,f,m,g))return d=f,o}),d},l.findLast=function(c,u){let d=null;return l(c,{reverse:!0,enter(f,m,g){if(u.call(this,f,m,g))return d=f,o}}),d},l.findAll=function(c,u){let d=[];return l(c,function(f,m,g){u.call(this,f,m,g)&&d.push(f)}),d},l}function XD(e){return e}function QD(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?"#?":"*":t===0&&n===1?"?":t===1&&n===0?r?"#":"+":t===1&&n===1?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(n!==0?n:"")+"}")}function e0(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function t0(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>nl(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function nl(e,t,n,r){let o;switch(e.type){case"Group":o=t0(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return nl(e.term,t,n,r)+t(QD(e),e);case"Type":o="<"+e.name+(e.opts?t(e0(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function pi(e,t){let n=XD,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),nl(e,n,r,o)}function n0(e,t){let n=e.tokens,r=e.longestMatch,o=r<n.length&&n[r].node||null,i=o!==t?o:null,s=0,a=0,l=0,c="",u,d;for(let f=0;f<n.length;f++){let m=n[f].value;f===r&&(a=m.length,s=c.length),i!==null&&n[f].node===i&&(f<=r?l++:l=0),c+=m}return r===n.length||l>1?(u=qo(i||t,"end")||Mr(Hd,c),d=Mr(u)):(u=qo(i,"start")||Mr(qo(t,"start")||Hd,c.slice(0,s)),d=qo(i,"end")||Mr(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:d}}function qo(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Mr(n):n:null}function Mr({offset:e,line:t,column:n},r){let o={offset:e,line:t,column:n};if(r){let i=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=i.length-1,o.column=i.length===1?o.column+r.length:i.pop().length+1}return o}function rl(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===oi&&e.charCodeAt(t+1)===oi}function Bp(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===oi&&e.charCodeAt(t+1)!==oi){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function o0(e){if(Go.has(e))return Go.get(e);let t=e.toLowerCase(),n=Go.get(t);if(n===void 0){let r=rl(t,0),o=r?"":Bp(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return Go.set(e,n),n}function i0(e){if($n.has(e))return $n.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=rl(t,n.length);if(!r&&(t=t.toLowerCase(),$n.has(t))){let a=$n.get(t);return $n.set(e,a),a}let o=r?"":Bp(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return $n.set(e,s),s}function Ba(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Vr(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Pt(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===Jr||o===ot){if(n)return 0;t++}for(;t<e.value.length;t++)if(!ge(e.value.charCodeAt(t)))return 0;return r+1}function Ca(e,t,n){let r=!1,o=Vr(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(Ba(e,Jr)||Ba(e,ot)){if(r=!0,o=Vr(n(++o),o,n),e=n(o),e===null||e.type!==10)return 0}else return t;if(!r){let i=e.value.charCodeAt(0);if(i!==Jr&&i!==ot)return 0}return Pt(e,r?0:1,r,o)}function a0(e,t){let n=0;if(!e)return 0;if(e.type===10)return Pt(e,0,s0,n);if(e.type===1&&e.value.charCodeAt(0)===ot){if(!Un(e.value,1,xa))return 0;switch(e.value.length){case 2:return Ca(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==ot?0:(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n));default:return e.value.charCodeAt(2)!==ot?0:Pt(e,3,Nn,n)}}else if(e.type===1||Ba(e,Jr)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Un(e.value,0,xa))return 0;switch(e.value.length){case 1:return Ca(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==ot?0:(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n));default:return e.value.charCodeAt(1)!==ot?0:Pt(e,2,Nn,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===Jr||r===ot?1:0,i=o;for(;i<e.value.length&&ge(e.value.charCodeAt(i));i++);return i===o||!Un(e.value,i,xa)?0:i+1===e.value.length?Ca(t(++n),n,t):e.value.charCodeAt(i+1)!==ot?0:i+2===e.value.length?(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n)):Pt(e,i+2,Nn,n)}return 0}function $a(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function u0(e,t){return e.value.charCodeAt(0)===t}function zr(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===Np&&n&&r!==0)return zr(e,t+r+1,!1),6;if(!Rt(i)||++r>6)return 0}return r}function Jo(e,t,n){if(!e)return 0;for(;$a(n(t),Lp);){if(++e>6)return 0;t++}return t}function d0(e,t){let n=0;if(e===null||e.type!==1||!Un(e.value,0,c0)||(e=t(++n),e===null))return 0;if($a(e,l0))return e=t(++n),e===null?0:e.type===1?Jo(zr(e,0,!0),++n,t):$a(e,Lp)?Jo(1,++n,t):0;if(e.type===10){let r=zr(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!u0(e,Np)||!zr(e,1,!1)?0:n+1:Jo(r,n,t))}return e.type===12?Jo(zr(e,1,!0),++n,t):0}function Ye(e,t){return t<e.length?e.charCodeAt(t):0}function Mp(e,t){return Gr(e,0,e.length,t)}function zp(e,t){for(let n=0;n<t.length;n++)if(Mp(e,t[n]))return!0;return!1}function Up(e,t){return t!==e.length-2?!1:Ye(e,t)===92&&ge(Ye(e,t+1))}function fi(e,t,n){if(e&&e.type==="Range"){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!="string"||e.max!==null&&r>e.max&&typeof e.max!="string")return!0}return!1}function f0(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),r.length===0){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function $e(e){return function(t,n,r){return t===null?0:t.type===2&&zp(t.value,p0)?f0(t,n):e(t,n,r)}}function ne(e){return function(t){return t===null||t.type!==e?0:1}}function m0(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return zp(t,$p)||Mp(t,"default")?0:1}function h0(e){return e===null||e.type!==1||Ye(e.value,0)!==45||Ye(e.value,1)!==45?0:1}function g0(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!Rt(Ye(e.value,n)))return 0;return 1}function y0(e){return e===null||e.type!==4||!Ko(Ye(e.value,1),Ye(e.value,2),Ye(e.value,3))?0:1}function b0(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(n===0)break e;break;case 9:if(n===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function w0(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function mt(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=ci(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!Up(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return fi(r,t.value,o)?0:1}}function D0(e,t,n){return e===null||e.type!==11||fi(n,e.value,e.value.length-1)?0:1}function Wp(e){return typeof e!="function"&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function v0(e,t,n){if(e===null)return 0;let r=ci(e.value,0);return r!==e.value.length&&!Up(e.value,r)||fi(n,e.value,r)?0:1}function k0(e,t,n){if(e===null||e.type!==10)return 0;let r=Ye(e.value,0)===43||Ye(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!ge(Ye(e.value,r)))return 0;return fi(n,e.value,r)?0:1}function F0(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:$e(mt(null)),angle:$e(mt(t)),decibel:$e(mt(n)),frequency:$e(mt(r)),flex:$e(mt(o)),length:$e(Wp(mt(i))),resolution:$e(mt(s)),semitones:$e(mt(a)),time:$e(mt(l))}}function E0(e){return{...x0,...C0,...F0(e)}}function Vp(e,t,n){return Object.assign(di("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
33
+ in your project root.`),new b(a)}}function Id(e){if(!(e===void 0||e===!1)){if(typeof e=="string"){if(e==="/"||e.startsWith("http://")||e.startsWith("https://"))return;throw new Error(`Invalid relativeHrefRoot value "${e}". Must be false, "/" or an absolute URL starting with http:// or https://`)}throw new Error(`Invalid relativeHrefRoot type. Must be false, "/" or an absolute URL string, got: ${typeof e}`)}}function jn(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>`^${t}$`).join("|")}var Pd,Od,$r=A(()=>{"use strict";V();pe();Bo();be();Pd=D(require("fs"));ae();Od={js:"js",css:"css"}});function Bw(e,t){if(e.includes("..")||He.isAbsolute(e))throw new Error(`Invalid file path: "${e}" - path traversal not allowed`);let n=He.resolve(t,e),r=He.resolve(t);if(!n.startsWith(r+He.sep)&&n!==r)throw new Error(`Invalid file path: "${e}" - resolves outside root directory`)}async function pa(e,t,n){let r=He.join(process.cwd(),t);n&&(0,At.existsSync)(r)&&await(0,Mo.rm)(r,{recursive:!0,force:!0}),(0,At.existsSync)(r)||await(0,Mo.mkdir)(r);for(let o of e){Bw(o.path,r);let i=$w(r,o.path);if(o.path.includes("/")){let s=o.path.substring(0,o.path.lastIndexOf("/"));Nw(r,s)}(0,At.writeFileSync)(i,o.content,{flag:"w+"})}}function $w(e,t){return He.join(e,...t.split("/"))}function Nw(e,t){let n=t.split("/"),r=e;for(let o of n)r=He.join(r,o),(0,At.existsSync)(r)||(0,At.mkdirSync)(r)}var At,Mo,He,fa=A(()=>{"use strict";At=require("fs"),Mo=require("fs/promises"),He=D(require("path"))});function zo(e,t,n){let i=new Intl.PluralRules("en-US").select(e)==="one"&&e===1?t:n||`${t}s`;return`${e} ${i}`}var Wo=A(()=>{"use strict"});function ge(e){return e>=48&&e<=57}function Rt(e){return ge(e)||e>=65&&e<=70||e>=97&&e<=102}function Ya(e){return e>=65&&e<=90}function CD(e){return e>=97&&e<=122}function FD(e){return Ya(e)||CD(e)}function ED(e){return e>=128}function ti(e){return FD(e)||ED(e)||e===95}function Xa(e){return ti(e)||ge(e)||e===45}function _D(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function ni(e){return e===10||e===13||e===12}function Qt(e){return ni(e)||e===32||e===9}function Ke(e,t){return!(e!==92||ni(t)||t===0)}function Ko(e,t,n){return e===45?ti(t)||t===45||Ke(t,n):ti(e)?!0:e===92?Ke(e,t):!1}function ma(e,t,n){return e===43||e===45?ge(t)?2:t===46&&ge(n)?3:0:e===46?ge(t)?2:0:ge(e)?1:0}function Ap(e){return e===65279||e===65534?1:0}function ha(e){return e<128?Pa[e]:Qa}function zn(e,t){return t<e.length?e.charCodeAt(t):0}function Ra(e,t,n){return n===13&&zn(e,t+1)===10?2:1}function Wn(e,t,n){let r=e.charCodeAt(t);return Ya(r)&&(r=r|32),r===n}function Gr(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let o=t;o<n;o++){let i=r.charCodeAt(o-t),s=e.charCodeAt(o);if(Ya(s)&&(s=s|32),s!==i)return!1}return!0}function TD(e,t){for(;t>=0&&Qt(e.charCodeAt(t));t--);return t+1}function Uo(e,t){for(;t<e.length&&Qt(e.charCodeAt(t));t++);return t}function ga(e,t){for(;t<e.length&&ge(e.charCodeAt(t));t++);return t}function en(e,t){if(t+=2,Rt(zn(e,t-1))){for(let r=Math.min(e.length,t+5);t<r&&Rt(zn(e,t));t++);let n=zn(e,t);Qt(n)&&(t+=Ra(e,t,n))}return t}function Vo(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!Xa(n)){if(Ke(n,zn(e,t+1))){t=en(e,t)-1;continue}break}}return t}function ci(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),ge(n)&&(t=ga(e,t+1),n=e.charCodeAt(t)),n===46&&ge(e.charCodeAt(t+1))&&(t+=2,t=ga(e,t)),Wn(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),ge(n)&&(t=ga(e,t+1+r+1))}return t}function ya(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}Ke(n,zn(e,t+1))&&(t=en(e,t))}return t}function el(e){if(e.length===1&&!Rt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}function ri(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function Bd(e){let t=e.source,n=t.length,r=t.length>0?Ap(t.charCodeAt(0)):0,o=ri(e.lines,n),i=ri(e.columns,n),s=e.startLine,a=e.startColumn;for(let l=r;l<n;l++){let c=t.charCodeAt(l);o[l]=s,i[l]=a++,(c===Rd||c===jd||c===AD)&&(c===jd&&l+1<n&&t.charCodeAt(l+1)===Rd&&(l++,o[l]=s,i[l]=a),s++,a=1)}o[n]=s,i[n]=a,e.lines=o,e.columns=i,e.computed=!0}function ui(e,t){function n(d){return d<a?e.charCodeAt(d):0}function r(){if(c=ci(e,c),Ko(n(c),n(c+1),n(c+2))){u=12,c=Vo(e,c);return}if(n(c)===37){u=11,c++;return}u=10}function o(){let d=c;if(c=Vo(e,c),Gr(e,d,c,"url")&&n(c)===40){if(c=Uo(e,c+1),n(c)===34||n(c)===39){u=2,c=d+4;return}s();return}if(n(c)===40){u=2,c++;return}u=1}function i(d){for(d||(d=n(c++)),u=5;c<e.length;c++){let f=e.charCodeAt(c);switch(ha(f)){case d:c++;return;case Yo:if(ni(f)){c+=Ra(e,c,f),u=6;return}break;case 92:if(c===e.length-1)break;let m=n(c+1);ni(m)?c+=Ra(e,c+1,m):Ke(f,m)&&(c=en(e,c)-1);break}}}function s(){for(u=7,c=Uo(e,c);c<e.length;c++){let d=e.charCodeAt(c);switch(ha(d)){case 41:c++;return;case Yo:if(c=Uo(e,c),n(c)===41||c>=e.length){c<e.length&&c++;return}c=ya(e,c),u=8;return;case 34:case 39:case 40:case Ip:c=ya(e,c),u=8;return;case 92:if(Ke(d,n(c+1))){c=en(e,c)-1;break}c=ya(e,c),u=8;return}}}e=String(e||"");let a=e.length,l=Ap(n(0)),c=l,u;for(;c<a;){let d=e.charCodeAt(c);switch(ha(d)){case Yo:u=13,c=Uo(e,c+1);break;case 34:i();break;case 35:Xa(n(c+1))||Ke(n(c+1),n(c+2))?(u=4,c=Vo(e,c+1)):(u=9,c++);break;case 39:i();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:ma(d,n(c+1),n(c+2))?r():(u=9,c++);break;case 44:u=18,c++;break;case 45:ma(d,n(c+1),n(c+2))?r():n(c+1)===45&&n(c+2)===62?(u=15,c=c+3):Ko(d,n(c+1),n(c+2))?o():(u=9,c++);break;case 46:ma(d,n(c+1),n(c+2))?r():(u=9,c++);break;case 47:n(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:n(c+1)===33&&n(c+2)===45&&n(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:Ko(n(c+1),n(c+2),n(c+3))?(u=3,c=Vo(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:Ke(d,n(c+1))?o():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case Op:r();break;case Qa:o();break;default:u=9,c++}t(u,l,l=c)}}function di(e,t){let n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
34
+ `)}})}function Ld({source:e,line:t,column:n},r){function o(u,d){return i.slice(u,d).map((f,m)=>String(u+m+1).padStart(l)+" |"+f).join(`
35
+ `)}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-r)-1,a=Math.min(t+r,i.length+1),l=Math.max(4,String(a).length)+1,c=0;n+=(Nd.length-1)*(i[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>ba&&(c=n-$d+3,n=$d-2);for(let u=s;u<=a;u++)u>=0&&u<i.length&&(i[u]=i[u].replace(/\t/g,Nd),i[u]=(c>0&&i[u].length>c?"\u2026":"")+i[u].substr(c,ba-2)+(i[u].length>c+ba-1?"\u2026":""));return[o(s,t),new Array(n+l+2).join("-")+"^",o(t,a)].filter(Boolean).join(`
36
+ `)}function Md(e,t,n,r,o){return Object.assign(di("SyntaxError",e),{source:t,offset:n,line:r,column:o,sourceFragment(i){return Ld({source:t,line:r,column:o},isNaN(i)?0:i)},get formattedMessage(){return`Parse error: ${e}
37
+ `+Ld({source:t,line:r,column:o},2)}})}function RD(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let o=e.getNode.call(this,r);if(o===void 0)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,r),n=!1),t.push(o)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}function $D(e){return function(){return this[e]()}}function Da(e){let t=Object.create(null);for(let n in e){let r=e[n],o=r.parse||r;o&&(t[n]=o)}return t}function ND(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Da(e.atrule),pseudo:Da(e.pseudo),node:Da(e.node)};for(let n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=$D(e.parseContext[n]);break}return{config:t,...t,...t.node}}function LD(e){let t="",n="<unknown>",r=!1,o=zd,i=!1,s=new OD,a=Object.assign(new PD,ND(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:RD,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(l){return l===Wd?1:0},consumeUntilLeftCurlyBracketOrSemicolon(l){return l===Wd||l===wa?1:0},consumeUntilExclamationMarkOrSemicolon(l){return l===jD||l===wa?1:0},consumeUntilSemicolonIncluded(l){return l===wa?2:0},createList(){return new fe},createSingleNodeList(l){return new fe().appendData(l)},getFirstListNode(l){return l&&l.first},getLastListNode(l){return l&&l.last},parseWithFallback(l,c){let u=this.tokenIndex;try{return l.call(this)}catch(d){if(i)throw d;let f=c.call(this,u);return i=!0,o(d,f),i=!1,f}},lookupNonWSType(l){let c;do if(c=this.lookupType(l++),c!==13)return c;while(c!==Ud);return Ud},charCodeAt(l){return l>=0&&l<t.length?t.charCodeAt(l):0},substring(l,c){return t.substring(l,c)},substrToCursor(l){return this.source.substring(l,this.tokenStart)},cmpChar(l,c){return Wn(t,l,c)},cmpStr(l,c,u){return Gr(t,l,c,u)},consume(l){let c=this.tokenStart;return this.eat(l),this.substrToCursor(c)},consumeFunctionName(){let l=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),l},consumeNumber(l){let c=t.substring(this.tokenStart,ci(t,this.tokenStart));return this.eat(l),c},eat(l){if(this.tokenType!==l){let c=Pp[l].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase()),u=`${/[[\](){}]/.test(c)?`"${c}"`:c} is expected`,d=this.tokenStart;switch(l){case 1:this.tokenType===2||this.tokenType===7?(d=this.tokenEnd-1,u="Identifier is expected but function found"):u="Identifier is expected";break;case 4:this.isDelim(BD)&&(this.next(),d++,u="Name is expected");break;case 11:this.tokenType===10&&(d=this.tokenEnd,u="Percent sign is expected");break}this.error(u,d)}this.next()},eatIdent(l){(this.tokenType!==1||this.lookupValue(0,l)===!1)&&this.error(`Identifier "${l}" is expected`),this.next()},eatDelim(l){this.isDelim(l)||this.error(`Delim "${String.fromCharCode(l)}" is expected`),this.next()},getLocation(l,c){return r?s.getLocationRange(l,c,n):null},getLocationFromList(l){if(r){let c=this.getFirstListNode(l),u=this.getLastListNode(l);return s.getLocationRange(c!==null?c.loc.start.offset-s.startOffset:this.tokenStart,u!==null?u.loc.end.offset-s.startOffset:this.tokenStart,n)}return null},error(l,c){let u=typeof c<"u"&&c<t.length?s.getLocation(c):this.eof?s.getLocation(TD(t,t.length-1)):s.getLocation(this.tokenStart);throw new Md(l||"Unexpected input",t,u.offset,u.line,u.column)}});return Object.assign(function(l,c){t=l,c=c||{},a.setSource(t,ui),s.setSource(t,c.offset,c.line,c.column),n=c.filename||"<unknown>",r=!!c.positions,o=typeof c.onParseError=="function"?c.onParseError:zd,i=!1,a.parseAtrulePrelude="parseAtrulePrelude"in c?!!c.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in c?!!c.parseRulePrelude:!0,a.parseValue="parseValue"in c?!!c.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in c?!!c.parseCustomProperty:!1;let{context:u="default",onComment:d}=c;if(!(u in a.context))throw new Error("Unknown context `"+u+"`");typeof d=="function"&&a.forEachToken((m,g,v)=>{if(m===25){let F=a.getLocation(g,v),S=Gr(t,v-2,v,"*/")?t.slice(g+2,v-2):t.slice(g+2,v);d(S,F)}});let f=a.context[u].call(a,c);return a.eof||a.error(),f},{SyntaxError:Md,config:a.config})}function zD(e){let t=new MD.SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(f){if(f.loc&&f.loc.start&&Vd.has(f.type)){let m=f.loc.start.line,g=f.loc.start.column-1;(r.line!==m||r.column!==g)&&(r.line=m,r.column=g,n.line=s,n.column=a,l&&(l=!1,(n.line!==o.line||n.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:f.loc.source,original:r,generated:n}))}c.call(this,f),l&&Vd.has(f.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(f,m,g){for(let v=0;v<f.length;v++)f.charCodeAt(v)===10?(s++,a=0):a++;u(f,m,g)};let d=e.result;return e.result=function(){return l&&t.addMapping(i),{css:d(),map:t}},e}function jp(e){let t=new Set(e.map(([n,r])=>va(n)<<16|va(r)));return function(n,r,o){let i=va(r,o),s=o.charCodeAt(0);return(s===UD&&r!==1&&r!==2&&r!==15||s===WD?t.has(n<<16|s<<8):t.has(n<<16|i))&&this.emit(" ",13,!0),i}}function JD(e,t){if(typeof t=="function"){let n=null;e.children.forEach(r=>{n!==null&&t.call(this,n),this.node(r),n=r});return}e.children.forEach(this.node,this)}function HD(e){ui(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function ZD(e){let t=new Map;for(let n in e.node){let r=e.node[n];typeof(r.generate||r)=="function"&&t.set(n,r.generate||r)}return function(n,r){let o="",i=0,s={node(l){if(t.has(l.type))t.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:Bp,token(l,c){i=this.tokenBefore(i,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===GD&&this.emit(`
38
+ `,13,!0)},emit(l){o+=l},result(){return o}};r&&(typeof r.decorator=="function"&&(s=r.decorator(s)),r.sourceMap&&(s=zD(s)),r.mode in ja&&(s.tokenBefore=ja[r.mode]));let a={node:l=>s.node(l),children:JD,token:(l,c)=>s.token(l,c),tokenize:HD};return s.node(n),s.result()}}function KD(e){return{fromPlainObject(t){return e(t,{enter(n){n.children&&!(n.children instanceof fe)&&(n.children=new fe().fromArray(n.children))}}),t},toPlainObject(t){return e(t,{leave(n){n.children&&n.children instanceof fe&&(n.children=n.children.toArray())}}),t}}}function qd(e){return typeof e=="function"?e:Lr}function Gd(e,t){return function(n,r,o){n.type===t&&e.call(this,n,r,o)}}function YD(e,t){let n=t.structure,r=[];for(let o in n){if(tl.call(n,o)===!1)continue;let i=n[o],s={name:o,type:!1,nullable:!1};Array.isArray(i)||(i=[i]);for(let a of i)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&r.push(s)}return r.length?{context:t.walkContext,fields:r}:null}function XD(e){let t={};for(let n in e.node)if(tl.call(e.node,n)){let r=e.node[n];if(!r.structure)throw new Error("Missed `structure` field in `"+n+"` node type definition");t[n]=YD(n,r)}return t}function Jd(e,t){let n=e.fields.slice(),r=e.context,o=typeof r=="string";return t&&n.reverse(),function(i,s,a,l){let c;o&&(c=s[r],s[r]=i);for(let u of n){let d=i[u.name];if(!u.nullable||d){if(u.type==="list"){if(t?d.reduceRight(l,!1):d.reduce(l,!1))return!0}else if(a(d))return!0}}o&&(s[r]=c)}}function Hd({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:o}}}function QD(e){let t=XD(e),n={},r={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let c in t)tl.call(t,c)&&t[c]!==null&&(n[c]=Jd(t[c],!1),r[c]=Jd(t[c],!0));let s=Hd(n),a=Hd(r),l=function(c,u){function d(S,L,x){let O=f.call(F,S,L,x);return O===o?!0:O===i?!1:!!(g.hasOwnProperty(S.type)&&g[S.type](S,F,d,v)||m.call(F,S,L,x)===o)}let f=Lr,m=Lr,g=n,v=(S,L,x,O)=>S||d(L,x,O),F={break:o,skip:i,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")f=u;else if(u&&(f=qd(u.enter),m=qd(u.leave),u.reverse&&(g=r),u.visit)){if(s.hasOwnProperty(u.visit))g=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");f=Gd(f,u.visit),m=Gd(m,u.visit)}if(f===Lr&&m===Lr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");d(c)};return l.break=o,l.skip=i,l.find=function(c,u){let d=null;return l(c,function(f,m,g){if(u.call(this,f,m,g))return d=f,o}),d},l.findLast=function(c,u){let d=null;return l(c,{reverse:!0,enter(f,m,g){if(u.call(this,f,m,g))return d=f,o}}),d},l.findAll=function(c,u){let d=[];return l(c,function(f,m,g){u.call(this,f,m,g)&&d.push(f)}),d},l}function e0(e){return e}function t0(e){let{min:t,max:n,comma:r}=e;return t===0&&n===0?r?"#?":"*":t===0&&n===1?"?":t===1&&n===0?r?"#":"+":t===1&&n===1?"":(r?"#":"")+(t===n?"{"+t+"}":"{"+t+","+(n!==0?n:"")+"}")}function n0(e){switch(e.type){case"Range":return" ["+(e.min===null?"-\u221E":e.min)+","+(e.max===null?"\u221E":e.max)+"]";default:throw new Error("Unknown node type `"+e.type+"`")}}function r0(e,t,n,r){let o=e.combinator===" "||r?e.combinator:" "+e.combinator+" ",i=e.terms.map(s=>nl(s,t,n,r)).join(o);return e.explicit||n?(r||i[0]===","?"[":"[ ")+i+(r?"]":" ]"):i}function nl(e,t,n,r){let o;switch(e.type){case"Group":o=r0(e,t,n,r)+(e.disallowEmpty?"!":"");break;case"Multiplier":return nl(e.term,t,n,r)+t(t0(e),e);case"Type":o="<"+e.name+(e.opts?t(n0(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function pi(e,t){let n=e0,r=!1,o=!1;return typeof t=="function"?n=t:t&&(r=!!t.forceBraces,o=!!t.compact,typeof t.decorate=="function"&&(n=t.decorate)),nl(e,n,r,o)}function o0(e,t){let n=e.tokens,r=e.longestMatch,o=r<n.length&&n[r].node||null,i=o!==t?o:null,s=0,a=0,l=0,c="",u,d;for(let f=0;f<n.length;f++){let m=n[f].value;f===r&&(a=m.length,s=c.length),i!==null&&n[f].node===i&&(f<=r?l++:l=0),c+=m}return r===n.length||l>1?(u=qo(i||t,"end")||Mr(Zd,c),d=Mr(u)):(u=qo(i,"start")||Mr(qo(t,"start")||Zd,c.slice(0,s)),d=qo(i,"end")||Mr(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:d}}function qo(e,t){let n=e&&e.loc&&e.loc[t];return n?"line"in n?Mr(n):n:null}function Mr({offset:e,line:t,column:n},r){let o={offset:e,line:t,column:n};if(r){let i=r.split(/\n|\r\n?|\f/);o.offset+=r.length,o.line+=i.length-1,o.column=i.length===1?o.column+r.length:i.pop().length+1}return o}function rl(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===oi&&e.charCodeAt(t+1)===oi}function $p(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===oi&&e.charCodeAt(t+1)!==oi){let n=e.indexOf("-",t+2);if(n!==-1)return e.substring(t,n+1)}return""}function s0(e){if(Go.has(e))return Go.get(e);let t=e.toLowerCase(),n=Go.get(t);if(n===void 0){let r=rl(t,0),o=r?"":$p(t,0);n=Object.freeze({basename:t.substr(o.length),name:t,prefix:o,vendor:o,custom:r})}return Go.set(e,n),n}function a0(e){if($n.has(e))return $n.get(e);let t=e,n=e[0];n==="/"?n=e[1]==="/"?"//":"/":n!=="_"&&n!=="*"&&n!=="$"&&n!=="#"&&n!=="+"&&n!=="&"&&(n="");let r=rl(t,n.length);if(!r&&(t=t.toLowerCase(),$n.has(t))){let a=$n.get(t);return $n.set(e,a),a}let o=r?"":$p(t,n.length),i=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(n.length),hack:n,vendor:o,prefix:i,custom:r});return $n.set(e,s),s}function Ba(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function Vr(e,t,n){for(;e!==null&&(e.type===13||e.type===25);)e=n(++t);return t}function Pt(e,t,n,r){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===Jr||o===ot){if(n)return 0;t++}for(;t<e.value.length;t++)if(!ge(e.value.charCodeAt(t)))return 0;return r+1}function Ca(e,t,n){let r=!1,o=Vr(e,t,n);if(e=n(o),e===null)return t;if(e.type!==10)if(Ba(e,Jr)||Ba(e,ot)){if(r=!0,o=Vr(n(++o),o,n),e=n(o),e===null||e.type!==10)return 0}else return t;if(!r){let i=e.value.charCodeAt(0);if(i!==Jr&&i!==ot)return 0}return Pt(e,r?0:1,r,o)}function c0(e,t){let n=0;if(!e)return 0;if(e.type===10)return Pt(e,0,l0,n);if(e.type===1&&e.value.charCodeAt(0)===ot){if(!Wn(e.value,1,xa))return 0;switch(e.value.length){case 2:return Ca(t(++n),n,t);case 3:return e.value.charCodeAt(2)!==ot?0:(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n));default:return e.value.charCodeAt(2)!==ot?0:Pt(e,3,Nn,n)}}else if(e.type===1||Ba(e,Jr)&&t(n+1).type===1){if(e.type!==1&&(e=t(++n)),e===null||!Wn(e.value,0,xa))return 0;switch(e.value.length){case 1:return Ca(t(++n),n,t);case 2:return e.value.charCodeAt(1)!==ot?0:(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n));default:return e.value.charCodeAt(1)!==ot?0:Pt(e,2,Nn,n)}}else if(e.type===12){let r=e.value.charCodeAt(0),o=r===Jr||r===ot?1:0,i=o;for(;i<e.value.length&&ge(e.value.charCodeAt(i));i++);return i===o||!Wn(e.value,i,xa)?0:i+1===e.value.length?Ca(t(++n),n,t):e.value.charCodeAt(i+1)!==ot?0:i+2===e.value.length?(n=Vr(t(++n),n,t),e=t(n),Pt(e,0,Nn,n)):Pt(e,i+2,Nn,n)}return 0}function $a(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function p0(e,t){return e.value.charCodeAt(0)===t}function zr(e,t,n){let r=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(i===Lp&&n&&r!==0)return zr(e,t+r+1,!1),6;if(!Rt(i)||++r>6)return 0}return r}function Jo(e,t,n){if(!e)return 0;for(;$a(n(t),Mp);){if(++e>6)return 0;t++}return t}function f0(e,t){let n=0;if(e===null||e.type!==1||!Wn(e.value,0,d0)||(e=t(++n),e===null))return 0;if($a(e,u0))return e=t(++n),e===null?0:e.type===1?Jo(zr(e,0,!0),++n,t):$a(e,Mp)?Jo(1,++n,t):0;if(e.type===10){let r=zr(e,1,!0);return r===0?0:(e=t(++n),e===null?n:e.type===12||e.type===10?!p0(e,Lp)||!zr(e,1,!1)?0:n+1:Jo(r,n,t))}return e.type===12?Jo(zr(e,1,!0),++n,t):0}function Ye(e,t){return t<e.length?e.charCodeAt(t):0}function zp(e,t){return Gr(e,0,e.length,t)}function Wp(e,t){for(let n=0;n<t.length;n++)if(zp(e,t[n]))return!0;return!1}function Up(e,t){return t!==e.length-2?!1:Ye(e,t)===92&&ge(Ye(e,t+1))}function fi(e,t,n){if(e&&e.type==="Range"){let r=Number(n!==void 0&&n!==t.length?t.substr(0,n):t);if(isNaN(r)||e.min!==null&&r<e.min&&typeof e.min!="string"||e.max!==null&&r>e.max&&typeof e.max!="string")return!0}return!1}function h0(e,t){let n=0,r=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==n)break e;if(n=r.pop(),r.length===0){o++;break e}break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function $e(e){return function(t,n,r){return t===null?0:t.type===2&&Wp(t.value,m0)?h0(t,n):e(t,n,r)}}function ne(e){return function(t){return t===null||t.type!==e?0:1}}function g0(e){if(e===null||e.type!==1)return 0;let t=e.value.toLowerCase();return Wp(t,Np)||zp(t,"default")?0:1}function y0(e){return e===null||e.type!==1||Ye(e.value,0)!==45||Ye(e.value,1)!==45?0:1}function b0(e){if(e===null||e.type!==4)return 0;let t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let n=1;n<t;n++)if(!Rt(Ye(e.value,n)))return 0;return 1}function w0(e){return e===null||e.type!==4||!Ko(Ye(e.value,1),Ye(e.value,2),Ye(e.value,3))?0:1}function D0(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 17:if(n===0)break e;break;case 9:if(n===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function v0(e,t){if(!e)return 0;let n=0,r=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==n)break e;n=r.pop();break;case 2:case 21:case 19:case 23:r.push(n),n=ol.get(e.type);break}o++}while(e=t(o));return o}function mt(e){return e&&(e=new Set(e)),function(t,n,r){if(t===null||t.type!==12)return 0;let o=ci(t.value,0);if(e!==null){let i=t.value.indexOf("\\",o),s=i===-1||!Up(t.value,i)?t.value.substr(o):t.value.substring(o,i);if(e.has(s.toLowerCase())===!1)return 0}return fi(r,t.value,o)?0:1}}function k0(e,t,n){return e===null||e.type!==11||fi(n,e.value,e.value.length-1)?0:1}function Vp(e){return typeof e!="function"&&(e=function(){return 0}),function(t,n,r){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,n,r)}}function x0(e,t,n){if(e===null)return 0;let r=ci(e.value,0);return r!==e.value.length&&!Up(e.value,r)||fi(n,e.value,r)?0:1}function C0(e,t,n){if(e===null||e.type!==10)return 0;let r=Ye(e.value,0)===43||Ye(e.value,0)===45?1:0;for(;r<e.value.length;r++)if(!ge(Ye(e.value,r)))return 0;return fi(n,e.value,r)?0:1}function _0(e){let{angle:t,decibel:n,frequency:r,flex:o,length:i,resolution:s,semitones:a,time:l}=e||{};return{dimension:$e(mt(null)),angle:$e(mt(t)),decibel:$e(mt(n)),frequency:$e(mt(r)),flex:$e(mt(o)),length:$e(Vp(mt(i))),resolution:$e(mt(s)),semitones:$e(mt(a)),time:$e(mt(l))}}function S0(e){return{...F0,...E0,..._0(e)}}function qp(e,t,n){return Object.assign(di("SyntaxError",e),{input:t,offset:n,rawMessage:e,message:e+`
39
39
  `+t+`
40
- --`+new Array((n||t.length)+1).join("-")+"^"})}function ai(e){return e.substringToPos(e.findWsEnd(e.pos))}function Wn(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||Hr[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function li(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Z0(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function np(e){let t=null,n=null;return e.eat(si),t=li(e),e.charCode()===al?(e.pos++,e.charCode()!==Qd&&(n=li(e))):n=t,e.eat(Qd),{min:Number(t),max:n?Number(n):0}}function K0(e){let t=null,n=!1;switch(e.charCode()){case Jp:e.pos++,t={min:0,max:0};break;case sl:e.pos++,t={min:1,max:0};break;case La:e.pos++,t={min:0,max:1};break;case il:e.pos++,n=!0,e.charCode()===si?t=np(e):e.charCode()===La?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case si:t=np(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Vn(e,t){let n=K0(e);return n!==null?(n.term=t,e.charCode()===il&&e.charCodeAt(e.pos-1)===sl?Vn(e,n):n):t}function Fa(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function Y0(e){let t;return e.eat(ll),e.eat(ii),t=Wn(e),e.eat(ii),e.eat(Hp),Vn(e,{type:"Property",name:t})}function X0(e){let t=null,n=null,r=1;return e.eat(mi),e.charCode()===Yd&&(e.peek(),r=-1),r==-1&&e.charCode()===ep?e.peek():(t=r*Number(li(e)),Hr[e.charCode()]!==0&&(t+=Wn(e))),ai(e),e.eat(al),ai(e),e.charCode()===ep?e.peek():(r=1,e.charCode()===Yd&&(e.peek(),r=-1),n=r*Number(li(e)),Hr[e.charCode()]!==0&&(n+=Wn(e))),e.eat(cl),{type:"Range",min:t,max:n}}function Q0(e){let t,n=null;return e.eat(ll),t=Wn(e),e.charCode()===Gp&&e.nextCharCode()===J0&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===mi&&(ai(e),n=X0(e)),e.eat(Hp),Vn(e,{type:"Type",name:t,opts:n})}function ev(e){let t=Wn(e);return e.charCode()===Gp?(e.pos++,{type:"Function",name:t}):Vn(e,{type:"Keyword",name:t})}function tv(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>tp[o]-tp[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function Zp(e){let t=[],n={},r,o=null,i=e.pos;for(;r=rv(e);)r.type!=="Spaces"&&(r.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[r.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),o=r,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:tv(t,n)||" ",disallowEmpty:!1,explicit:!1}}function nv(e){let t;return e.eat(mi),t=Zp(e),e.eat(cl),t.explicit=!0,e.charCode()===qp&&(e.pos++,t.disallowEmpty=!0),t}function rv(e){let t=e.charCode();if(t<128&&Hr[t]===1)return ev(e);switch(t){case cl:break;case mi:return Vn(e,nv(e));case ll:return e.nextCharCode()===ii?Y0(e):Q0(e);case Xd:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Xd?2:1))};case Kd:return e.pos++,e.eat(Kd),{type:"Combinator",value:"&&"};case al:return e.pos++,{type:"Comma"};case ii:return Vn(e,{type:"String",value:Z0(e)});case G0:case U0:case W0:case q0:case V0:return{type:"Spaces",value:ai(e)};case H0:return t=e.nextCharCode(),t<128&&Hr[t]===1?(e.pos++,{type:"AtKeyword",name:Wn(e)}):Fa(e);case Jp:case sl:case La:case il:case qp:break;case si:if(t=e.nextCharCode(),t<48||t>57)return Fa(e);break;default:return Fa(e)}}function ul(e){let t=new z0(e),n=Zp(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}function rp(e){return typeof e=="function"?e:Ur}function Kp(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=Ur,i=Ur;if(typeof t=="function"?o=t:t&&(o=rp(t.enter),i=rp(t.leave)),o===Ur&&i===Ur)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}function iv(e){let t=[];return ui(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function sv(e,t){return typeof e=="string"?iv(e):t.generate(e,ov)}function De(e,t,n){return t===K&&n===Q||e===K&&t===K&&n===K?e:(e.type==="If"&&e.else===Q&&t===K&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Yp(e){return e.length>2&&e.charCodeAt(e.length-2)===av&&e.charCodeAt(e.length-1)===lv}function op(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Yp(e.name)}function Ma(e,t,n){switch(e){case" ":{let r=K;for(let o=t.length-1;o>=0;o--){let i=t[o];r=De(i,r,Q)}return r}case"|":{let r=Q,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(op(s)&&(o===null&&i>0&&op(t[i-1])&&(o=Object.create(null),r=De({type:"Enum",map:o},K,r)),o!==null)){let a=(Yp(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=De(s,K,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=Q;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ma(e,t.filter(function(a){return a!==i}),!1):s=K,r=De(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?K:Q;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ma(e,t.filter(function(a){return a!==i}),!0):s=K,r=De(i,s,r)}return r}}}function cv(e){let t=K,n=pl(e.term);if(e.max===0)n=De(n,dl,Q),t=De(n,null,Q),t.then=De(K,K,t),e.comma&&(t.then.else=De({type:"Comma",syntax:e},t,Q));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==K&&(t=De({type:"Comma",syntax:e},t,Q)),t=De(n,De(K,K,t),Q);if(e.min===0)t=De(K,K,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==K&&(t=De({type:"Comma",syntax:e},t,Q)),t=De(n,t,Q);return t}function pl(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Ma(e.combinator,e.terms.map(pl),!1);return e.disallowEmpty&&(t=De(t,dl,Q)),t}case"Multiplier":return cv(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function za(e,t){return typeof e=="string"&&(e=ul(e)),{type:"MatchGraph",match:pl(e),syntax:t||null,source:e}}function hv(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Ea(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function gv(e){return e.type!==9?!1:e.value!=="?"}function lp(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||gv(e)}function cp(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function yv(e,t,n){function r(){do L++,S=L<e.length?e[L]:null;while(S!==null&&(S.type===13||S.type===25))}function o(J){let $=L+J;return $<e.length?e[$]:null}function i(J,$){return{nextState:J,matchStack:O,syntaxStack:d,thenStack:f,tokenIndex:L,prev:$}}function s(J){f={nextState:J,matchStack:O,syntaxStack:d,prev:f}}function a(J){m=i(J,m)}function l(){O={type:dv,syntax:t.syntax,token:S,prev:O},r(),g=null,L>x&&(x=L)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},O={type:Ua,syntax:t.syntax,token:O.token,prev:O}}function u(){O.type===Ua?O=O.prev:O={type:Xp,syntax:d.syntax,token:O.token,prev:O},d=d.prev}let d=null,f=null,m=null,g=null,v=0,F=null,S=null,L=-1,x=0,O={type:uv,syntax:null,token:null,prev:null};for(r();F===null&&++v<ap;)switch(t.type){case"Match":if(f===null){if(S!==null&&(L!==e.length-1||S.value!=="\\0"&&S.value!=="\\9")){t=Q;break}F=sp;break}if(t=f.nextState,t===dl)if(f.matchStack===O){t=Q;break}else t=K;for(;f.syntaxStack!==d;)u();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(m===null||L>m.tokenIndex)&&(m=g,g=!1);else if(m===null){F=pv;break}t=m.nextState,f=m.thenStack,d=m.syntaxStack,O=m.matchStack,L=m.tokenIndex,S=L<e.length?e[L]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==Q&&a(t.else),t.then!==K&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let T=t.syntax.terms;if(t.index===T.length){if(t.mask===0||t.syntax.all){t=Q;break}t=K;break}if(t.mask===(1<<T.length)-1){t=K;break}for(;t.index<T.length;t.index++){let h=1<<t.index;if((t.mask&h)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|h}),t=T[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(S!==null){let T=S.value.toLowerCase();if(T.indexOf("\\")!==-1&&(T=T.replace(/\\[09].*$/,"")),ip.call(t.map,T)){t=t.map[T];break}}t=Q;break;case"Generic":{let T=d!==null?d.opts:null,h=L+Math.floor(t.fn(S,o,T));if(!isNaN(h)&&h>L){for(;L<h;)l();t=K}else t=Q;break}case"Type":case"Property":{let T=t.type==="Type"?"types":"properties",h=ip.call(n,T)?n[T][t.name]:null;if(!h||!h.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&S!==null&&t.type==="Type"&&(t.name==="custom-ident"&&S.type===1||t.name==="length"&&S.value==="0")){g===null&&(g=i(t,m)),t=Q;break}c(),t=h.match;break}case"Keyword":{let T=t.name;if(S!==null){let h=S.value;if(h.indexOf("\\")!==-1&&(h=h.replace(/\\[09].*$/,"")),Ea(h,T)){l(),t=K;break}}t=Q;break}case"AtKeyword":case"Function":if(S!==null&&Ea(S.value,t.name)){l(),t=K;break}t=Q;break;case"Token":if(S!==null&&S.value===t.value){l(),t=K;break}t=Q;break;case"Comma":S!==null&&S.type===18?lp(O.token)?t=Q:(l(),t=cp(S)?Q:K):t=lp(O.token)||cp(S)?K:Q;break;case"String":let J="",$=L;for(;$<e.length&&J.length<t.value.length;$++)J+=e[$].value;if(Ea(J,t.value)){for(;L<$;)l();t=K}else t=Q;break;default:throw new Error("Unknown node type: "+t.type)}switch(mv+=v,F){case null:console.warn("[csstree-match] BREAK after "+ap+" iterations"),F=fv,O=null;break;case sp:for(;d!==null;)u();break;default:O=null}return{tokens:e,reason:F,iterations:v,match:O,longestMatch:x}}function up(e,t,n){let r=yv(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=hv(o).prev;o!==null;){switch(o.type){case Ua:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Xp:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}function ef(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function bv(e,t){return fl(this,e,n=>n.type==="Type"&&n.name===t)}function wv(e,t){return fl(this,e,n=>n.type==="Property"&&n.name===t)}function Dv(e){return fl(this,e,t=>t.type==="Keyword")}function fl(e,t,n){let r=ef.call(e,t);return r===null?!1:r.some(n)}function tf(e){return"node"in e?e.node:tf(e.match[0])}function nf(e){return"node"in e?e.node:nf(e.match[e.match.length-1])}function dp(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=tf(a),c=nf(a);e.syntax.walk(t,function(u,d,f){if(u===l){let m=new fe;do{if(m.appendData(d.data),d.data===c)break;d=d.next}while(d!==null);s.push({parent:f,nodes:m})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}function _a(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function pp(e){return!!e&&_a(e.offset)&&_a(e.line)&&_a(e.column)}function vv(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(qr.call(n,o)!==!1){if(o==="type")n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!pp(n.loc.start))o+=".start";else if(!pp(n.loc.end))o+=".end";else continue;i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let s=0;!i&&s<t[o].length;s++){let a=t[o][s];switch(a){case String:i=typeof n[o]=="string";break;case Boolean:i=typeof n[o]=="boolean";break;case null:i=n[o]===null;break;default:typeof a=="string"?i=n[o]&&n[o].type===a:Array.isArray(a)&&(i=n[o]instanceof fe)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)qr.call(t,o)&&qr.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function kv(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(qr.call(n,i)===!1)continue;let s=[],a=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];for(let l=0;l<a.length;l++){let c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ")}return{docs:o,check:vv(e,r)}}function xv(e){let t={};if(e.node){for(let n in e.node)if(qr.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=kv(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}function Wa(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:pi(e[o].syntax,{compact:t}));return r}function Fv(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:pi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Wa(i.descriptors,t,n)};return r}function Ev(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function Ze(e,t,n){return{matched:e,iterations:n,error:t,...Qp}}function Ln(e,t,n,r){let o=sv(n,e.syntax),i;return Ev(o)?Ze(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=up(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=up(o,t.match,e),!i.match)?Ze(null,new r0(i.reason,t.syntax,n,i),i.iterations):Ze(i.match,null,i.iterations))}function Sa(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function mp(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let i of Object.keys(o))t.includes(i)&&(n[r][i]=o[i])}return n}function Va(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},l=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){l.prelude=s.prelude?Sa(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?Sa(l.descriptors[c],u):null;Object.keys(l.descriptors).length||(l.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Sa(n[r][i],s);break;case"scope":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]={...n[r][i],...s};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...mp(o,["parse"])};break;case"node":n[r]={...e[r],...mp(o,["name","structure","parse","generate","walkContext"])};break}return n}function rf(e){let t=$D(e),n=YD(e),r=JD(e),{fromPlainObject:o,toPlainObject:i}=HD(n),s={lexer:null,createLexer:a=>new fp(a,s,s.lexer.structure),tokenize:ui,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=Va({},e);return rf(typeof a=="function"?a(l,Object.assign):Va(l,a))}};return s.lexer=new fp({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}function Qo(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===it||r===Ae)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)ge(this.charCodeAt(n))||this.error("Integer is expected",n)}function Mn(e){return Qo.call(this,0,e)}function It(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case Xo:n="N is expected";break;case Ae:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function Ta(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(it,e)||this.isDelim(Ae,e)){t=this.isDelim(it,e)?it:Ae;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Mn.call(this,Xt))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==it&&n!==Ae&&this.error("Number sign is expected")),Mn.call(this,t!==0),t===Ae?"-"+this.consume(10):this.consume(10)}function sf(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Mn.call(this,Tv),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ae))switch(t="-1",It.call(this,1,Xo),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ta.call(this);break;case 3:It.call(this,2,Ae),this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10);break;default:It.call(this,2,Ae),Qo.call(this,3,Xt),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(it)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(it)&&(r=1,this.next()),It.call(this,0,Xo),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ta.call(this);break;case 2:It.call(this,1,Ae),this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10);break;default:It.call(this,1,Ae),Qo.call(this,2,Xt),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===it||r===Ae,i=this.tokenStart+o;for(;i<this.tokenEnd&&ge(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),It.call(this,i-this.tokenStart,Xo),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=Ta.call(this)):(It.call(this,i-this.tokenStart+1,Ae),i+2===this.tokenEnd?(this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10)):(Qo.call(this,i-this.tokenStart+2,Xt),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===it&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===it&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Iv(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}function hp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Pv(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}function lf(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),hp):o=hp.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(Pv.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function $v(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function uf(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function zv(e){this.children(e)}function qv(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(pf)?(t=!0,this.next()):this.isDelim(qa)||this.eat(1),this.isDelim(qa)?this.charCodeAt(this.tokenStart+1)!==ei?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Gv(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==ei&&t!==Vv&&t!==Wv&&t!==Uv&&t!==pf&&t!==qa&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==ei&&(this.isDelim(ei)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function ff(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=qv.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=Gv.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function Zv(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}function hf(e){return this.Raw(e,null,!0)}function gp(){return this.parseWithFallback(this.Rule,hf)}function yp(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Yv(){if(this.tokenType===17)return yp.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,yp);return this.tokenType===17&&this.next(),e}function gf(e){let t=e?Yv:gp,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),hf));break;default:e&&this.isDelim(Kv)?r.push(gp.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function tk(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}function bf(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function ok(e){this.token(9,"["),this.children(e),this.token(9,"]")}function Df(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function ak(){this.token(15,"-->")}function kf(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function uk(){this.token(14,"<!--")}function Cf(){return this.eatDelim(dk),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function mk(e){this.token(9,"."),this.token(1,e.name)}function Ef(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case gk:case hk:case yk:this.next();break;case bp:this.next(),this.eatIdent("deep"),this.eatDelim(bp);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function Dk(e){this.tokenize(e.name)}function Sf(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===vk&&this.charCodeAt(t-1)===kk&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Fk(e){this.token(25,"/*"+e.value+"*/")}function Ok(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Ik(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Pk(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Af)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}function Of(){let e=this.tokenStart,t=this.tokenIndex,n=Nk.call(this),r=rl(n),o=r?this.parseCustomProperty:this.parseValue,i=r?Ik:Ok,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(Pk,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(Af)&&(s=Lk.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function $k(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function Nk(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Tk:case _k:case Ak:case Ek:case Sk:this.next();break;case wp:this.next(),this.isDelim(wp)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function Lk(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}function Aa(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Pf(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Aa));break;default:this.isDelim(Mk)?e.push(this.parseWithFallback(this.Rule,Aa)):e.push(this.parseWithFallback(this.Declaration,Aa))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Wk(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}function jf(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Gk(e){this.token(12,e.value+e.unit)}function $f(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function Kk(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function Lf(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function ex(e){this.token(4,"#"+e.value)}function zf(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function rx(e){this.token(1,e.name)}function Wf(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function sx(e){this.token(9,"#"+e.name)}function qf(){let e=this.tokenStart,t,n=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function cx(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function Jf(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function px(e){this.children(e)}function Zf(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function hx(e){this.children(e,()=>this.token(18,","))}function Yf(){let e=this.tokenStart;return this.eatDelim(gx),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function wx(){this.token(9,"&")}function Qf(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function kx(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}function tm(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Fx(e){this.token(10,e.value)}function rm(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Sx(e){this.tokenize(e.value)}function im(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function Ox(e){this.token(21,"("),this.children(e),this.token(22,")")}function am(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Rx(e){this.token(11,e.value+"%")}function cm(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Nx(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function dm(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Ux(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function Dp(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!ge(n)&&n!==Vx&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}function fm(){let e=this.tokenStart,t=Dp.call(this),n;return this.skipSC(),this.eatDelim(Wx),n=Dp.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function Jx(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}function Hx(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function hm(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=Hx.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function Yx(e){this.tokenize(e.value)}function vp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Xx(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}function ym(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(Xx,vp):n=vp.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function nC(e){this.node(e.prelude),this.node(e.block)}function wm(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function iC(e){this.children(e)}function vm(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function cC(e){this.children(e,()=>this.token(18,","))}function hl(e){let t=e.length,n=e.charCodeAt(0),r=n===xm||n===Cm?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===Ga){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),Ke(Ga,a)){let l=s-1,c=en(e,l);s=c-1,i+=el(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function Fm(e,t){let n=t?"'":'"',r=t?Cm:xm,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===Ga?(o+="\\"+e.charAt(s),i=!1):(i&&(Rt(a)||Qt(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}function Em(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:hl(this.consume(5))}}function fC(e){this.token(5,Fm(e.value))}function kp(e){return this.Raw(e,null,!1)}function Sm(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==mC){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,kp);break;default:n=this.parseWithFallback(this.Rule,kp)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function bC(e){this.children(e)}function Oa(){this.tokenType!==1&&this.isDelim(wC)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Am(){let e=this.tokenStart;return this.isDelim(xp)?(this.next(),Oa.call(this)):(Oa.call(this),this.isDelim(xp)&&(this.next(),Oa.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function kC(e){this.tokenize(e.name)}function Wr(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===Pm&&t&&n!==0)return Wr.call(this,e+n+1,!1),-1;Rt(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function Ho(e){let t=0;for(;this.isDelim(Ja);)++t>e&&this.error("Too many question marks"),this.next()}function xC(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Im?"Plus sign":"Hyphen minus")+" is expected")}function CC(){let e=0;switch(this.tokenType){case 10:if(e=Wr.call(this,1,!0),this.isDelim(Ja)){Ho.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){xC.call(this,Pm),Wr.call(this,1,!1);break}break;case 12:e=Wr.call(this,1,!0),e>0&&Ho.call(this,6-e);break;default:if(this.eatDelim(Im),this.tokenType===1){e=Wr.call(this,0,!0),e>0&&Ho.call(this,6-e);break}if(this.isDelim(Ja)){this.next(),Ho.call(this,5);break}this.error("Hex digit or question mark is expected")}}function Rm(){let e=this.tokenStart;return this.eatIdent("u"),CC.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function _C(e){this.tokenize(e.value)}function $m(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===Bm?t-2:t-1,o="";for(;n<r&&Qt(e.charCodeAt(n));)n++;for(;n<r&&Qt(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===Ha){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),Ke(Ha,s)){let a=i-1,l=en(e,a);i=l-1,o+=el(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function Nm(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===TC||o===Ha||o===AC||o===OC||o===IC||o===Bm?(t+="\\"+e.charAt(r),n=!1):(n&&Rt(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}function Lm(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=$m(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=hl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function jC(e){this.token(7,Nm(e.value))}function zm(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function NC(e){this.children(e)}function Wm(){return this.eat(13),LC}function UC(e){this.token(13,e.value)}function qm(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,HC)&&this.cmpChar(this.tokenStart+1,Cp)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===JC||t===qC||t===Cp||t===GC)return this.Operator();t===VC&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}function o1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function i1(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Fp&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case QC:case t1:case r1:case e1:return this.Combinator();case Fp:return this.ClassSelector();case XC:case n1:return this.TypeSelector();case KC:return this.IdSelector();case YC:return this.NestingSelector()}break}}}function a1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function l1(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function Ep(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}function h1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function g1(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Gm.call(this)}function Gm(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(h1,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(g1,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}function C1(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===Sp){if(r===t)break;if(o=e.charCodeAt(++r),Ke(Sp,o)){let i=r-1,s=en(e,i);r=s-1,n+=el(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function F1(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0){t+="\uFFFD";continue}if(r<=31||r===127||r>=48&&r<=57&&(n===0||n===1&&e.charCodeAt(0)===45)){t+="\\"+r.toString(16)+" ";continue}Xa(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var $w,Za,Nw,Lw,Mw,zw,qn,R,Uw,Ww,Vw,qw,Ka,Gw,Jw,Hw,Zw,Kw,Yw,Xw,Qw,eD,tD,nD,rD,oD,iD,sD,aD,lD,cD,uD,dD,pD,fD,mD,hD,gD,yD,bD,wD,DD,vD,Pa,ED,Yo,Ap,Qa,Op,Ip,Pd,SD,Rd,TD,Be,Ot,AD,OD,Bn,fe,ba,Bd,$d,Md,PD,RD,wa,zd,Ud,ND,Wd,ja,MD,zD,va,Pp,UD,WD,jp,VD,tl,Lr,Hd,Nr,r0,Go,$n,oi,ka,Zd,$p,Jr,ot,xa,Nn,s0,l0,Np,Lp,c0,p0,ol,x0,C0,Na,_0,S0,T0,A0,O0,I0,P0,R0,j0,B0,$0,N0,L0,M0,z0,U0,W0,V0,q0,G0,qp,il,Kd,ii,Gp,J0,Jp,sl,al,Yd,ll,Hp,La,H0,mi,cl,si,Xd,Qd,ep,Hr,tp,Ur,ov,K,Q,dl,av,lv,ip,uv,dv,Ua,Xp,sp,pv,fv,ap,mv,Qp,qr,Cv,fp,_v,Sv,ml,of,it,Ae,Xo,Xt,Tv,Av,Ov,af,Rv,jv,Bv,cf,Nv,Lv,Mv,df,Uv,pf,ei,Wv,qa,Vv,Jv,Hv,mf,Kv,Xv,Qv,ek,yf,nk,rk,wf,ik,sk,vf,lk,ck,xf,dk,pk,fk,Ff,hk,bp,gk,yk,bk,wk,_f,vk,kk,xk,Ck,Tf,Af,Ek,_k,Sk,Tk,Ak,wp,Rk,jk,Bk,If,Mk,zk,Uk,Rf,Vk,qk,Bf,Jk,Hk,Zk,Nf,Yk,Xk,Qk,Mf,tx,nx,Uf,ox,ix,Vf,ax,lx,Gf,ux,dx,Hf,fx,mx,Kf,gx,yx,bx,Xf,Dx,vx,em,xx,Cx,nm,Ex,_x,om,Tx,Ax,sm,Ix,Px,lm,jx,Bx,$x,um,Lx,Mx,zx,pm,Wx,Vx,qx,Gx,mm,Zx,Kx,gm,Qx,eC,tC,bm,rC,oC,Dm,sC,aC,lC,km,uC,Ga,xm,Cm,dC,pC,_m,mC,hC,gC,yC,Tm,wC,xp,DC,vC,Om,Im,Pm,Ja,FC,EC,jm,SC,TC,Ha,AC,OC,IC,Bm,PC,RC,Mm,BC,$C,Um,LC,MC,zC,WC,Vm,VC,qC,Cp,GC,JC,HC,ZC,KC,YC,XC,QC,e1,Fp,t1,n1,r1,s1,c1,u1,d1,p1,f1,m1,y1,b1,Yt,Ia,_p,Zo,w1,Jm,D1,v1,k1,x1,Sp,wA,Hm,Zm,DA,vA,Km,kA,xA,CA,FA,EA,_A,Ym=A(()=>{"use strict";$w=Object.create,Za=Object.defineProperty,Nw=Object.getOwnPropertyDescriptor,Lw=Object.getOwnPropertyNames,Mw=Object.getPrototypeOf,zw=Object.prototype.hasOwnProperty,qn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R=(e,t)=>{for(var n in t)Za(e,n,{get:t[n],enumerable:!0})},Uw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Lw(t))!zw.call(e,o)&&o!==n&&Za(e,o,{get:()=>t[o],enumerable:!(r=Nw(t,o))||r.enumerable});return e},Ww=(e,t,n)=>(n=e!=null?$w(Mw(e)):{},Uw(t||!e||!e.__esModule?Za(n,"default",{value:e,enumerable:!0}):n,e)),Vw=qn(e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(n){if(0<=n&&n<t.length)return t[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){var r=65,o=90,i=97,s=122,a=48,l=57,c=43,u=47,d=26,f=52;return r<=n&&n<=o?n-r:i<=n&&n<=s?n-i+d:a<=n&&n<=l?n-a+f:n==c?62:n==u?63:-1}}),qw=qn(e=>{var t=Vw(),n=5,r=1<<n,o=r-1,i=r;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(l){var c="",u,d=s(l);do u=d&o,d>>>=n,d>0&&(u|=i),c+=t.encode(u);while(d>0);return c},e.decode=function(l,c,u){var d=l.length,f=0,m=0,g,v;do{if(c>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(l.charCodeAt(c++)),v===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));g=!!(v&i),v&=o,f=f+(v<<m),m+=n}while(g);u.value=a(f),u.rest=c}}),Ka=qn(e=>{function t(h,y,j){if(y in h)return h[y];if(arguments.length===3)return j;throw new Error('"'+y+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(h){var y=h.match(n);return y?{scheme:y[1],auth:y[2],host:y[3],port:y[4],path:y[5]}:null}e.urlParse=o;function i(h){var y="";return h.scheme&&(y+=h.scheme+":"),y+="//",h.auth&&(y+=h.auth+"@"),h.host&&(y+=h.host),h.port&&(y+=":"+h.port),h.path&&(y+=h.path),y}e.urlGenerate=i;var s=32;function a(h){var y=[];return function(j){for(var C=0;C<y.length;C++)if(y[C].input===j){var me=y[0];return y[0]=y[C],y[C]=me,y[0].result}var Ue=h(j);return y.unshift({input:j,result:Ue}),y.length>s&&y.pop(),Ue}}var l=a(function(h){var y=h,j=o(h);if(j){if(!j.path)return h;y=j.path}for(var C=e.isAbsolute(y),me=[],Ue=0,z=0;;)if(Ue=z,z=y.indexOf("/",Ue),z===-1){me.push(y.slice(Ue));break}else for(me.push(y.slice(Ue,z));z<y.length&&y[z]==="/";)z++;for(var oe,vt=0,z=me.length-1;z>=0;z--)oe=me[z],oe==="."?me.splice(z,1):oe===".."?vt++:vt>0&&(oe===""?(me.splice(z+1,vt),vt=0):(me.splice(z,2),vt--));return y=me.join("/"),y===""&&(y=C?"/":"."),j?(j.path=y,i(j)):y});e.normalize=l;function c(h,y){h===""&&(h="."),y===""&&(y=".");var j=o(y),C=o(h);if(C&&(h=C.path||"/"),j&&!j.scheme)return C&&(j.scheme=C.scheme),i(j);if(j||y.match(r))return y;if(C&&!C.host&&!C.path)return C.host=y,i(C);var me=y.charAt(0)==="/"?y:l(h.replace(/\/+$/,"")+"/"+y);return C?(C.path=me,i(C)):me}e.join=c,e.isAbsolute=function(h){return h.charAt(0)==="/"||n.test(h)};function u(h,y){h===""&&(h="."),h=h.replace(/\/$/,"");for(var j=0;y.indexOf(h+"/")!==0;){var C=h.lastIndexOf("/");if(C<0||(h=h.slice(0,C),h.match(/^([^\/]+:\/)?\/*$/)))return y;++j}return Array(j+1).join("../")+y.substr(h.length+1)}e.relative=u;var d=function(){var h=Object.create(null);return!("__proto__"in h)}();function f(h){return h}function m(h){return v(h)?"$"+h:h}e.toSetString=d?f:m;function g(h){return v(h)?h.slice(1):h}e.fromSetString=d?f:g;function v(h){if(!h)return!1;var y=h.length;if(y<9||h.charCodeAt(y-1)!==95||h.charCodeAt(y-2)!==95||h.charCodeAt(y-3)!==111||h.charCodeAt(y-4)!==116||h.charCodeAt(y-5)!==111||h.charCodeAt(y-6)!==114||h.charCodeAt(y-7)!==112||h.charCodeAt(y-8)!==95||h.charCodeAt(y-9)!==95)return!1;for(var j=y-10;j>=0;j--)if(h.charCodeAt(j)!==36)return!1;return!0}function F(h,y,j){var C=O(h.source,y.source);return C!==0||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0||j)||(C=h.generatedColumn-y.generatedColumn,C!==0)||(C=h.generatedLine-y.generatedLine,C!==0)?C:O(h.name,y.name)}e.compareByOriginalPositions=F;function S(h,y,j){var C;return C=h.originalLine-y.originalLine,C!==0||(C=h.originalColumn-y.originalColumn,C!==0||j)||(C=h.generatedColumn-y.generatedColumn,C!==0)||(C=h.generatedLine-y.generatedLine,C!==0)?C:O(h.name,y.name)}e.compareByOriginalPositionsNoSource=S;function L(h,y,j){var C=h.generatedLine-y.generatedLine;return C!==0||(C=h.generatedColumn-y.generatedColumn,C!==0||j)||(C=O(h.source,y.source),C!==0)||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0)?C:O(h.name,y.name)}e.compareByGeneratedPositionsDeflated=L;function x(h,y,j){var C=h.generatedColumn-y.generatedColumn;return C!==0||j||(C=O(h.source,y.source),C!==0)||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0)?C:O(h.name,y.name)}e.compareByGeneratedPositionsDeflatedNoLine=x;function O(h,y){return h===y?0:h===null?1:y===null?-1:h>y?1:-1}function J(h,y){var j=h.generatedLine-y.generatedLine;return j!==0||(j=h.generatedColumn-y.generatedColumn,j!==0)||(j=O(h.source,y.source),j!==0)||(j=h.originalLine-y.originalLine,j!==0)||(j=h.originalColumn-y.originalColumn,j!==0)?j:O(h.name,y.name)}e.compareByGeneratedPositionsInflated=J;function $(h){return JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=$;function T(h,y,j){if(y=y||"",h&&(h[h.length-1]!=="/"&&y[0]!=="/"&&(h+="/"),y=h+y),j){var C=o(j);if(!C)throw new Error("sourceMapURL could not be parsed");if(C.path){var me=C.path.lastIndexOf("/");me>=0&&(C.path=C.path.substring(0,me+1))}y=c(i(C),y)}return l(y)}e.computeSourceURL=T}),Gw=qn(e=>{var t=Ka(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(i,s){for(var a=new o,l=0,c=i.length;l<c;l++)a.add(i[l],s);return a},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(i,s){var a=r?i:t.toSetString(i),l=r?this.has(i):n.call(this._set,a),c=this._array.length;(!l||s)&&this._array.push(i),l||(r?this._set.set(i,c):this._set[a]=c)},o.prototype.has=function(i){if(r)return this._set.has(i);var s=t.toSetString(i);return n.call(this._set,s)},o.prototype.indexOf=function(i){if(r){var s=this._set.get(i);if(s>=0)return s}else{var a=t.toSetString(i);if(n.call(this._set,a))return this._set[a]}throw new Error('"'+i+'" is not in the set.')},o.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o}),Jw=qn(e=>{var t=Ka();function n(o,i){var s=o.generatedLine,a=i.generatedLine,l=o.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(o,i)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,i){this._array.forEach(o,i)},r.prototype.add=function(o){n(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r}),Hw=qn(e=>{var t=qw(),n=Ka(),r=Gw().ArraySet,o=Jw().MappingList;function i(s){s||(s={}),this._file=n.getArg(s,"file",null),this._sourceRoot=n.getArg(s,"sourceRoot",null),this._skipValidation=n.getArg(s,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(s){var a=s.sourceRoot,l=new i({file:s.file,sourceRoot:a});return s.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,a!=null&&(u.source=n.relative(a,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),l.addMapping(u)}),s.sources.forEach(function(c){var u=c;a!==null&&(u=n.relative(a,c)),l._sources.has(u)||l._sources.add(u);var d=s.sourceContentFor(c);d!=null&&l.setSourceContent(c,d)}),l},i.prototype.addMapping=function(s){var a=n.getArg(s,"generated"),l=n.getArg(s,"original",null),c=n.getArg(s,"source",null),u=n.getArg(s,"name",null);this._skipValidation||this._validateMapping(a,l,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:c,name:u})},i.prototype.setSourceContent=function(s,a){var l=s;this._sourceRoot!=null&&(l=n.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(s,a,l){var c=a;if(a==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=s.file}var u=this._sourceRoot;u!=null&&(c=n.relative(u,c));var d=new r,f=new r;this._mappings.unsortedForEach(function(m){if(m.source===c&&m.originalLine!=null){var g=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});g.source!=null&&(m.source=g.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=g.line,m.originalColumn=g.column,g.name!=null&&(m.name=g.name))}var v=m.source;v!=null&&!d.has(v)&&d.add(v);var F=m.name;F!=null&&!f.has(F)&&f.add(F)},this),this._sources=d,this._names=f,s.sources.forEach(function(m){var g=s.sourceContentFor(m);g!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,g))},this)},i.prototype._validateMapping=function(s,a,l,c){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!a&&!l&&!c)){if(s&&"line"in s&&"column"in s&&a&&"line"in a&&"column"in a&&s.line>0&&s.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:s,source:l,original:a,name:c}))}},i.prototype._serializeMappings=function(){for(var s=0,a=1,l=0,c=0,u=0,d=0,f="",m,g,v,F,S=this._mappings.toArray(),L=0,x=S.length;L<x;L++){if(g=S[L],m="",g.generatedLine!==a)for(s=0;g.generatedLine!==a;)m+=";",a++;else if(L>0){if(!n.compareByGeneratedPositionsInflated(g,S[L-1]))continue;m+=","}m+=t.encode(g.generatedColumn-s),s=g.generatedColumn,g.source!=null&&(F=this._sources.indexOf(g.source),m+=t.encode(F-d),d=F,m+=t.encode(g.originalLine-1-c),c=g.originalLine-1,m+=t.encode(g.originalColumn-l),l=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),m+=t.encode(v-u),u=v)),f+=m}return f},i.prototype._generateSourcesContent=function(s,a){return s.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=n.relative(a,l));var c=n.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},i.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}),Zw={};R(Zw,{AtKeyword:()=>Qw,BadString:()=>nD,BadUrl:()=>oD,CDC:()=>dD,CDO:()=>uD,Colon:()=>pD,Comma:()=>mD,Comment:()=>vD,Delim:()=>iD,Dimension:()=>lD,EOF:()=>Kw,Function:()=>Xw,Hash:()=>eD,Ident:()=>Yw,LeftCurlyBracket:()=>wD,LeftParenthesis:()=>yD,LeftSquareBracket:()=>hD,Number:()=>sD,Percentage:()=>aD,RightCurlyBracket:()=>DD,RightParenthesis:()=>bD,RightSquareBracket:()=>gD,Semicolon:()=>fD,String:()=>tD,Url:()=>rD,WhiteSpace:()=>cD});Kw=0,Yw=1,Xw=2,Qw=3,eD=4,tD=5,nD=6,rD=7,oD=8,iD=9,sD=10,aD=11,lD=12,cD=13,uD=14,dD=15,pD=16,fD=17,mD=18,hD=19,gD=20,yD=21,bD=22,wD=23,DD=24,vD=25;Pa=new Array(128),ED=128,Yo=130,Ap=131,Qa=132,Op=133;for(let e=0;e<Pa.length;e++)Pa[e]=Qt(e)&&Yo||ge(e)&&Ap||ti(e)&&Qa||FD(e)&&Op||e||ED;Ip=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];Pd=10,SD=12,Rd=13;TD=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||jd(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||jd(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Be=16777215,Ot=24,AD=new Map([[2,22],[21,22],[19,20],[23,24]]),OD=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let n=e.length,r=ri(this.offsetAndType,e.length+1),o=ri(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,d)=>{switch(c){default:o[i]=n;break;case s:{let f=a&Be;for(a=o[f],s=a>>Ot,o[i]=f,o[f++]=i;f<i;f++)o[f]===n&&(o[f]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=AD.get(c),a=s<<Ot|i;break}r[i++]=c<<Ot|d,l===-1&&(l=u)}),r[i]=0<<Ot|n,o[i]=n,o[n]=n;a!==0;){let c=a&Be;a=o[c],o[c]=n}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>Ot:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Be:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Gr(this.source,this.offsetAndType[e-1]&Be,this.offsetAndType[e]&Be,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Be:this.offsetAndType[this.tokenCount]&Be:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Be,t=this.offsetAndType[t],this.tokenType=t>>Ot,this.tokenEnd=t&Be):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Ot,this.tokenEnd=e&Be):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r,o;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&Be:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[r]===n&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&Be,s=o>>Ot;n=i,e(s,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:Ip[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};Bn=null,fe=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return fe.createItem(e)}allocateCursor(e,t){let n;return Bn!==null?(n=Bn,Bn=Bn.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Bn,Bn=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let r=fe.createItem(n);t!==null?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),o=t,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),o=t,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new fe;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new fe;for(let r=this.head;r!==null;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let o=r.next;if(r.next=o.next,t.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let o=r.prev;if(r.prev=o.prev,t.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new fe;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(fe.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(fe.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(fe.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(fe.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(fe.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};ba=100,Bd=60,$d=" ";Md=()=>{},PD=33,RD=35,wa=59,zd=123,Ud=0;ND=Ww(Hw(),1),Wd=new Set(["Atrule","Selector","Declaration"]);ja={};R(ja,{safe:()=>jp,spec:()=>WD});MD=43,zD=45,va=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},Pp=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],UD=Pp.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);WD=Rp(Pp),jp=Rp(UD),VD=92;({hasOwnProperty:tl}=Object.prototype),Lr=function(){};Hd={offset:0,line:1,column:1};Nr=function(e,t){let n=di("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},r0=function(e,t,n,r){let o=di("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=n0(r,n);return o.rawMessage=e,o.syntax=t?pi(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+`
40
+ --`+new Array((n||t.length)+1).join("-")+"^"})}function ai(e){return e.substringToPos(e.findWsEnd(e.pos))}function Un(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n>=128||Hr[n]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function li(e){let t=e.pos;for(;t<e.str.length;t++){let n=e.str.charCodeAt(t);if(n<48||n>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Y0(e){let t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function rp(e){let t=null,n=null;return e.eat(si),t=li(e),e.charCode()===al?(e.pos++,e.charCode()!==ep&&(n=li(e))):n=t,e.eat(ep),{min:Number(t),max:n?Number(n):0}}function X0(e){let t=null,n=!1;switch(e.charCode()){case Hp:e.pos++,t={min:0,max:0};break;case sl:e.pos++,t={min:1,max:0};break;case La:e.pos++,t={min:0,max:1};break;case il:e.pos++,n=!0,e.charCode()===si?t=rp(e):e.charCode()===La?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case si:t=rp(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}function Vn(e,t){let n=X0(e);return n!==null?(n.term=t,e.charCode()===il&&e.charCodeAt(e.pos-1)===sl?Vn(e,n):n):t}function Fa(e){let t=e.peek();return t===""?null:{type:"Token",value:t}}function Q0(e){let t;return e.eat(ll),e.eat(ii),t=Un(e),e.eat(ii),e.eat(Zp),Vn(e,{type:"Property",name:t})}function ev(e){let t=null,n=null,r=1;return e.eat(mi),e.charCode()===Xd&&(e.peek(),r=-1),r==-1&&e.charCode()===tp?e.peek():(t=r*Number(li(e)),Hr[e.charCode()]!==0&&(t+=Un(e))),ai(e),e.eat(al),ai(e),e.charCode()===tp?e.peek():(r=1,e.charCode()===Xd&&(e.peek(),r=-1),n=r*Number(li(e)),Hr[e.charCode()]!==0&&(n+=Un(e))),e.eat(cl),{type:"Range",min:t,max:n}}function tv(e){let t,n=null;return e.eat(ll),t=Un(e),e.charCode()===Jp&&e.nextCharCode()===Z0&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===mi&&(ai(e),n=ev(e)),e.eat(Zp),Vn(e,{type:"Type",name:t,opts:n})}function nv(e){let t=Un(e);return e.charCode()===Jp?(e.pos++,{type:"Function",name:t}):Vn(e,{type:"Keyword",name:t})}function rv(e,t){function n(o,i){return{type:"Group",terms:o,combinator:i,disallowEmpty:!1,explicit:!1}}let r;for(t=Object.keys(t).sort((o,i)=>np[o]-np[i]);t.length>0;){r=t.shift();let o=0,i=0;for(;o<e.length;o++){let s=e[o];s.type==="Combinator"&&(s.value===r?(i===-1&&(i=o-1),e.splice(o,1),o--):(i!==-1&&o-i>1&&(e.splice(i,o-i,n(e.slice(i,o),r)),o=i+1),i=-1))}i!==-1&&t.length&&e.splice(i,o-i,n(e.slice(i,o),r))}return r}function Kp(e){let t=[],n={},r,o=null,i=e.pos;for(;r=iv(e);)r.type!=="Spaces"&&(r.type==="Combinator"?((o===null||o.type==="Combinator")&&(e.pos=i,e.error("Unexpected combinator")),n[r.value]=!0):o!==null&&o.type!=="Combinator"&&(n[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(r),o=r,i=e.pos);return o!==null&&o.type==="Combinator"&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:rv(t,n)||" ",disallowEmpty:!1,explicit:!1}}function ov(e){let t;return e.eat(mi),t=Kp(e),e.eat(cl),t.explicit=!0,e.charCode()===Gp&&(e.pos++,t.disallowEmpty=!0),t}function iv(e){let t=e.charCode();if(t<128&&Hr[t]===1)return nv(e);switch(t){case cl:break;case mi:return Vn(e,ov(e));case ll:return e.nextCharCode()===ii?Q0(e):tv(e);case Qd:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===Qd?2:1))};case Yd:return e.pos++,e.eat(Yd),{type:"Combinator",value:"&&"};case al:return e.pos++,{type:"Comma"};case ii:return Vn(e,{type:"String",value:Y0(e)});case H0:case V0:case q0:case J0:case G0:return{type:"Spaces",value:ai(e)};case K0:return t=e.nextCharCode(),t<128&&Hr[t]===1?(e.pos++,{type:"AtKeyword",name:Un(e)}):Fa(e);case Hp:case sl:case La:case il:case Gp:break;case si:if(t=e.nextCharCode(),t<48||t>57)return Fa(e);break;default:return Fa(e)}}function ul(e){let t=new U0(e),n=Kp(t);return t.pos!==e.length&&t.error("Unexpected input"),n.terms.length===1&&n.terms[0].type==="Group"?n.terms[0]:n}function op(e){return typeof e=="function"?e:Wr}function Yp(e,t,n){function r(s){switch(o.call(n,s),s.type){case"Group":s.terms.forEach(r);break;case"Multiplier":r(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}i.call(n,s)}let o=Wr,i=Wr;if(typeof t=="function"?o=t:t&&(o=op(t.enter),i=op(t.leave)),o===Wr&&i===Wr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");r(e,n)}function av(e){let t=[];return ui(e,(n,r,o)=>t.push({type:n,value:e.slice(r,o),node:null})),t}function lv(e,t){return typeof e=="string"?av(e):t.generate(e,sv)}function De(e,t,n){return t===K&&n===Q||e===K&&t===K&&n===K?e:(e.type==="If"&&e.else===Q&&t===K&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function Xp(e){return e.length>2&&e.charCodeAt(e.length-2)===cv&&e.charCodeAt(e.length-1)===uv}function ip(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&Xp(e.name)}function Ma(e,t,n){switch(e){case" ":{let r=K;for(let o=t.length-1;o>=0;o--){let i=t[o];r=De(i,r,Q)}return r}case"|":{let r=Q,o=null;for(let i=t.length-1;i>=0;i--){let s=t[i];if(ip(s)&&(o===null&&i>0&&ip(t[i-1])&&(o=Object.create(null),r=De({type:"Enum",map:o},K,r)),o!==null)){let a=(Xp(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in o)){o[a]=s;continue}}o=null,r=De(s,K,r)}return r}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=Q;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ma(e,t.filter(function(a){return a!==i}),!1):s=K,r=De(i,s,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let r=n?K:Q;for(let o=t.length-1;o>=0;o--){let i=t[o],s;t.length>1?s=Ma(e,t.filter(function(a){return a!==i}),!0):s=K,r=De(i,s,r)}return r}}}function dv(e){let t=K,n=pl(e.term);if(e.max===0)n=De(n,dl,Q),t=De(n,null,Q),t.then=De(K,K,t),e.comma&&(t.then.else=De({type:"Comma",syntax:e},t,Q));else for(let r=e.min||1;r<=e.max;r++)e.comma&&t!==K&&(t=De({type:"Comma",syntax:e},t,Q)),t=De(n,De(K,K,t),Q);if(e.min===0)t=De(K,K,t);else for(let r=0;r<e.min-1;r++)e.comma&&t!==K&&(t=De({type:"Comma",syntax:e},t,Q)),t=De(n,t,Q);return t}function pl(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Ma(e.combinator,e.terms.map(pl),!1);return e.disallowEmpty&&(t=De(t,dl,Q)),t}case"Multiplier":return dv(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function za(e,t){return typeof e=="string"&&(e=ul(e)),{type:"MatchGraph",match:pl(e),syntax:t||null,source:e}}function yv(e){let t=null,n=null,r=e;for(;r!==null;)n=r.prev,r.prev=t,t=r,r=n;return t}function Ea(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=t.charCodeAt(n),o=e.charCodeAt(n);if(o>=65&&o<=90&&(o=o|32),o!==r)return!1}return!0}function bv(e){return e.type!==9?!1:e.value!=="?"}function cp(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||bv(e)}function up(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function wv(e,t,n){function r(){do L++,S=L<e.length?e[L]:null;while(S!==null&&(S.type===13||S.type===25))}function o(J){let $=L+J;return $<e.length?e[$]:null}function i(J,$){return{nextState:J,matchStack:O,syntaxStack:d,thenStack:f,tokenIndex:L,prev:$}}function s(J){f={nextState:J,matchStack:O,syntaxStack:d,prev:f}}function a(J){m=i(J,m)}function l(){O={type:fv,syntax:t.syntax,token:S,prev:O},r(),g=null,L>x&&(x=L)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},O={type:Wa,syntax:t.syntax,token:O.token,prev:O}}function u(){O.type===Wa?O=O.prev:O={type:Qp,syntax:d.syntax,token:O.token,prev:O},d=d.prev}let d=null,f=null,m=null,g=null,v=0,F=null,S=null,L=-1,x=0,O={type:pv,syntax:null,token:null,prev:null};for(r();F===null&&++v<lp;)switch(t.type){case"Match":if(f===null){if(S!==null&&(L!==e.length-1||S.value!=="\\0"&&S.value!=="\\9")){t=Q;break}F=ap;break}if(t=f.nextState,t===dl)if(f.matchStack===O){t=Q;break}else t=K;for(;f.syntaxStack!==d;)u();f=f.prev;break;case"Mismatch":if(g!==null&&g!==!1)(m===null||L>m.tokenIndex)&&(m=g,g=!1);else if(m===null){F=mv;break}t=m.nextState,f=m.thenStack,d=m.syntaxStack,O=m.matchStack,L=m.tokenIndex,S=L<e.length?e[L]:null,m=m.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==Q&&a(t.else),t.then!==K&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let T=t.syntax.terms;if(t.index===T.length){if(t.mask===0||t.syntax.all){t=Q;break}t=K;break}if(t.mask===(1<<T.length)-1){t=K;break}for(;t.index<T.length;t.index++){let h=1<<t.index;if((t.mask&h)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|h}),t=T[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(S!==null){let T=S.value.toLowerCase();if(T.indexOf("\\")!==-1&&(T=T.replace(/\\[09].*$/,"")),sp.call(t.map,T)){t=t.map[T];break}}t=Q;break;case"Generic":{let T=d!==null?d.opts:null,h=L+Math.floor(t.fn(S,o,T));if(!isNaN(h)&&h>L){for(;L<h;)l();t=K}else t=Q;break}case"Type":case"Property":{let T=t.type==="Type"?"types":"properties",h=sp.call(n,T)?n[T][t.name]:null;if(!h||!h.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&S!==null&&t.type==="Type"&&(t.name==="custom-ident"&&S.type===1||t.name==="length"&&S.value==="0")){g===null&&(g=i(t,m)),t=Q;break}c(),t=h.match;break}case"Keyword":{let T=t.name;if(S!==null){let h=S.value;if(h.indexOf("\\")!==-1&&(h=h.replace(/\\[09].*$/,"")),Ea(h,T)){l(),t=K;break}}t=Q;break}case"AtKeyword":case"Function":if(S!==null&&Ea(S.value,t.name)){l(),t=K;break}t=Q;break;case"Token":if(S!==null&&S.value===t.value){l(),t=K;break}t=Q;break;case"Comma":S!==null&&S.type===18?cp(O.token)?t=Q:(l(),t=up(S)?Q:K):t=cp(O.token)||up(S)?K:Q;break;case"String":let J="",$=L;for(;$<e.length&&J.length<t.value.length;$++)J+=e[$].value;if(Ea(J,t.value)){for(;L<$;)l();t=K}else t=Q;break;default:throw new Error("Unknown node type: "+t.type)}switch(gv+=v,F){case null:console.warn("[csstree-match] BREAK after "+lp+" iterations"),F=hv,O=null;break;case ap:for(;d!==null;)u();break;default:O=null}return{tokens:e,reason:F,iterations:v,match:O,longestMatch:x}}function dp(e,t,n){let r=wv(e,t,n||{});if(r.match===null)return r;let o=r.match,i=r.match={syntax:t.syntax||null,match:[]},s=[i];for(o=yv(o).prev;o!==null;){switch(o.type){case Wa:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case Qp:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return r}function tf(e){function t(o){return o===null?!1:o.type==="Type"||o.type==="Property"||o.type==="Keyword"}function n(o){if(Array.isArray(o.match)){for(let i=0;i<o.match.length;i++)if(n(o.match[i]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}let r=null;return this.matched!==null&&n(this.matched),r}function Dv(e,t){return fl(this,e,n=>n.type==="Type"&&n.name===t)}function vv(e,t){return fl(this,e,n=>n.type==="Property"&&n.name===t)}function kv(e){return fl(this,e,t=>t.type==="Keyword")}function fl(e,t,n){let r=tf.call(e,t);return r===null?!1:r.some(n)}function nf(e){return"node"in e?e.node:nf(e.match[0])}function rf(e){return"node"in e?e.node:rf(e.match[e.match.length-1])}function pp(e,t,n,r,o){function i(a){if(a.syntax!==null&&a.syntax.type===r&&a.syntax.name===o){let l=nf(a),c=rf(a);e.syntax.walk(t,function(u,d,f){if(u===l){let m=new fe;do{if(m.appendData(d.data),d.data===c)break;d=d.next}while(d!==null);s.push({parent:f,nodes:m})}})}Array.isArray(a.match)&&a.match.forEach(i)}let s=[];return n.matched!==null&&i(n.matched),s}function _a(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function fp(e){return!!e&&_a(e.offset)&&_a(e.line)&&_a(e.column)}function xv(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(let o in n){let i=!0;if(qr.call(n,o)!==!1){if(o==="type")n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!fp(n.loc.start))o+=".start";else if(!fp(n.loc.end))o+=".end";else continue;i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let s=0;!i&&s<t[o].length;s++){let a=t[o][s];switch(a){case String:i=typeof n[o]=="string";break;case Boolean:i=typeof n[o]=="boolean";break;case null:i=n[o]===null;break;default:typeof a=="string"?i=n[o]&&n[o].type===a:Array.isArray(a)&&(i=n[o]instanceof fe)}}}else r(n,"Unknown field `"+o+"` for "+e+" node type");i||r(n,"Bad value for `"+e+"."+o+"`")}}for(let o in t)qr.call(t,o)&&qr.call(n,o)===!1&&r(n,"Field `"+e+"."+o+"` is missed")}}function Cv(e,t){let n=t.structure,r={type:String,loc:!0},o={type:'"'+e+'"'};for(let i in n){if(qr.call(n,i)===!1)continue;let s=[],a=r[i]=Array.isArray(n[i])?n[i].slice():[n[i]];for(let l=0;l<a.length;l++){let c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+i+"` structure definition")}o[i]=s.join(" | ")}return{docs:o,check:xv(e,r)}}function Fv(e){let t={};if(e.node){for(let n in e.node)if(qr.call(e.node,n)){let r=e.node[n];if(r.structure)t[n]=Cv(n,r);else throw new Error("Missed `structure` field in `"+n+"` node type definition")}}return t}function Ua(e,t,n){let r={};for(let o in e)e[o].syntax&&(r[o]=n?e[o].syntax:pi(e[o].syntax,{compact:t}));return r}function _v(e,t,n){let r={};for(let[o,i]of Object.entries(e))r[o]={prelude:i.prelude&&(n?i.prelude.syntax:pi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Ua(i.descriptors,t,n)};return r}function Sv(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function Ze(e,t,n){return{matched:e,iterations:n,error:t,...ef}}function Ln(e,t,n,r){let o=lv(n,e.syntax),i;return Sv(o)?Ze(null,new Error("Matching for a tree with var() is not supported")):(r&&(i=dp(o,e.cssWideKeywordsSyntax,e)),(!r||!i.match)&&(i=dp(o,t.match,e),!i.match)?Ze(null,new i0(i.reason,t.syntax,n,i),i.iterations):Ze(i.match,null,i.iterations))}function Sa(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function hp(e,t){let n=Object.create(null);for(let[r,o]of Object.entries(e))if(o){n[r]={};for(let i of Object.keys(o))t.includes(i)&&(n[r][i]=o[i])}return n}function Va(e,t){let n={...e};for(let[r,o]of Object.entries(t))switch(r){case"generic":n[r]=!!o;break;case"units":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Array.isArray(s)?s:[];break;case"atrules":n[r]={...e[r]};for(let[i,s]of Object.entries(o)){let a=n[r][i]||{},l=n[r][i]={prelude:a.prelude||null,descriptors:{...a.descriptors}};if(s){l.prelude=s.prelude?Sa(l.prelude,s.prelude):l.prelude||null;for(let[c,u]of Object.entries(s.descriptors||{}))l.descriptors[c]=u?Sa(l.descriptors[c],u):null;Object.keys(l.descriptors).length||(l.descriptors=null)}}break;case"types":case"properties":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]=Sa(n[r][i],s);break;case"scope":n[r]={...e[r]};for(let[i,s]of Object.entries(o))n[r][i]={...n[r][i],...s};break;case"parseContext":n[r]={...e[r],...o};break;case"atrule":case"pseudo":n[r]={...e[r],...hp(o,["parse"])};break;case"node":n[r]={...e[r],...hp(o,["name","structure","parse","generate","walkContext"])};break}return n}function of(e){let t=LD(e),n=QD(e),r=ZD(e),{fromPlainObject:o,toPlainObject:i}=KD(n),s={lexer:null,createLexer:a=>new mp(a,s,s.lexer.structure),tokenize:ui,parse:t,generate:r,walk:n,find:n.find,findLast:n.findLast,findAll:n.findAll,fromPlainObject:o,toPlainObject:i,fork(a){let l=Va({},e);return of(typeof a=="function"?a(l,Object.assign):Va(l,a))}};return s.lexer=new mp({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}function Qo(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===it||r===Ae)&&(t&&this.error("Number sign is not allowed"),n++);n<this.tokenEnd;n++)ge(this.charCodeAt(n))||this.error("Integer is expected",n)}function Mn(e){return Qo.call(this,0,e)}function It(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n="";switch(t){case Xo:n="N is expected";break;case Ae:n="HyphenMinus is expected";break}this.error(n,this.tokenStart+e)}}function Ta(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(it,e)||this.isDelim(Ae,e)){t=this.isDelim(it,e)?it:Ae;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),Mn.call(this,Xt))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==it&&n!==Ae&&this.error("Number sign is expected")),Mn.call(this,t!==0),t===Ae?"-"+this.consume(10):this.consume(10)}function af(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)Mn.call(this,Ov),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Ae))switch(t="-1",It.call(this,1,Xo),this.tokenEnd-this.tokenStart){case 2:this.next(),n=Ta.call(this);break;case 3:It.call(this,2,Ae),this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10);break;default:It.call(this,2,Ae),Qo.call(this,3,Xt),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(it)&&this.lookupType(1)===1){let r=0;switch(t="1",this.isDelim(it)&&(r=1,this.next()),It.call(this,0,Xo),this.tokenEnd-this.tokenStart){case 1:this.next(),n=Ta.call(this);break;case 2:It.call(this,1,Ae),this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10);break;default:It.call(this,1,Ae),Qo.call(this,2,Xt),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),o=r===it||r===Ae,i=this.tokenStart+o;for(;i<this.tokenEnd&&ge(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),It.call(this,i-this.tokenStart,Xo),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),n=Ta.call(this)):(It.call(this,i-this.tokenStart+1,Ae),i+2===this.tokenEnd?(this.next(),this.skipSC(),Mn.call(this,Xt),n="-"+this.consume(10)):(Qo.call(this,i-this.tokenStart+2,Xt),this.next(),n=this.substrToCursor(i+1)))}else this.error();return t!==null&&t.charCodeAt(0)===it&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===it&&(n=n.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Rv(e){if(e.a){let t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){let n=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}function gp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function jv(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}function cf(e=!1){let t=this.tokenStart,n,r,o=null,i=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?o=this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),gp):o=gp.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this,e):i=this.Block(jv.call(this));break}return{type:"Atrule",loc:this.getLocation(t,this.tokenStart),name:n,prelude:o,block:i}}function Lv(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}function df(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Uv(e){this.children(e)}function Jv(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(ff)?(t=!0,this.next()):this.isDelim(qa)||this.eat(1),this.isDelim(qa)?this.charCodeAt(this.tokenStart+1)!==ei?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Hv(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==ei&&t!==Gv&&t!==qv&&t!==Vv&&t!==ff&&t!==qa&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==ei&&(this.isDelim(ei)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}function mf(){let e=this.tokenStart,t,n=null,r=null,o=null;return this.eat(19),this.skipSC(),t=Jv.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=Hv.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:o}}function Yv(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}function gf(e){return this.Raw(e,null,!0)}function yp(){return this.parseWithFallback(this.Rule,gf)}function bp(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Qv(){if(this.tokenType===17)return bp.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,bp);return this.tokenType===17&&this.next(),e}function yf(e){let t=e?Qv:yp,n=this.tokenStart,r=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),gf));break;default:e&&this.isDelim(Xv)?r.push(yp.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(n,this.tokenStart),children:r}}function rk(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}function wf(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(n,this.tokenStart),children:r}}function sk(e){this.token(9,"["),this.children(e),this.token(9,"]")}function vf(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function ck(){this.token(15,"-->")}function xf(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function pk(){this.token(14,"<!--")}function Ff(){return this.eatDelim(fk),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function gk(e){this.token(9,"."),this.token(1,e.name)}function _f(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case bk:case yk:case wk:this.next();break;case wp:this.next(),this.eatIdent("deep"),this.eatDelim(wp);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e);break}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function kk(e){this.tokenize(e.name)}function Tf(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===xk&&this.charCodeAt(t-1)===Ck&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function _k(e){this.token(25,"/*"+e.value+"*/")}function Pk(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Rk(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function jk(){let e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Of)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}function If(){let e=this.tokenStart,t=this.tokenIndex,n=Mk.call(this),r=rl(n),o=r?this.parseCustomProperty:this.parseValue,i=r?Rk:Pk,s=!1,a;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(r||this.skipSC(),o?a=this.parseWithFallback(jk,i):a=i.call(this,this.tokenIndex),r&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(Of)&&(s=zk.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:n,value:a}}function Lk(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function Mk(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case Ok:case Tk:case Ik:case Sk:case Ak:this.next();break;case Dp:this.next(),this.isDelim(Dp)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function zk(){this.eat(9),this.skipSC();let e=this.consume(1);return e==="important"?!0:e}function Aa(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Rf(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Aa));break;default:this.isDelim(Wk)?e.push(this.parseWithFallback(this.Rule,Aa)):e.push(this.parseWithFallback(this.Declaration,Aa))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function qk(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}function Bf(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Hk(e){this.token(12,e.value+e.unit)}function Nf(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),o=r.toLowerCase(),i;return i=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:r,children:i}}function Xk(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}function Mf(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function nx(e){this.token(4,"#"+e.value)}function Wf(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function ix(e){this.token(1,e.name)}function Vf(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function lx(e){this.token(9,"#"+e.name)}function Gf(){let e=this.tokenStart,t,n=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?n=this.Ratio():n=this.Number();break;case 12:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:n}}function dx(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}function Hf(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function mx(e){this.children(e)}function Kf(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function yx(e){this.children(e,()=>this.token(18,","))}function Xf(){let e=this.tokenStart;return this.eatDelim(bx),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function vx(){this.token(9,"&")}function em(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?r=this.Identifier():r=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:r,selector:n}}function Cx(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}function nm(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function _x(e){this.token(10,e.value)}function om(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Ax(e){this.tokenize(e.value)}function sm(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(n,this.tokenStart),children:r}}function Px(e){this.token(21,"("),this.children(e),this.token(22,")")}function lm(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Bx(e){this.token(11,e.value+"%")}function um(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Mx(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function pm(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):n=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Vx(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}function vp(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);!ge(n)&&n!==Gx&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}function mm(){let e=this.tokenStart,t=vp.call(this),n;return this.skipSC(),this.eatDelim(qx),n=vp.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function Zx(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}function Kx(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}function gm(e,t,n){let r=this.getTokenStart(e),o;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n&&this.tokenStart>r?o=Kx.call(this):o=this.tokenStart,{type:"Raw",loc:this.getLocation(r,o),value:this.substring(r,o)}}function Qx(e){this.tokenize(e.value)}function kp(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function eC(){let e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}function bm(){let e=this.tokenIndex,t=this.tokenStart,n,r;return this.parseRulePrelude?n=this.parseWithFallback(eC,kp):n=kp.call(this,e),r=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function oC(e){this.node(e.prelude),this.node(e.block)}function Dm(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function aC(e){this.children(e)}function km(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function dC(e){this.children(e,()=>this.token(18,","))}function hl(e){let t=e.length,n=e.charCodeAt(0),r=n===Cm||n===Fm?1:0,o=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,i="";for(let s=r;s<=o;s++){let a=e.charCodeAt(s);if(a===Ga){if(s===o){s!==t-1&&(i=e.substr(s+1));break}if(a=e.charCodeAt(++s),Ke(Ga,a)){let l=s-1,c=en(e,l);s=c-1,i+=el(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else i+=e[s]}return i}function Em(e,t){let n=t?"'":'"',r=t?Fm:Cm,o="",i=!1;for(let s=0;s<e.length;s++){let a=e.charCodeAt(s);if(a===0){o+="\uFFFD";continue}if(a<=31||a===127){o+="\\"+a.toString(16),i=!0;continue}a===r||a===Ga?(o+="\\"+e.charAt(s),i=!1):(i&&(Rt(a)||Qt(a))&&(o+=" "),o+=e.charAt(s),i=!1)}return n+o+n}function _m(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:hl(this.consume(5))}}function hC(e){this.token(5,Em(e.value))}function xp(e){return this.Raw(e,null,!1)}function Tm(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==gC){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,xp);break;default:n=this.parseWithFallback(this.Rule,xp)}t.push(n)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function DC(e){this.children(e)}function Oa(){this.tokenType!==1&&this.isDelim(vC)===!1&&this.error("Identifier or asterisk is expected"),this.next()}function Om(){let e=this.tokenStart;return this.isDelim(Cp)?(this.next(),Oa.call(this)):(Oa.call(this),this.isDelim(Cp)&&(this.next(),Oa.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function CC(e){this.tokenize(e.name)}function Ur(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let o=this.charCodeAt(r);if(o===Rm&&t&&n!==0)return Ur.call(this,e+n+1,!1),-1;Rt(o)||this.error(t&&n!==0?"Hyphen minus"+(n<6?" or hex digit":"")+" is expected":n<6?"Hex digit is expected":"Unexpected input",r),++n>6&&this.error("Too many hex digits",r)}return this.next(),n}function Ho(e){let t=0;for(;this.isDelim(Ja);)++t>e&&this.error("Too many question marks"),this.next()}function FC(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Pm?"Plus sign":"Hyphen minus")+" is expected")}function EC(){let e=0;switch(this.tokenType){case 10:if(e=Ur.call(this,1,!0),this.isDelim(Ja)){Ho.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){FC.call(this,Rm),Ur.call(this,1,!1);break}break;case 12:e=Ur.call(this,1,!0),e>0&&Ho.call(this,6-e);break;default:if(this.eatDelim(Pm),this.tokenType===1){e=Ur.call(this,0,!0),e>0&&Ho.call(this,6-e);break}if(this.isDelim(Ja)){this.next(),Ho.call(this,5);break}this.error("Hex digit or question mark is expected")}}function jm(){let e=this.tokenStart;return this.eatIdent("u"),EC.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function TC(e){this.tokenize(e.value)}function Nm(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===$m?t-2:t-1,o="";for(;n<r&&Qt(e.charCodeAt(n));)n++;for(;n<r&&Qt(e.charCodeAt(r));)r--;for(let i=n;i<=r;i++){let s=e.charCodeAt(i);if(s===Ha){if(i===r){i!==t-1&&(o=e.substr(i+1));break}if(s=e.charCodeAt(++i),Ke(Ha,s)){let a=i-1,l=en(e,a);i=l-1,o+=el(e.substring(a+1,l))}else s===13&&e.charCodeAt(i+1)===10&&i++}else o+=e[i]}return o}function Lm(e){let t="",n=!1;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===0){t+="\uFFFD";continue}if(o<=31||o===127){t+="\\"+o.toString(16),n=!0;continue}o===OC||o===Ha||o===IC||o===PC||o===RC||o===$m?(t+="\\"+e.charAt(r),n=!1):(n&&Rt(o)&&(t+=" "),t+=e.charAt(r),n=!1)}return"url("+t+")"}function Mm(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Nm(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=hl(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function $C(e){this.token(7,Lm(e.value))}function Wm(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function MC(e){this.children(e)}function Vm(){return this.eat(13),zC}function VC(e){this.token(13,e.value)}function Gm(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,KC)&&this.cmpChar(this.tokenStart+1,Fp)?this.UnicodeRange():this.Identifier();case 9:{let t=this.charCodeAt(this.tokenStart);if(t===ZC||t===JC||t===Fp||t===HC)return this.Operator();t===GC&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}function s1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function a1(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===Ep&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:{switch(this.charCodeAt(this.tokenStart)){case t1:case r1:case i1:case n1:return this.Combinator();case Ep:return this.ClassSelector();case e1:case o1:return this.TypeSelector();case XC:return this.IdSelector();case QC:return this.NestingSelector()}break}}}function c1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function u1(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type==="Value"&&n.children.isEmpty){for(let r=t-this.tokenIndex;r<=0;r++)if(this.lookupType(r)===13){n.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(n)}return e}function _p(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}function y1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function b1(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Jm.call(this)}function Jm(){let e=this.createList(),t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(y1,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(b1,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}function E1(e){let t=e.length-1,n="";for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o===Tp){if(r===t)break;if(o=e.charCodeAt(++r),Ke(Tp,o)){let i=r-1,s=en(e,i);r=s-1,n+=el(e.substring(i+1,s))}else o===13&&e.charCodeAt(r+1)===10&&r++}else n+=e[r]}return n}function _1(e){let t="";if(e.length===1&&e.charCodeAt(0)===45)return"\\-";for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r===0){t+="\uFFFD";continue}if(r<=31||r===127||r>=48&&r<=57&&(n===0||n===1&&e.charCodeAt(0)===45)){t+="\\"+r.toString(16)+" ";continue}Xa(r)?t+=e.charAt(n):t+="\\"+e.charAt(n)}return t}var Lw,Za,Mw,zw,Ww,Uw,qn,R,Vw,qw,Gw,Jw,Ka,Hw,Zw,Kw,Yw,Xw,Qw,eD,tD,nD,rD,oD,iD,sD,aD,lD,cD,uD,dD,pD,fD,mD,hD,gD,yD,bD,wD,DD,vD,kD,xD,Pa,SD,Yo,Op,Qa,Ip,Pp,Rd,AD,jd,OD,Be,Ot,ID,PD,Bn,fe,ba,$d,Nd,zd,jD,BD,wa,Wd,Ud,MD,Vd,ja,WD,UD,va,Rp,VD,qD,Bp,GD,tl,Lr,Zd,Nr,i0,Go,$n,oi,ka,Kd,Np,Jr,ot,xa,Nn,l0,u0,Lp,Mp,d0,m0,ol,F0,E0,Na,T0,A0,O0,I0,P0,R0,j0,B0,$0,N0,L0,M0,z0,W0,U0,V0,q0,G0,J0,H0,Gp,il,Yd,ii,Jp,Z0,Hp,sl,al,Xd,ll,Zp,La,K0,mi,cl,si,Qd,ep,tp,Hr,np,Wr,sv,K,Q,dl,cv,uv,sp,pv,fv,Wa,Qp,ap,mv,hv,lp,gv,ef,qr,Ev,mp,Tv,Av,ml,sf,it,Ae,Xo,Xt,Ov,Iv,Pv,lf,Bv,$v,Nv,uf,Mv,zv,Wv,pf,Vv,ff,ei,qv,qa,Gv,Zv,Kv,hf,Xv,ek,tk,nk,bf,ok,ik,Df,ak,lk,kf,uk,dk,Cf,fk,mk,hk,Ef,yk,wp,bk,wk,Dk,vk,Sf,xk,Ck,Fk,Ek,Af,Of,Sk,Tk,Ak,Ok,Ik,Dp,Bk,$k,Nk,Pf,Wk,Uk,Vk,jf,Gk,Jk,$f,Zk,Kk,Yk,Lf,Qk,ex,tx,zf,rx,ox,Uf,sx,ax,qf,cx,ux,Jf,px,fx,Zf,hx,gx,Yf,bx,wx,Dx,Qf,kx,xx,tm,Fx,Ex,rm,Sx,Tx,im,Ox,Ix,am,Rx,jx,cm,$x,Nx,Lx,dm,zx,Wx,Ux,fm,qx,Gx,Jx,Hx,hm,Yx,Xx,ym,tC,nC,rC,wm,iC,sC,vm,lC,cC,uC,xm,pC,Ga,Cm,Fm,fC,mC,Sm,gC,yC,bC,wC,Am,vC,Cp,kC,xC,Im,Pm,Rm,Ja,_C,SC,Bm,AC,OC,Ha,IC,PC,RC,$m,jC,BC,zm,NC,LC,Um,zC,WC,UC,qC,qm,GC,JC,Fp,HC,ZC,KC,YC,XC,QC,e1,t1,n1,Ep,r1,o1,i1,l1,d1,p1,f1,m1,h1,g1,w1,D1,Yt,Ia,Sp,Zo,v1,Hm,k1,x1,C1,F1,Tp,kA,Zm,Km,xA,CA,Ym,FA,EA,_A,SA,TA,AA,Xm=A(()=>{"use strict";Lw=Object.create,Za=Object.defineProperty,Mw=Object.getOwnPropertyDescriptor,zw=Object.getOwnPropertyNames,Ww=Object.getPrototypeOf,Uw=Object.prototype.hasOwnProperty,qn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R=(e,t)=>{for(var n in t)Za(e,n,{get:t[n],enumerable:!0})},Vw=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zw(t))!Uw.call(e,o)&&o!==n&&Za(e,o,{get:()=>t[o],enumerable:!(r=Mw(t,o))||r.enumerable});return e},qw=(e,t,n)=>(n=e!=null?Lw(Ww(e)):{},Vw(t||!e||!e.__esModule?Za(n,"default",{value:e,enumerable:!0}):n,e)),Gw=qn(e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(n){if(0<=n&&n<t.length)return t[n];throw new TypeError("Must be between 0 and 63: "+n)},e.decode=function(n){var r=65,o=90,i=97,s=122,a=48,l=57,c=43,u=47,d=26,f=52;return r<=n&&n<=o?n-r:i<=n&&n<=s?n-i+d:a<=n&&n<=l?n-a+f:n==c?62:n==u?63:-1}}),Jw=qn(e=>{var t=Gw(),n=5,r=1<<n,o=r-1,i=r;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(l){var c="",u,d=s(l);do u=d&o,d>>>=n,d>0&&(u|=i),c+=t.encode(u);while(d>0);return c},e.decode=function(l,c,u){var d=l.length,f=0,m=0,g,v;do{if(c>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(v=t.decode(l.charCodeAt(c++)),v===-1)throw new Error("Invalid base64 digit: "+l.charAt(c-1));g=!!(v&i),v&=o,f=f+(v<<m),m+=n}while(g);u.value=a(f),u.rest=c}}),Ka=qn(e=>{function t(h,y,j){if(y in h)return h[y];if(arguments.length===3)return j;throw new Error('"'+y+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(h){var y=h.match(n);return y?{scheme:y[1],auth:y[2],host:y[3],port:y[4],path:y[5]}:null}e.urlParse=o;function i(h){var y="";return h.scheme&&(y+=h.scheme+":"),y+="//",h.auth&&(y+=h.auth+"@"),h.host&&(y+=h.host),h.port&&(y+=":"+h.port),h.path&&(y+=h.path),y}e.urlGenerate=i;var s=32;function a(h){var y=[];return function(j){for(var C=0;C<y.length;C++)if(y[C].input===j){var me=y[0];return y[0]=y[C],y[C]=me,y[0].result}var We=h(j);return y.unshift({input:j,result:We}),y.length>s&&y.pop(),We}}var l=a(function(h){var y=h,j=o(h);if(j){if(!j.path)return h;y=j.path}for(var C=e.isAbsolute(y),me=[],We=0,z=0;;)if(We=z,z=y.indexOf("/",We),z===-1){me.push(y.slice(We));break}else for(me.push(y.slice(We,z));z<y.length&&y[z]==="/";)z++;for(var oe,vt=0,z=me.length-1;z>=0;z--)oe=me[z],oe==="."?me.splice(z,1):oe===".."?vt++:vt>0&&(oe===""?(me.splice(z+1,vt),vt=0):(me.splice(z,2),vt--));return y=me.join("/"),y===""&&(y=C?"/":"."),j?(j.path=y,i(j)):y});e.normalize=l;function c(h,y){h===""&&(h="."),y===""&&(y=".");var j=o(y),C=o(h);if(C&&(h=C.path||"/"),j&&!j.scheme)return C&&(j.scheme=C.scheme),i(j);if(j||y.match(r))return y;if(C&&!C.host&&!C.path)return C.host=y,i(C);var me=y.charAt(0)==="/"?y:l(h.replace(/\/+$/,"")+"/"+y);return C?(C.path=me,i(C)):me}e.join=c,e.isAbsolute=function(h){return h.charAt(0)==="/"||n.test(h)};function u(h,y){h===""&&(h="."),h=h.replace(/\/$/,"");for(var j=0;y.indexOf(h+"/")!==0;){var C=h.lastIndexOf("/");if(C<0||(h=h.slice(0,C),h.match(/^([^\/]+:\/)?\/*$/)))return y;++j}return Array(j+1).join("../")+y.substr(h.length+1)}e.relative=u;var d=function(){var h=Object.create(null);return!("__proto__"in h)}();function f(h){return h}function m(h){return v(h)?"$"+h:h}e.toSetString=d?f:m;function g(h){return v(h)?h.slice(1):h}e.fromSetString=d?f:g;function v(h){if(!h)return!1;var y=h.length;if(y<9||h.charCodeAt(y-1)!==95||h.charCodeAt(y-2)!==95||h.charCodeAt(y-3)!==111||h.charCodeAt(y-4)!==116||h.charCodeAt(y-5)!==111||h.charCodeAt(y-6)!==114||h.charCodeAt(y-7)!==112||h.charCodeAt(y-8)!==95||h.charCodeAt(y-9)!==95)return!1;for(var j=y-10;j>=0;j--)if(h.charCodeAt(j)!==36)return!1;return!0}function F(h,y,j){var C=O(h.source,y.source);return C!==0||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0||j)||(C=h.generatedColumn-y.generatedColumn,C!==0)||(C=h.generatedLine-y.generatedLine,C!==0)?C:O(h.name,y.name)}e.compareByOriginalPositions=F;function S(h,y,j){var C;return C=h.originalLine-y.originalLine,C!==0||(C=h.originalColumn-y.originalColumn,C!==0||j)||(C=h.generatedColumn-y.generatedColumn,C!==0)||(C=h.generatedLine-y.generatedLine,C!==0)?C:O(h.name,y.name)}e.compareByOriginalPositionsNoSource=S;function L(h,y,j){var C=h.generatedLine-y.generatedLine;return C!==0||(C=h.generatedColumn-y.generatedColumn,C!==0||j)||(C=O(h.source,y.source),C!==0)||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0)?C:O(h.name,y.name)}e.compareByGeneratedPositionsDeflated=L;function x(h,y,j){var C=h.generatedColumn-y.generatedColumn;return C!==0||j||(C=O(h.source,y.source),C!==0)||(C=h.originalLine-y.originalLine,C!==0)||(C=h.originalColumn-y.originalColumn,C!==0)?C:O(h.name,y.name)}e.compareByGeneratedPositionsDeflatedNoLine=x;function O(h,y){return h===y?0:h===null?1:y===null?-1:h>y?1:-1}function J(h,y){var j=h.generatedLine-y.generatedLine;return j!==0||(j=h.generatedColumn-y.generatedColumn,j!==0)||(j=O(h.source,y.source),j!==0)||(j=h.originalLine-y.originalLine,j!==0)||(j=h.originalColumn-y.originalColumn,j!==0)?j:O(h.name,y.name)}e.compareByGeneratedPositionsInflated=J;function $(h){return JSON.parse(h.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=$;function T(h,y,j){if(y=y||"",h&&(h[h.length-1]!=="/"&&y[0]!=="/"&&(h+="/"),y=h+y),j){var C=o(j);if(!C)throw new Error("sourceMapURL could not be parsed");if(C.path){var me=C.path.lastIndexOf("/");me>=0&&(C.path=C.path.substring(0,me+1))}y=c(i(C),y)}return l(y)}e.computeSourceURL=T}),Hw=qn(e=>{var t=Ka(),n=Object.prototype.hasOwnProperty,r=typeof Map<"u";function o(){this._array=[],this._set=r?new Map:Object.create(null)}o.fromArray=function(i,s){for(var a=new o,l=0,c=i.length;l<c;l++)a.add(i[l],s);return a},o.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(i,s){var a=r?i:t.toSetString(i),l=r?this.has(i):n.call(this._set,a),c=this._array.length;(!l||s)&&this._array.push(i),l||(r?this._set.set(i,c):this._set[a]=c)},o.prototype.has=function(i){if(r)return this._set.has(i);var s=t.toSetString(i);return n.call(this._set,s)},o.prototype.indexOf=function(i){if(r){var s=this._set.get(i);if(s>=0)return s}else{var a=t.toSetString(i);if(n.call(this._set,a))return this._set[a]}throw new Error('"'+i+'" is not in the set.')},o.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o}),Zw=qn(e=>{var t=Ka();function n(o,i){var s=o.generatedLine,a=i.generatedLine,l=o.generatedColumn,c=i.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(o,i)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(o,i){this._array.forEach(o,i)},r.prototype.add=function(o){n(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r}),Kw=qn(e=>{var t=Jw(),n=Ka(),r=Hw().ArraySet,o=Zw().MappingList;function i(s){s||(s={}),this._file=n.getArg(s,"file",null),this._sourceRoot=n.getArg(s,"sourceRoot",null),this._skipValidation=n.getArg(s,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(s){var a=s.sourceRoot,l=new i({file:s.file,sourceRoot:a});return s.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,a!=null&&(u.source=n.relative(a,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),l.addMapping(u)}),s.sources.forEach(function(c){var u=c;a!==null&&(u=n.relative(a,c)),l._sources.has(u)||l._sources.add(u);var d=s.sourceContentFor(c);d!=null&&l.setSourceContent(c,d)}),l},i.prototype.addMapping=function(s){var a=n.getArg(s,"generated"),l=n.getArg(s,"original",null),c=n.getArg(s,"source",null),u=n.getArg(s,"name",null);this._skipValidation||this._validateMapping(a,l,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:a.line,generatedColumn:a.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:c,name:u})},i.prototype.setSourceContent=function(s,a){var l=s;this._sourceRoot!=null&&(l=n.relative(this._sourceRoot,l)),a!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[n.toSetString(l)]=a):this._sourcesContents&&(delete this._sourcesContents[n.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(s,a,l){var c=a;if(a==null){if(s.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=s.file}var u=this._sourceRoot;u!=null&&(c=n.relative(u,c));var d=new r,f=new r;this._mappings.unsortedForEach(function(m){if(m.source===c&&m.originalLine!=null){var g=s.originalPositionFor({line:m.originalLine,column:m.originalColumn});g.source!=null&&(m.source=g.source,l!=null&&(m.source=n.join(l,m.source)),u!=null&&(m.source=n.relative(u,m.source)),m.originalLine=g.line,m.originalColumn=g.column,g.name!=null&&(m.name=g.name))}var v=m.source;v!=null&&!d.has(v)&&d.add(v);var F=m.name;F!=null&&!f.has(F)&&f.add(F)},this),this._sources=d,this._names=f,s.sources.forEach(function(m){var g=s.sourceContentFor(m);g!=null&&(l!=null&&(m=n.join(l,m)),u!=null&&(m=n.relative(u,m)),this.setSourceContent(m,g))},this)},i.prototype._validateMapping=function(s,a,l,c){if(a&&typeof a.line!="number"&&typeof a.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(s&&"line"in s&&"column"in s&&s.line>0&&s.column>=0&&!a&&!l&&!c)){if(s&&"line"in s&&"column"in s&&a&&"line"in a&&"column"in a&&s.line>0&&s.column>=0&&a.line>0&&a.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:s,source:l,original:a,name:c}))}},i.prototype._serializeMappings=function(){for(var s=0,a=1,l=0,c=0,u=0,d=0,f="",m,g,v,F,S=this._mappings.toArray(),L=0,x=S.length;L<x;L++){if(g=S[L],m="",g.generatedLine!==a)for(s=0;g.generatedLine!==a;)m+=";",a++;else if(L>0){if(!n.compareByGeneratedPositionsInflated(g,S[L-1]))continue;m+=","}m+=t.encode(g.generatedColumn-s),s=g.generatedColumn,g.source!=null&&(F=this._sources.indexOf(g.source),m+=t.encode(F-d),d=F,m+=t.encode(g.originalLine-1-c),c=g.originalLine-1,m+=t.encode(g.originalColumn-l),l=g.originalColumn,g.name!=null&&(v=this._names.indexOf(g.name),m+=t.encode(v-u),u=v)),f+=m}return f},i.prototype._generateSourcesContent=function(s,a){return s.map(function(l){if(!this._sourcesContents)return null;a!=null&&(l=n.relative(a,l));var c=n.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},i.prototype.toJSON=function(){var s={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(s.file=this._file),this._sourceRoot!=null&&(s.sourceRoot=this._sourceRoot),this._sourcesContents&&(s.sourcesContent=this._generateSourcesContent(s.sources,s.sourceRoot)),s},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i}),Yw={};R(Yw,{AtKeyword:()=>tD,BadString:()=>oD,BadUrl:()=>sD,CDC:()=>fD,CDO:()=>pD,Colon:()=>mD,Comma:()=>gD,Comment:()=>xD,Delim:()=>aD,Dimension:()=>uD,EOF:()=>Xw,Function:()=>eD,Hash:()=>nD,Ident:()=>Qw,LeftCurlyBracket:()=>vD,LeftParenthesis:()=>wD,LeftSquareBracket:()=>yD,Number:()=>lD,Percentage:()=>cD,RightCurlyBracket:()=>kD,RightParenthesis:()=>DD,RightSquareBracket:()=>bD,Semicolon:()=>hD,String:()=>rD,Url:()=>iD,WhiteSpace:()=>dD});Xw=0,Qw=1,eD=2,tD=3,nD=4,rD=5,oD=6,iD=7,sD=8,aD=9,lD=10,cD=11,uD=12,dD=13,pD=14,fD=15,mD=16,hD=17,gD=18,yD=19,bD=20,wD=21,DD=22,vD=23,kD=24,xD=25;Pa=new Array(128),SD=128,Yo=130,Op=131,Qa=132,Ip=133;for(let e=0;e<Pa.length;e++)Pa[e]=Qt(e)&&Yo||ge(e)&&Op||ti(e)&&Qa||_D(e)&&Ip||e||SD;Pp=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];Rd=10,AD=12,jd=13;OD=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||Bd(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||Bd(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Be=16777215,Ot=24,ID=new Map([[2,22],[21,22],[19,20],[23,24]]),PD=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");let n=e.length,r=ri(this.offsetAndType,e.length+1),o=ri(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,d)=>{switch(c){default:o[i]=n;break;case s:{let f=a&Be;for(a=o[f],s=a>>Ot,o[i]=f,o[f++]=i;f<i;f++)o[f]===n&&(o[f]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=ID.get(c),a=s<<Ot|i;break}r[i++]=c<<Ot|d,l===-1&&(l=u)}),r[i]=0<<Ot|n,o[i]=n,o[n]=n;a!==0;){let c=a&Be;a=o[c],o[c]=n}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>Ot:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Be:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Gr(this.source,this.offsetAndType[e-1]&Be,this.offsetAndType[e]&Be,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Be:this.offsetAndType[this.tokenCount]&Be:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Be,t=this.offsetAndType[t],this.tokenType=t>>Ot,this.tokenEnd=t&Be):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>Ot,this.tokenEnd=e&Be):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r,o;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&Be:this.firstCharOffset,t(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:this.balance[r]===n&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,o=this.offsetAndType[t],i=o&Be,s=o>>Ot;n=i,e(s,r,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken((t,n,r,o)=>{e[o]={idx:o,type:Pp[t],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}};Bn=null,fe=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return fe.createItem(e)}allocateCursor(e,t){let n;return Bn!==null?(n=Bn,Bn=Bn.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Bn,Bn=e}updateCursors(e,t,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=t),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let n of e){let r=fe.createItem(n);t!==null?t.next=r:this.head=r,r.prev=t,t=r}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),o=t,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),o=t,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(e,t=this){let n=new fe;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(t,r.data,r,this));return n}filter(e,t=this){let n=new fe;for(let r=this.head;r!==null;r=r.next)e.call(t,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let o=r.next;if(r.next=o.next,t.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let o=r.prev;if(r.prev=o.prev,t.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new fe;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(fe.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(fe.createItem(e))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(fe.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(fe.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(fe.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t!=null?(this.updateCursors(t.prev,e.tail,t,e.head),t.prev!==null?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};ba=100,$d=60,Nd=" ";zd=()=>{},jD=33,BD=35,wa=59,Wd=123,Ud=0;MD=qw(Kw(),1),Vd=new Set(["Atrule","Selector","Declaration"]);ja={};R(ja,{safe:()=>Bp,spec:()=>qD});WD=43,UD=45,va=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){let n=e.charCodeAt(0);return n>127?32768:n<<8}return e},Rp=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],VD=Rp.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);qD=jp(Rp),Bp=jp(VD),GD=92;({hasOwnProperty:tl}=Object.prototype),Lr=function(){};Zd={offset:0,line:1,column:1};Nr=function(e,t){let n=di("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},i0=function(e,t,n,r){let o=di("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=o0(r,n);return o.rawMessage=e,o.syntax=t?pi(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+`
41
41
  syntax: `+o.syntax+`
42
42
  value: `+(i||"<empty string>")+`
43
- --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},Go=new Map,$n=new Map,oi=45,ka=o0,Zd=i0;$p=["initial","inherit","unset","revert","revert-layer"],Jr=43,ot=45,xa=110,Nn=!0,s0=!1;l0=43,Np=45,Lp=63,c0=117;p0=["calc(","-moz-calc(","-webkit-calc("],ol=new Map([[2,22],[21,22],[19,20],[23,24]]);x0={"ident-token":ne(1),"function-token":ne(2),"at-keyword-token":ne(3),"hash-token":ne(4),"string-token":ne(5),"bad-string-token":ne(6),"url-token":ne(7),"bad-url-token":ne(8),"delim-token":ne(9),"number-token":ne(10),"percentage-token":ne(11),"dimension-token":ne(12),"whitespace-token":ne(13),"CDO-token":ne(14),"CDC-token":ne(15),"colon-token":ne(16),"semicolon-token":ne(17),"comma-token":ne(18),"[-token":ne(19),"]-token":ne(20),"(-token":ne(21),")-token":ne(22),"{-token":ne(23),"}-token":ne(24)},C0={string:ne(5),ident:ne(1),percentage:$e(D0),zero:Wp(),number:$e(v0),integer:$e(k0),"custom-ident":m0,"custom-property-name":h0,"hex-color":g0,"id-selector":y0,"an-plus-b":a0,urange:d0,"declaration-value":b0,"any-value":w0};Na={};R(Na,{angle:()=>S0,decibel:()=>P0,flex:()=>I0,frequency:()=>A0,length:()=>_0,resolution:()=>O0,semitones:()=>R0,time:()=>T0});_0=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],S0=["deg","grad","rad","turn"],T0=["s","ms"],A0=["hz","khz"],O0=["dpi","dpcm","dppx","x"],I0=["fr"],P0=["db"],R0=["st"],j0={};R(j0,{SyntaxError:()=>Vp,generate:()=>pi,parse:()=>ul,walk:()=>Kp});B0=9,$0=10,N0=12,L0=13,M0=32,z0=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==L0&&t!==$0&&t!==N0&&t!==M0&&t!==B0)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new Vp(e,this.str,this.pos)}},U0=9,W0=10,V0=12,q0=13,G0=32,qp=33,il=35,Kd=38,ii=39,Gp=40,J0=41,Jp=42,sl=43,al=44,Yd=45,ll=60,Hp=62,La=63,H0=64,mi=91,cl=93,si=123,Xd=124,Qd=125,ep=8734,Hr=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),tp={" ":1,"&&":2,"||":3,"|":4};Ur=function(){};ov={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}};K={type:"Match"},Q={type:"Mismatch"},dl={type:"DisallowEmpty"},av=40,lv=41;({hasOwnProperty:ip}=Object.prototype),uv=0,dv=1,Ua=2,Xp=3,sp="Match",pv="Mismatch",fv="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",ap=15e3,mv=0;Qp={};R(Qp,{getTrace:()=>ef,isKeyword:()=>Dv,isProperty:()=>wv,isType:()=>bv});({hasOwnProperty:qr}=Object.prototype);Cv=za($p.join(" | "));fp=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=Cv,this.syntax=t,this.generic=!1,this.units={...Na},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||xv(e),e){if(e.units)for(let r of Object.keys(Na))Array.isArray(e.units[r])&&(this.units[r]=e.units[r]);if(e.types)for(let r in e.types)this.addType_(r,e.types[r]);if(e.generic){this.generic=!0;for(let[r,o]of Object.entries(E0(this.units)))this.addType_(r,o)}if(e.atrules)for(let r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(let r in e.properties)this.addProperty_(r,e.properties[r])}}checkStructure(e){function t(o,i){r.push({node:o,message:i})}let n=this.structure,r=[];return this.syntax.walk(e,function(o){n.hasOwnProperty(o.type)?n[o.type].check(o,t):t(o,"Unknown node type `"+o.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let o={type:t,name:n},i={type:t,name:n,parent:r,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?i.match=za(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:ul(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:za(i.syntax,o)}),i.match}})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Nr("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!Ln(this,r.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=ka(t);if(!r.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[o.name]&&!r.descriptors[o.basename])return new Nr("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new Nr("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Ze(null,n);let r=this.getAtrule(e);return r.prelude?Ln(this,r.prelude,t||"",!1):Ze(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Ze(null,r);let o=this.getAtrule(e),i=ka(t);return Ln(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?Ze(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Zd(e).custom)return Ze(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Ze(null,n):Ln(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Ln(this,n,t,!1):Ze(null,new Nr("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?Ze(null,new Nr("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Ln(this,e,t,!1))}findValueFragments(e,t,n,r){return dp(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return dp(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:o=>{r.push.apply(r,this.findDeclarationValueFragments(o,t,n))}}),r}getAtrule(e,t=!0){let n=ka(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=Zd(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),s.syntax!==null&&Kp(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;let l=a.type==="Type"?r.types:r.properties,c=a.type==="Type"?t:n;(!hasOwnProperty.call(l,a.name)||e(r,a.name,c,l[a.name]))&&i.set(o,!0)},this)}let t=new Map,n=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter(r=>t.get(r)),n=[...n.keys()].filter(r=>n.get(r)),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:Wa(this.types,!t,e),properties:Wa(this.properties,!t,e),atrules:Fv(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};_v=e=>rf(Va({},e)),Sv={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}}},ml={};R(ml,{AnPlusB:()=>of,Atrule:()=>af,AtrulePrelude:()=>cf,AttributeSelector:()=>df,Block:()=>mf,Brackets:()=>yf,CDC:()=>wf,CDO:()=>vf,ClassSelector:()=>xf,Combinator:()=>Ff,Comment:()=>_f,Declaration:()=>Tf,DeclarationList:()=>If,Dimension:()=>Rf,Function:()=>Bf,Hash:()=>Nf,IdSelector:()=>Uf,Identifier:()=>Mf,MediaFeature:()=>Vf,MediaQuery:()=>Gf,MediaQueryList:()=>Hf,NestingSelector:()=>Kf,Nth:()=>Xf,Number:()=>em,Operator:()=>nm,Parentheses:()=>om,Percentage:()=>sm,PseudoClassSelector:()=>lm,PseudoElementSelector:()=>um,Ratio:()=>pm,Raw:()=>mm,Rule:()=>gm,Selector:()=>bm,SelectorList:()=>Dm,String:()=>km,StyleSheet:()=>_m,TypeSelector:()=>Tm,UnicodeRange:()=>Om,Url:()=>jm,Value:()=>Mm,WhiteSpace:()=>Um});of={};R(of,{generate:()=>Iv,name:()=>Av,parse:()=>sf,structure:()=>Ov});it=43,Ae=45,Xo=110,Xt=!0,Tv=!1;Av="AnPlusB",Ov={a:[String,null],b:[String,null]};af={};R(af,{generate:()=>$v,name:()=>Rv,parse:()=>lf,structure:()=>Bv,walkContext:()=>jv});Rv="Atrule",jv="atrule",Bv={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};cf={};R(cf,{generate:()=>zv,name:()=>Nv,parse:()=>uf,structure:()=>Mv,walkContext:()=>Lv});Nv="AtrulePrelude",Lv="atrulePrelude",Mv={children:[[]]};df={};R(df,{generate:()=>Zv,name:()=>Jv,parse:()=>ff,structure:()=>Hv});Uv=36,pf=42,ei=61,Wv=94,qa=124,Vv=126;Jv="AttributeSelector",Hv={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};mf={};R(mf,{generate:()=>tk,name:()=>Xv,parse:()=>gf,structure:()=>ek,walkContext:()=>Qv});Kv=38;Xv="Block",Qv="block",ek={children:[["Atrule","Rule","Declaration"]]};yf={};R(yf,{generate:()=>ok,name:()=>nk,parse:()=>bf,structure:()=>rk});nk="Brackets",rk={children:[[]]};wf={};R(wf,{generate:()=>ak,name:()=>ik,parse:()=>Df,structure:()=>sk});ik="CDC",sk=[];vf={};R(vf,{generate:()=>uk,name:()=>lk,parse:()=>kf,structure:()=>ck});lk="CDO",ck=[];xf={};R(xf,{generate:()=>mk,name:()=>pk,parse:()=>Cf,structure:()=>fk});dk=46,pk="ClassSelector",fk={name:String};Ff={};R(Ff,{generate:()=>Dk,name:()=>bk,parse:()=>Ef,structure:()=>wk});hk=43,bp=47,gk=62,yk=126,bk="Combinator",wk={name:String};_f={};R(_f,{generate:()=>Fk,name:()=>xk,parse:()=>Sf,structure:()=>Ck});vk=42,kk=47,xk="Comment",Ck={value:String};Tf={};R(Tf,{generate:()=>$k,name:()=>Rk,parse:()=>Of,structure:()=>Bk,walkContext:()=>jk});Af=33,Ek=35,_k=36,Sk=38,Tk=42,Ak=43,wp=47;Rk="Declaration",jk="declaration",Bk={important:[Boolean,String],property:String,value:["Value","Raw"]};If={};R(If,{generate:()=>Wk,name:()=>zk,parse:()=>Pf,structure:()=>Uk});Mk=38;zk="DeclarationList",Uk={children:[["Declaration","Atrule","Rule"]]};Rf={};R(Rf,{generate:()=>Gk,name:()=>Vk,parse:()=>jf,structure:()=>qk});Vk="Dimension",qk={value:String,unit:String};Bf={};R(Bf,{generate:()=>Kk,name:()=>Jk,parse:()=>$f,structure:()=>Zk,walkContext:()=>Hk});Jk="Function",Hk="function",Zk={name:String,children:[[]]};Nf={};R(Nf,{generate:()=>ex,name:()=>Xk,parse:()=>Lf,structure:()=>Qk,xxx:()=>Yk});Yk="XXX",Xk="Hash",Qk={value:String};Mf={};R(Mf,{generate:()=>rx,name:()=>tx,parse:()=>zf,structure:()=>nx});tx="Identifier",nx={name:String};Uf={};R(Uf,{generate:()=>sx,name:()=>ox,parse:()=>Wf,structure:()=>ix});ox="IdSelector",ix={name:String};Vf={};R(Vf,{generate:()=>cx,name:()=>ax,parse:()=>qf,structure:()=>lx});ax="MediaFeature",lx={name:String,value:["Identifier","Number","Dimension","Ratio",null]};Gf={};R(Gf,{generate:()=>px,name:()=>ux,parse:()=>Jf,structure:()=>dx});ux="MediaQuery",dx={children:[["Identifier","MediaFeature","WhiteSpace"]]};Hf={};R(Hf,{generate:()=>hx,name:()=>fx,parse:()=>Zf,structure:()=>mx});fx="MediaQueryList",mx={children:[["MediaQuery"]]};Kf={};R(Kf,{generate:()=>wx,name:()=>yx,parse:()=>Yf,structure:()=>bx});gx=38,yx="NestingSelector",bx={};Xf={};R(Xf,{generate:()=>kx,name:()=>Dx,parse:()=>Qf,structure:()=>vx});Dx="Nth",vx={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};em={};R(em,{generate:()=>Fx,name:()=>xx,parse:()=>tm,structure:()=>Cx});xx="Number",Cx={value:String};nm={};R(nm,{generate:()=>Sx,name:()=>Ex,parse:()=>rm,structure:()=>_x});Ex="Operator",_x={value:String};om={};R(om,{generate:()=>Ox,name:()=>Tx,parse:()=>im,structure:()=>Ax});Tx="Parentheses",Ax={children:[[]]};sm={};R(sm,{generate:()=>Rx,name:()=>Ix,parse:()=>am,structure:()=>Px});Ix="Percentage",Px={value:String};lm={};R(lm,{generate:()=>Nx,name:()=>jx,parse:()=>cm,structure:()=>$x,walkContext:()=>Bx});jx="PseudoClassSelector",Bx="function",$x={name:String,children:[["Raw"],null]};um={};R(um,{generate:()=>Ux,name:()=>Lx,parse:()=>dm,structure:()=>zx,walkContext:()=>Mx});Lx="PseudoElementSelector",Mx="function",zx={name:String,children:[["Raw"],null]};pm={};R(pm,{generate:()=>Jx,name:()=>qx,parse:()=>fm,structure:()=>Gx});Wx=47,Vx=46;qx="Ratio",Gx={left:String,right:String};mm={};R(mm,{generate:()=>Yx,name:()=>Zx,parse:()=>hm,structure:()=>Kx});Zx="Raw",Kx={value:String};gm={};R(gm,{generate:()=>nC,name:()=>Qx,parse:()=>ym,structure:()=>tC,walkContext:()=>eC});Qx="Rule",eC="rule",tC={prelude:["SelectorList","Raw"],block:["Block"]};bm={};R(bm,{generate:()=>iC,name:()=>rC,parse:()=>wm,structure:()=>oC});rC="Selector",oC={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};Dm={};R(Dm,{generate:()=>cC,name:()=>sC,parse:()=>vm,structure:()=>lC,walkContext:()=>aC});sC="SelectorList",aC="selector",lC={children:[["Selector","Raw"]]};km={};R(km,{generate:()=>fC,name:()=>dC,parse:()=>Em,structure:()=>pC});uC={};R(uC,{decode:()=>hl,encode:()=>Fm});Ga=92,xm=34,Cm=39;dC="String",pC={value:String};_m={};R(_m,{generate:()=>bC,name:()=>hC,parse:()=>Sm,structure:()=>yC,walkContext:()=>gC});mC=33;hC="StyleSheet",gC="stylesheet",yC={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};Tm={};R(Tm,{generate:()=>kC,name:()=>DC,parse:()=>Am,structure:()=>vC});wC=42,xp=124;DC="TypeSelector",vC={name:String};Om={};R(Om,{generate:()=>_C,name:()=>FC,parse:()=>Rm,structure:()=>EC});Im=43,Pm=45,Ja=63;FC="UnicodeRange",EC={value:String};jm={};R(jm,{generate:()=>jC,name:()=>PC,parse:()=>Lm,structure:()=>RC});SC={};R(SC,{decode:()=>$m,encode:()=>Nm});TC=32,Ha=92,AC=34,OC=39,IC=40,Bm=41;PC="Url",RC={value:String};Mm={};R(Mm,{generate:()=>NC,name:()=>BC,parse:()=>zm,structure:()=>$C});BC="Value",$C={children:[[]]};Um={};R(Um,{generate:()=>UC,name:()=>MC,parse:()=>Wm,structure:()=>zC});LC=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),MC="WhiteSpace",zC={value:String};WC={generic:!0,...Sv,node:ml},Vm={};R(Vm,{AtrulePrelude:()=>ZC,Selector:()=>s1,Value:()=>c1});VC=35,qC=42,Cp=43,GC=45,JC=47,HC=117;ZC={getNode:qm},KC=35,YC=38,XC=42,QC=43,e1=47,Fp=46,t1=62,n1=124,r1=126;s1={onWhiteSpace:o1,getNode:i1};c1={getNode:qm,onWhiteSpace(e,t){Ep(e)&&(e.value=" "+e.value),Ep(t.last)&&(t.last.value+=" ")},expression:a1,var:l1},u1={parse:{prelude:null,block(){return this.Block(!0)}}},d1={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},p1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},f1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},m1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};y1={parse:{prelude(){let e=Gm.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},b1={"font-face":u1,import:d1,media:p1,nest:f1,page:m1,supports:y1},Yt={parse(){return this.createSingleNodeList(this.SelectorList())}},Ia={parse(){return this.createSingleNodeList(this.Selector())}},_p={parse(){return this.createSingleNodeList(this.Identifier())}},Zo={parse(){return this.createSingleNodeList(this.Nth())}},w1={dir:_p,has:Yt,lang:_p,matches:Yt,is:Yt,"-moz-any":Yt,"-webkit-any":Yt,where:Yt,not:Yt,"nth-child":Zo,"nth-last-child":Zo,"nth-last-of-type":Zo,"nth-of-type":Zo,slotted:Ia,host:Ia,"host-context":Ia},Jm={};R(Jm,{AnPlusB:()=>sf,Atrule:()=>lf,AtrulePrelude:()=>uf,AttributeSelector:()=>ff,Block:()=>gf,Brackets:()=>bf,CDC:()=>Df,CDO:()=>kf,ClassSelector:()=>Cf,Combinator:()=>Ef,Comment:()=>Sf,Declaration:()=>Of,DeclarationList:()=>Pf,Dimension:()=>jf,Function:()=>$f,Hash:()=>Lf,IdSelector:()=>Wf,Identifier:()=>zf,MediaFeature:()=>qf,MediaQuery:()=>Jf,MediaQueryList:()=>Zf,NestingSelector:()=>Yf,Nth:()=>Qf,Number:()=>tm,Operator:()=>rm,Parentheses:()=>im,Percentage:()=>am,PseudoClassSelector:()=>cm,PseudoElementSelector:()=>dm,Ratio:()=>fm,Raw:()=>hm,Rule:()=>ym,Selector:()=>wm,SelectorList:()=>vm,String:()=>Em,StyleSheet:()=>Sm,TypeSelector:()=>Am,UnicodeRange:()=>Rm,Url:()=>Lm,Value:()=>zm,WhiteSpace:()=>Wm});D1={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Vm,atrule:b1,pseudo:w1,node:Jm},v1={node:ml},k1=_v({...WC,...D1,...v1}),x1={};R(x1,{decode:()=>C1,encode:()=>F1});Sp=92;({tokenize:wA,parse:Hm,generate:Zm,lexer:DA,createLexer:vA,walk:Km,find:kA,findLast:xA,findAll:CA,toPlainObject:FA,fromPlainObject:EA,fork:_A}=k1)});function _1(e,t,n){let r=["ClassSelector","AttributeSelector","IdSelector","PseudoClassSelector"],o=["type"],i=["root"];if(e.type==="Rule"&&(e.prelude.type==="SelectorList"&&(e.prelude.children=new fe().fromArray(e.prelude.children.toArray().filter(s=>{let a="children"in s?s.children?.first:null;return!a||!r.includes(a.type)?!1:a.type==="PseudoClassSelector"?i.includes(a.name):a.type==="AttributeSelector"?!o.includes(a.name.name):!0}))),e.prelude.children.toArray().length===0&&n)){n.remove(t);return}}function Qm(e){if(p.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=Hm(e);return Km(t,{enter:_1}),Xm.default.format([Zm(t),E1].join(`
43
+ --------`+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:n&&n.loc&&n.loc.source||"<unknown>",start:l,end:c},o},Go=new Map,$n=new Map,oi=45,ka=s0,Kd=a0;Np=["initial","inherit","unset","revert","revert-layer"],Jr=43,ot=45,xa=110,Nn=!0,l0=!1;u0=43,Lp=45,Mp=63,d0=117;m0=["calc(","-moz-calc(","-webkit-calc("],ol=new Map([[2,22],[21,22],[19,20],[23,24]]);F0={"ident-token":ne(1),"function-token":ne(2),"at-keyword-token":ne(3),"hash-token":ne(4),"string-token":ne(5),"bad-string-token":ne(6),"url-token":ne(7),"bad-url-token":ne(8),"delim-token":ne(9),"number-token":ne(10),"percentage-token":ne(11),"dimension-token":ne(12),"whitespace-token":ne(13),"CDO-token":ne(14),"CDC-token":ne(15),"colon-token":ne(16),"semicolon-token":ne(17),"comma-token":ne(18),"[-token":ne(19),"]-token":ne(20),"(-token":ne(21),")-token":ne(22),"{-token":ne(23),"}-token":ne(24)},E0={string:ne(5),ident:ne(1),percentage:$e(k0),zero:Vp(),number:$e(x0),integer:$e(C0),"custom-ident":g0,"custom-property-name":y0,"hex-color":b0,"id-selector":w0,"an-plus-b":c0,urange:f0,"declaration-value":D0,"any-value":v0};Na={};R(Na,{angle:()=>A0,decibel:()=>j0,flex:()=>R0,frequency:()=>I0,length:()=>T0,resolution:()=>P0,semitones:()=>B0,time:()=>O0});T0=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],A0=["deg","grad","rad","turn"],O0=["s","ms"],I0=["hz","khz"],P0=["dpi","dpcm","dppx","x"],R0=["fr"],j0=["db"],B0=["st"],$0={};R($0,{SyntaxError:()=>qp,generate:()=>pi,parse:()=>ul,walk:()=>Yp});N0=9,L0=10,M0=12,z0=13,W0=32,U0=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(t!==z0&&t!==L0&&t!==M0&&t!==W0&&t!==N0)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new qp(e,this.str,this.pos)}},V0=9,q0=10,G0=12,J0=13,H0=32,Gp=33,il=35,Yd=38,ii=39,Jp=40,Z0=41,Hp=42,sl=43,al=44,Xd=45,ll=60,Zp=62,La=63,K0=64,mi=91,cl=93,si=123,Qd=124,ep=125,tp=8734,Hr=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),np={" ":1,"&&":2,"||":3,"|":4};Wr=function(){};sv={decorator(e){let t=[],n=null;return{...e,node(r){let o=n;n=r,e.node.call(this,r),n=o},emit(r,o,i){t.push({type:o,value:r,node:i?null:n})},result(){return t}}}};K={type:"Match"},Q={type:"Mismatch"},dl={type:"DisallowEmpty"},cv=40,uv=41;({hasOwnProperty:sp}=Object.prototype),pv=0,fv=1,Wa=2,Qp=3,ap="Match",mv="Mismatch",hv="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",lp=15e3,gv=0;ef={};R(ef,{getTrace:()=>tf,isKeyword:()=>kv,isProperty:()=>vv,isType:()=>Dv});({hasOwnProperty:qr}=Object.prototype);Ev=za(Np.join(" | "));mp=class{constructor(e,t,n){if(this.cssWideKeywordsSyntax=Ev,this.syntax=t,this.generic=!1,this.units={...Na},this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=n||Fv(e),e){if(e.units)for(let r of Object.keys(Na))Array.isArray(e.units[r])&&(this.units[r]=e.units[r]);if(e.types)for(let r in e.types)this.addType_(r,e.types[r]);if(e.generic){this.generic=!0;for(let[r,o]of Object.entries(S0(this.units)))this.addType_(r,o)}if(e.atrules)for(let r in e.atrules)this.addAtrule_(r,e.atrules[r]);if(e.properties)for(let r in e.properties)this.addProperty_(r,e.properties[r])}}checkStructure(e){function t(o,i){r.push({node:o,message:i})}let n=this.structure,r=[];return this.syntax.walk(e,function(o){n.hasOwnProperty(o.type)?n[o.type].check(o,t):t(o,"Unknown node type `"+o.type+"`")}),r.length?r:!1}createDescriptor(e,t,n,r=null){let o={type:t,name:n},i={type:t,name:n,parent:r,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?i.match=za(e,o):(typeof e=="string"?Object.defineProperty(i,"syntax",{get(){return Object.defineProperty(i,"syntax",{value:ul(e)}),i.syntax}}):i.syntax=e,Object.defineProperty(i,"match",{get(){return Object.defineProperty(i,"match",{value:za(i.syntax,o)}),i.match}})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((n,r)=>(n[r]=this.createDescriptor(t.descriptors[r],"AtruleDescriptor",r,e),n),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new Nr("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e);if(!r.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(r.prelude&&!t&&!Ln(this,r.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let n=this.checkAtruleName(e);if(n)return n;let r=this.getAtrule(e),o=ka(t);if(!r.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!r.descriptors[o.name]&&!r.descriptors[o.basename])return new Nr("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new Nr("Unknown property",e)}matchAtrulePrelude(e,t){let n=this.checkAtrulePrelude(e,t);if(n)return Ze(null,n);let r=this.getAtrule(e);return r.prelude?Ln(this,r.prelude,t||"",!1):Ze(null,null)}matchAtruleDescriptor(e,t,n){let r=this.checkAtruleDescriptorName(e,t);if(r)return Ze(null,r);let o=this.getAtrule(e),i=ka(t);return Ln(this,o.descriptors[i.name]||o.descriptors[i.basename],n,!1)}matchDeclaration(e){return e.type!=="Declaration"?Ze(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(Kd(e).custom)return Ze(null,new Error("Lexer matching doesn't applicable for custom properties"));let n=this.checkPropertyName(e);return n?Ze(null,n):Ln(this,this.getProperty(e),t,!0)}matchType(e,t){let n=this.getType(e);return n?Ln(this,n,t,!1):Ze(null,new Nr("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?Ze(null,new Nr("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Ln(this,e,t,!1))}findValueFragments(e,t,n,r){return pp(this,t,this.matchProperty(e,t),n,r)}findDeclarationValueFragments(e,t,n){return pp(this,e.value,this.matchDeclaration(e),t,n)}findAllFragments(e,t,n){let r=[];return this.syntax.walk(e,{visit:"Declaration",enter:o=>{r.push.apply(r,this.findDeclarationValueFragments(o,t,n))}}),r}getAtrule(e,t=!0){let n=ka(e);return(n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name])||null}getAtrulePrelude(e,t=!0){let n=this.getAtrule(e,t);return n&&n.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let n=Kd(e);return(n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(r,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),s.syntax!==null&&Yp(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;let l=a.type==="Type"?r.types:r.properties,c=a.type==="Type"?t:n;(!hasOwnProperty.call(l,a.name)||e(r,a.name,c,l[a.name]))&&i.set(o,!0)},this)}let t=new Map,n=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let r in this.properties)e(this,r,n,this.properties[r]);return t=[...t.keys()].filter(r=>t.get(r)),n=[...n.keys()].filter(r=>n.get(r)),t.length||n.length?{types:t,properties:n}:null}dump(e,t){return{generic:this.generic,units:this.units,types:Ua(this.types,!t,e),properties:Ua(this.properties,!t,e),atrules:_v(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};Tv=e=>of(Va({},e)),Av={generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( <calc-sum> )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( <calc-sum> )","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>","asin()":"asin( <calc-sum> )","atan()":"atan( <calc-sum> )","atan2()":"atan2( <calc-sum> , <calc-sum> )",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|<calc-constant>|( <calc-sum> )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )","cos()":"cos( <calc-sum> )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","exp()":"exp( <calc-sum> )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )","hypot()":"hypot( <calc-sum># )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length-percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","log()":"log( <calc-sum> , <calc-sum>? )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length-percentage>|min-content|max-content|auto] , [<length-percentage>|<flex>|min-content|max-content|auto] )","mod()":"mod( <calc-sum> , <calc-sum> )","name-repeat":"repeat( [<integer [1,\u221E]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( [<length [0,\u221E]>|none] )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pow()":"pow( <calc-sum> , <calc-sum> )","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )",ratio:"<number [0,\u221E]> [/ <number [0,\u221E]>]?","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","rem()":"rem( <calc-sum> , <calc-sum> )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","reversed-counter-name":"reversed( <counter-name> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","round()":"round( <rounding-strategy>? , <calc-sum> , <calc-sum> )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( <number-percentage> )","scale()":"scale( [<number>|<percentage>]#{1,2} )","scale3d()":"scale3d( [<number>|<percentage>]#{3} )","scaleX()":"scaleX( [<number>|<percentage>] )","scaleY()":"scaleY( [<number>|<percentage>] )","scaleZ()":"scaleZ( [<number>|<percentage>] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","sign()":"sign( <calc-sum> )","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( <calc-sum> )","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>|scroll( <axis>? <scroller>? )","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","sqrt()":"sqrt( <calc-sum> )","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>","tan()":"tan( <calc-sum> )",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,\u221E]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( <length-percentage> )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text",bottom:"<length>|auto","container-name":"<custom-ident>","container-condition":"not <query-in-parens>|<query-in-parens> [[and <query-in-parens>]*|[or <query-in-parens>]*]","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",right:"<length>|auto","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","single-animation-composition":"replace|add|accumulate","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,\u221E]>","query-in-parens":"( <container-condition> )|( <size-feature> )|style( <style-query> )|<general-enclosed>","size-feature":"<mf-plain>|<mf-boolean>|<mf-range>","style-feature":"<declaration>","style-query":"<style-condition>|<style-feature>","style-condition":"not <style-in-parens>|<style-in-parens> [[and <style-in-parens>]*|[or <style-in-parens>]*]","style-in-parens":"( <style-condition> )|( <style-feature> )|<general-enclosed>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-composition":"<single-animation-composition>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end",caret:"<'caret-color'>||<'caret-shape'>","caret-color":"auto|<color>","caret-shape":"auto|bar|block|underscore",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[[size||inline-size]||layout||style||paint]","contain-intrinsic-size":"[none|<length>|auto <length>]{1,2}","contain-intrinsic-block-size":"none|<length>|auto <length>","contain-intrinsic-height":"none|<length>|auto <length>","contain-intrinsic-inline-size":"none|<length>|auto <length>","contain-intrinsic-width":"none|<length>|auto <length>",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-depth":"auto-add|add( <integer> )|<integer>","math-shift":"normal|compact","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,\u221E]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","scroll-timeline":"<scroll-timeline-name>||<scroll-timeline-axis>","scroll-timeline-axis":"block|inline|vertical|horizontal","scroll-timeline-name":"none|<custom-ident>","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",container:"<'container-name'> [/ <'container-type'>]?","container-name":"none|<custom-ident>+","container-type":"normal||[size|inline-size]",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}},container:{prelude:"[<container-name>]? <container-condition>",descriptors:null},nest:{prelude:"<complex-selector-list>",descriptors:null}}},ml={};R(ml,{AnPlusB:()=>sf,Atrule:()=>lf,AtrulePrelude:()=>uf,AttributeSelector:()=>pf,Block:()=>hf,Brackets:()=>bf,CDC:()=>Df,CDO:()=>kf,ClassSelector:()=>Cf,Combinator:()=>Ef,Comment:()=>Sf,Declaration:()=>Af,DeclarationList:()=>Pf,Dimension:()=>jf,Function:()=>$f,Hash:()=>Lf,IdSelector:()=>Uf,Identifier:()=>zf,MediaFeature:()=>qf,MediaQuery:()=>Jf,MediaQueryList:()=>Zf,NestingSelector:()=>Yf,Nth:()=>Qf,Number:()=>tm,Operator:()=>rm,Parentheses:()=>im,Percentage:()=>am,PseudoClassSelector:()=>cm,PseudoElementSelector:()=>dm,Ratio:()=>fm,Raw:()=>hm,Rule:()=>ym,Selector:()=>wm,SelectorList:()=>vm,String:()=>xm,StyleSheet:()=>Sm,TypeSelector:()=>Am,UnicodeRange:()=>Im,Url:()=>Bm,Value:()=>zm,WhiteSpace:()=>Um});sf={};R(sf,{generate:()=>Rv,name:()=>Iv,parse:()=>af,structure:()=>Pv});it=43,Ae=45,Xo=110,Xt=!0,Ov=!1;Iv="AnPlusB",Pv={a:[String,null],b:[String,null]};lf={};R(lf,{generate:()=>Lv,name:()=>Bv,parse:()=>cf,structure:()=>Nv,walkContext:()=>$v});Bv="Atrule",$v="atrule",Nv={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};uf={};R(uf,{generate:()=>Uv,name:()=>Mv,parse:()=>df,structure:()=>Wv,walkContext:()=>zv});Mv="AtrulePrelude",zv="atrulePrelude",Wv={children:[[]]};pf={};R(pf,{generate:()=>Yv,name:()=>Zv,parse:()=>mf,structure:()=>Kv});Vv=36,ff=42,ei=61,qv=94,qa=124,Gv=126;Zv="AttributeSelector",Kv={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};hf={};R(hf,{generate:()=>rk,name:()=>ek,parse:()=>yf,structure:()=>nk,walkContext:()=>tk});Xv=38;ek="Block",tk="block",nk={children:[["Atrule","Rule","Declaration"]]};bf={};R(bf,{generate:()=>sk,name:()=>ok,parse:()=>wf,structure:()=>ik});ok="Brackets",ik={children:[[]]};Df={};R(Df,{generate:()=>ck,name:()=>ak,parse:()=>vf,structure:()=>lk});ak="CDC",lk=[];kf={};R(kf,{generate:()=>pk,name:()=>uk,parse:()=>xf,structure:()=>dk});uk="CDO",dk=[];Cf={};R(Cf,{generate:()=>gk,name:()=>mk,parse:()=>Ff,structure:()=>hk});fk=46,mk="ClassSelector",hk={name:String};Ef={};R(Ef,{generate:()=>kk,name:()=>Dk,parse:()=>_f,structure:()=>vk});yk=43,wp=47,bk=62,wk=126,Dk="Combinator",vk={name:String};Sf={};R(Sf,{generate:()=>_k,name:()=>Fk,parse:()=>Tf,structure:()=>Ek});xk=42,Ck=47,Fk="Comment",Ek={value:String};Af={};R(Af,{generate:()=>Lk,name:()=>Bk,parse:()=>If,structure:()=>Nk,walkContext:()=>$k});Of=33,Sk=35,Tk=36,Ak=38,Ok=42,Ik=43,Dp=47;Bk="Declaration",$k="declaration",Nk={important:[Boolean,String],property:String,value:["Value","Raw"]};Pf={};R(Pf,{generate:()=>qk,name:()=>Uk,parse:()=>Rf,structure:()=>Vk});Wk=38;Uk="DeclarationList",Vk={children:[["Declaration","Atrule","Rule"]]};jf={};R(jf,{generate:()=>Hk,name:()=>Gk,parse:()=>Bf,structure:()=>Jk});Gk="Dimension",Jk={value:String,unit:String};$f={};R($f,{generate:()=>Xk,name:()=>Zk,parse:()=>Nf,structure:()=>Yk,walkContext:()=>Kk});Zk="Function",Kk="function",Yk={name:String,children:[[]]};Lf={};R(Lf,{generate:()=>nx,name:()=>ex,parse:()=>Mf,structure:()=>tx,xxx:()=>Qk});Qk="XXX",ex="Hash",tx={value:String};zf={};R(zf,{generate:()=>ix,name:()=>rx,parse:()=>Wf,structure:()=>ox});rx="Identifier",ox={name:String};Uf={};R(Uf,{generate:()=>lx,name:()=>sx,parse:()=>Vf,structure:()=>ax});sx="IdSelector",ax={name:String};qf={};R(qf,{generate:()=>dx,name:()=>cx,parse:()=>Gf,structure:()=>ux});cx="MediaFeature",ux={name:String,value:["Identifier","Number","Dimension","Ratio",null]};Jf={};R(Jf,{generate:()=>mx,name:()=>px,parse:()=>Hf,structure:()=>fx});px="MediaQuery",fx={children:[["Identifier","MediaFeature","WhiteSpace"]]};Zf={};R(Zf,{generate:()=>yx,name:()=>hx,parse:()=>Kf,structure:()=>gx});hx="MediaQueryList",gx={children:[["MediaQuery"]]};Yf={};R(Yf,{generate:()=>vx,name:()=>wx,parse:()=>Xf,structure:()=>Dx});bx=38,wx="NestingSelector",Dx={};Qf={};R(Qf,{generate:()=>Cx,name:()=>kx,parse:()=>em,structure:()=>xx});kx="Nth",xx={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};tm={};R(tm,{generate:()=>_x,name:()=>Fx,parse:()=>nm,structure:()=>Ex});Fx="Number",Ex={value:String};rm={};R(rm,{generate:()=>Ax,name:()=>Sx,parse:()=>om,structure:()=>Tx});Sx="Operator",Tx={value:String};im={};R(im,{generate:()=>Px,name:()=>Ox,parse:()=>sm,structure:()=>Ix});Ox="Parentheses",Ix={children:[[]]};am={};R(am,{generate:()=>Bx,name:()=>Rx,parse:()=>lm,structure:()=>jx});Rx="Percentage",jx={value:String};cm={};R(cm,{generate:()=>Mx,name:()=>$x,parse:()=>um,structure:()=>Lx,walkContext:()=>Nx});$x="PseudoClassSelector",Nx="function",Lx={name:String,children:[["Raw"],null]};dm={};R(dm,{generate:()=>Vx,name:()=>zx,parse:()=>pm,structure:()=>Ux,walkContext:()=>Wx});zx="PseudoElementSelector",Wx="function",Ux={name:String,children:[["Raw"],null]};fm={};R(fm,{generate:()=>Zx,name:()=>Jx,parse:()=>mm,structure:()=>Hx});qx=47,Gx=46;Jx="Ratio",Hx={left:String,right:String};hm={};R(hm,{generate:()=>Qx,name:()=>Yx,parse:()=>gm,structure:()=>Xx});Yx="Raw",Xx={value:String};ym={};R(ym,{generate:()=>oC,name:()=>tC,parse:()=>bm,structure:()=>rC,walkContext:()=>nC});tC="Rule",nC="rule",rC={prelude:["SelectorList","Raw"],block:["Block"]};wm={};R(wm,{generate:()=>aC,name:()=>iC,parse:()=>Dm,structure:()=>sC});iC="Selector",sC={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};vm={};R(vm,{generate:()=>dC,name:()=>lC,parse:()=>km,structure:()=>uC,walkContext:()=>cC});lC="SelectorList",cC="selector",uC={children:[["Selector","Raw"]]};xm={};R(xm,{generate:()=>hC,name:()=>fC,parse:()=>_m,structure:()=>mC});pC={};R(pC,{decode:()=>hl,encode:()=>Em});Ga=92,Cm=34,Fm=39;fC="String",mC={value:String};Sm={};R(Sm,{generate:()=>DC,name:()=>yC,parse:()=>Tm,structure:()=>wC,walkContext:()=>bC});gC=33;yC="StyleSheet",bC="stylesheet",wC={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};Am={};R(Am,{generate:()=>CC,name:()=>kC,parse:()=>Om,structure:()=>xC});vC=42,Cp=124;kC="TypeSelector",xC={name:String};Im={};R(Im,{generate:()=>TC,name:()=>_C,parse:()=>jm,structure:()=>SC});Pm=43,Rm=45,Ja=63;_C="UnicodeRange",SC={value:String};Bm={};R(Bm,{generate:()=>$C,name:()=>jC,parse:()=>Mm,structure:()=>BC});AC={};R(AC,{decode:()=>Nm,encode:()=>Lm});OC=32,Ha=92,IC=34,PC=39,RC=40,$m=41;jC="Url",BC={value:String};zm={};R(zm,{generate:()=>MC,name:()=>NC,parse:()=>Wm,structure:()=>LC});NC="Value",LC={children:[[]]};Um={};R(Um,{generate:()=>VC,name:()=>WC,parse:()=>Vm,structure:()=>UC});zC=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),WC="WhiteSpace",UC={value:String};qC={generic:!0,...Av,node:ml},qm={};R(qm,{AtrulePrelude:()=>YC,Selector:()=>l1,Value:()=>d1});GC=35,JC=42,Fp=43,HC=45,ZC=47,KC=117;YC={getNode:Gm},XC=35,QC=38,e1=42,t1=43,n1=47,Ep=46,r1=62,o1=124,i1=126;l1={onWhiteSpace:s1,getNode:a1};d1={getNode:Gm,onWhiteSpace(e,t){_p(e)&&(e.value=" "+e.value),_p(t.last)&&(t.last.value+=" ")},expression:c1,var:u1},p1={parse:{prelude:null,block(){return this.Block(!0)}}},f1={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},m1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},h1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},g1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};w1={parse:{prelude(){let e=Jm.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(e=!1){return this.Block(e)}}},D1={"font-face":p1,import:f1,media:m1,nest:h1,page:g1,supports:w1},Yt={parse(){return this.createSingleNodeList(this.SelectorList())}},Ia={parse(){return this.createSingleNodeList(this.Selector())}},Sp={parse(){return this.createSingleNodeList(this.Identifier())}},Zo={parse(){return this.createSingleNodeList(this.Nth())}},v1={dir:Sp,has:Yt,lang:Sp,matches:Yt,is:Yt,"-moz-any":Yt,"-webkit-any":Yt,where:Yt,not:Yt,"nth-child":Zo,"nth-last-child":Zo,"nth-last-of-type":Zo,"nth-of-type":Zo,slotted:Ia,host:Ia,"host-context":Ia},Hm={};R(Hm,{AnPlusB:()=>af,Atrule:()=>cf,AtrulePrelude:()=>df,AttributeSelector:()=>mf,Block:()=>yf,Brackets:()=>wf,CDC:()=>vf,CDO:()=>xf,ClassSelector:()=>Ff,Combinator:()=>_f,Comment:()=>Tf,Declaration:()=>If,DeclarationList:()=>Rf,Dimension:()=>Bf,Function:()=>Nf,Hash:()=>Mf,IdSelector:()=>Vf,Identifier:()=>Wf,MediaFeature:()=>Gf,MediaQuery:()=>Hf,MediaQueryList:()=>Kf,NestingSelector:()=>Xf,Nth:()=>em,Number:()=>nm,Operator:()=>om,Parentheses:()=>sm,Percentage:()=>lm,PseudoClassSelector:()=>um,PseudoElementSelector:()=>pm,Ratio:()=>mm,Raw:()=>gm,Rule:()=>bm,Selector:()=>Dm,SelectorList:()=>km,String:()=>_m,StyleSheet:()=>Tm,TypeSelector:()=>Om,UnicodeRange:()=>jm,Url:()=>Mm,Value:()=>Wm,WhiteSpace:()=>Vm});k1={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:qm,atrule:D1,pseudo:v1,node:Hm},x1={node:ml},C1=Tv({...qC,...k1,...x1}),F1={};R(F1,{decode:()=>E1,encode:()=>_1});Tp=92;({tokenize:kA,parse:Zm,generate:Km,lexer:xA,createLexer:CA,walk:Ym,find:FA,findLast:EA,findAll:_A,toPlainObject:SA,fromPlainObject:TA,fork:AA}=C1)});function T1(e,t,n){let r=["ClassSelector","AttributeSelector","IdSelector","PseudoClassSelector"],o=["type"],i=["root"];if(e.type==="Rule"&&(e.prelude.type==="SelectorList"&&(e.prelude.children=new fe().fromArray(e.prelude.children.toArray().filter(s=>{let a="children"in s?s.children?.first:null;return!a||!r.includes(a.type)?!1:a.type==="PseudoClassSelector"?i.includes(a.name):a.type==="AttributeSelector"?!o.includes(a.name.name):!0}))),e.prelude.children.toArray().length===0&&n)){n.remove(t);return}}function eh(e){if(p.info("Detected skipTagSelectors flag is enabled. Skipping global CSS tags."),!e)return"";try{let t=Zm(e);return Ym(t,{enter:T1}),Qm.default.format([Km(t),S1].join(`
44
44
 
45
- `).trim(),{parser:"css"})}catch{return p.warn("There was a problem skipping global tags from CSS. Falling back to normal global CSS."),e}}function eh(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var Xm,E1,th=A(()=>{"use strict";Ym();Xm=D(require("prettier"));V();E1=`
45
+ `).trim(),{parser:"css"})}catch{return p.warn("There was a problem skipping global tags from CSS. Falling back to normal global CSS."),e}}function th(e){return e.reduce((t,n)=>(n.path==="css/global.css"?t.globalCss=n:t.rest.push(n),t),{rest:[]})}var Qm,S1,nh=A(()=>{"use strict";Xm();Qm=D(require("prettier"));V();S1=`
46
46
  .w-icon-slider-right:before {
47
47
  content: "\\e600";
48
48
  }
@@ -61,25 +61,27 @@ in your project root.`),new b(a)}}function Od(e){if(!(e===void 0||e===!1)){if(ty
61
61
  .w-icon-file-upload-icon:before {
62
62
  content: "\\e903";
63
63
  }
64
- `});function S1(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}function T1(e){if(e.ok){switch(e.status){case 206:p.warn("You exceeded the limit of components and some components were not exported.");break;case 207:p.warn("Certain components couldn't be exported due to an unexpected error.");break}return}}async function A1(e){switch(e.status){case 400:{let t=await e.text(),n=S1(t);throw new Gn(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new Gn("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new Gn("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new Gn(`Something went wrong (HTTP ${e.status}).`)}}async function O1(e){try{let{siteId:t,host:n,authToken:r,components:o,cssModules:i,relativeHrefRoot:s}=e,a=new URLSearchParams({cssModules:i?"true":"false"});o&&a.append("components",o),s!==void 0&&a.append("relativeHrefRoot",String(s));let l=`?${a.toString()}`,c=await Y(`${n}/devlink/${t}${l}`,{headers:{Authorization:`Bearer ${r}`},timeout:6e4});return T1(c),c.ok?await c.json():A1(c)}catch(t){throw new b(t,{skipLogging:!0})}}async function gl(e){try{let t=await O1(e);if(!t.files||!Array.isArray(t.files))throw new b("Invalid response format from V1 API: expected 'files' array");let n=I1(t.files,e);t.issues&&t.issues.length>0&&R1(t.issues),await pa(n,e.rootDir,!0)}catch(t){throw t instanceof b?t:new b(t,{skipLogging:!0})}}function I1(e,t){let n=t.skipTagSelectors===!0,r=!!t.fileExtensions,o=t.envVariables&&Object.keys(t.envVariables).length>0;if(!n&&!r&&!o)return e;let i=e;if(n){let{rest:s,globalCss:a}=eh(e);if(a){let l=Qm(a.content);i=[...s,{...a,content:l}]}}return!r&&!o?i:i.map(s=>{let a=s.path,l=s.content;if(r){if(t.fileExtensions.js){let c=t.fileExtensions.js.startsWith(".")?t.fileExtensions.js:`.${t.fileExtensions.js}`;a=a.replace(/\.(jsx|js)$/,c)}if(t.fileExtensions.css){let c=t.fileExtensions.css.startsWith(".")?t.fileExtensions.css:`.${t.fileExtensions.css}`;a=a.replace(/\.css$/,c)}}return o&&(l=P1(l,t.envVariables)),{path:a,content:l}})}function P1(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replace(new RegExp(`DEVLINK_ENV_${r}`,"g"),o.trim()),e):e}function R1(e){p.warn(`
65
- ${zo(e.length,"component")} could not be fully exported. See code comments for more details:`);let t={"invalid-attribute":"Invalid attribute(s)","unsupported-element":"Unsupported element(s)","unsupported-prop":"Unsupported prop(s)"};e.forEach(n=>{let o=[...Array.from(new Set(n.warnings?.map(i=>i.type)||[])).map(i=>t[i]).filter(Boolean),...n.error?[n.error]:[]];p.warn(`- ${n.componentName}: ${o.join(", ")}`)})}var Gn,nh=A(()=>{"use strict";V();fa();Et();ae();Uo();th();Gn=class extends Error{constructor(t){super(t)}}});function hi(e){return async function(n){tn.default.removeListener("uncaughtException",hi),tn.default.removeListener("unhandledRejection",hi);let r=await Lo(e);if(!r)return;await new yl(r,n).prompt()}}function rh(e){tn.default.on("uncaughtException",hi(e)),tn.default.on("unhandledRejection",hi(e))}var tn,yl,oh=A(()=>{"use strict";tn=D(require("process"));V();$r();Bo();be();Et();yl=class{config;error;constructor(t,n){this.config=t,this.error=n}stripPII(t=""){return t.replace(/\/(.*)webflow-cli/gi,"/REDACTED_PII/webflow-cli/").replace(/\/(.*)node_modules/gi,"/REDACTED_PII/node_modules")}sendTelemetry(){let t=this.config,n=this.error;Y(`${t.host}/devlink/${t.siteId}/telemetry`,{headers:{Authorization:`Bearer ${t.authToken}`,"Content-Type":"application/json"},method:"post",body:JSON.stringify({cause:n.cause,message:n.message,name:n.name,stack:this.stripPII(n.stack),platform:tn.default.platform,node:tn.default.version})})}async storeChoice(t){try{return he({devlink:{allowTelemetry:t}})}catch{let r=await Rn();await ld({...r,allowTelemetry:t})}}async prompt(){let t=this.config;if(p.error(this.error),t.allowTelemetry===!0)p.info("Sending crash report telemetry..."),this.sendTelemetry();else if(t.allowTelemetry===!1){p.info("Skipping crash report telemetry...");return}else p.info("Telemetry is enabled. Crash reports help us improve Webflow CLI."),p.info("To opt out, run: webflow auth telemetry --disable"),await this.storeChoice(!0),p.info("Sending crash report telemetry..."),this.sendTelemetry()}}});var ih={};bc(ih,{syncComponents:()=>wl});async function wl(e,t){let n=Date.now(),{manifest:r}=H(),{accessToken:o,siteId:i}=await we(r,{site:t?.site,apiToken:t?.apiToken}),s={...o?{authToken:o}:{},...i?{siteId:i}:{},...e&&e.length>0?{components:jn(e),overwriteModule:!1}:{overwriteModule:!0}};rh(s);let a=await Lo(s);if(!a)return bl.default.exit();let l;try{l=Z.forDevlinkSync(a)}catch(u){p.debug(`Failed to initialize telemetry: ${u}`)}await l?.sendUsage("devlink_sync_start",{specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot});let c=p.spinner(`Exporting components into ${a.rootDir}`);try{await gl(a),c.succeed(`Successfully exported components into ${a.rootDir} folder`);let u=Date.now()-n;await l?.sendUsage("devlink_sync_success",{duration:u,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let d=u instanceof Error?u.message:String(u);c.fail(`Failed to export components: ${d}`);let f=Date.now()-n;throw await l?.sendError(u instanceof Error?u:new Error(String(u)),"devlink_sync_failure",{duration:f,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot,configOverrides:Object.keys(s),argv:bl.default.argv.slice(2)}),u}}var bl,Dl=A(()=>{"use strict";bl=D(require("process"));$r();nh();oh();qe();V();nt();be()});var ob=require("commander");V();var Iu=require("child_process"),Pu=require("fs"),Js=D(require("semver"));V();var Hs="@webflow/webflow-cli",Jt="@webflow/data-types",Fo="@webflow/react",gw=[Hs,Jt,Fo],Ht=class{getInstalledDependencies(){try{let t=(0,Iu.execSync)(`npm ls ${gw.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),n=JSON.parse(t);return n.dependencies?Object.entries(n.dependencies).reduce((r,[o,{version:i}])=>(r[o]=i,r),{}):{}}catch(t){return p.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let n=JSON.parse((0,Pu.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...n.dependencies,...n.devDependencies}}checkCLIAndDataTypes(t){let n=t[Jt];if(!n)return;let o=this.getRequiredDependencies(Hs)[Jt];if(!Js.default.satisfies(n,o))throw new Error(`Version mismatch: ${Hs} requires ${Jt} v${o} but found v${n}`)}checkReactAndDataTypes(t){let n=t[Jt],r=t[Fo];if(!(!n||!r)&&!Js.default.eq(n,r))throw new Error(`Version mismatch: ${Fo} and ${Jt} must be on the same version. Found ${Fo}@${r} and ${Jt}@${n}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var Nu=require("fs-extra");Je();var Lu=require("@dotenvx/dotenvx"),Zt=D(require("semver"));V();var ju=require("child_process"),Bu=require("util"),bw=(0,Bu.promisify)(ju.exec);async function St(e,t){try{let{stdout:n,stderr:r}=await bw(e,t);return{stdout:n.toString().trim(),stderr:r.toString().trim(),code:0}}catch(n){let r=n;return{stdout:r.stdout??"",stderr:r.stderr??String(r.message??""),code:r.code??1}}}_e();var Zs=D(ko());(0,Lu.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var $u={npm:{updateCommand:"npm install",update:async e=>await St(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await St(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await St(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await St(`pnpm outdated --json ${e}`);return JSON.parse(t)},lockFile:"pnpm-lock.yaml",globalFlag:"--global",supported:!0},yarn:{lockFile:"yarn.lock",globalFlag:"",updateCommand:"",getOutdated:async()=>({}),update:async()=>({stdout:"",stderr:"",code:0}),supported:!1}},ww=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],Or=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries($u))if((0,Nu.existsSync)(t.lockFile))return t;return $u.npm}async listOutdatedPackages(t="local",n=ww){let{getOutdated:r,globalFlag:o}=this.packageManager,i=await r(`${t==="global"?o:""} ${n?.join(" ")}`);return Object.fromEntries(Object.entries(i).map(([s,a])=>Array.isArray(a)?[s,{current:a[0].current,latest:a[0].latest,installationType:t}]:[s,{current:a.current,latest:a.latest,installationType:t}]))}async getOutdatedPackages(){let t=await this.listOutdatedPackages();if(t["@webflow/webflow-cli"])return t;let n=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...n}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let r=await Eo({message:"New versions of the following @webflow packages are available. Would you like to update?",choices:Object.entries(t).map(([o,{current:i,latest:s}])=>({name:`${o} (${i} \u2192 ${s})`,value:o}))});return r??[]}else{let[[r,{current:o,latest:i}]]=Object.entries(t);return await Ge({message:`A new version of ${r} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[r]:[]}}showUpdateSuggestions(t){let n=Object.keys(t).length>1,{updateCommand:r,globalFlag:o}=this.packageManager;if(n){console.log(`
64
+ `});function A1(e){try{let t=JSON.parse(e);if(t.msg&&typeof t.msg=="string")return t.msg}catch{}return null}function O1(e){if(e.ok){switch(e.status){case 206:p.warn("You exceeded the limit of components and some components were not exported.");break;case 207:p.warn("Certain components couldn't be exported due to an unexpected error.");break}return}}async function I1(e){switch(e.status){case 400:{let t=await e.text(),n=A1(t);throw new Gn(n||"Bad request: The server rejected the request due to invalid input. Please check your configuration and try again.")}case 401:throw new Gn("Your access token is invalid for the provided siteId. Double check your configs in your .webflowrc configuration file.");case 404:throw new Gn("You're not currently enrolled in the DevLink beta. You can apply for access here: https://webflow.com/devlink");default:throw new Gn(`Something went wrong (HTTP ${e.status}).`)}}async function P1(e){try{let{siteId:t,host:n,authToken:r,components:o,cssModules:i,relativeHrefRoot:s}=e,a=new URLSearchParams({cssModules:i?"true":"false"});o&&a.append("components",o),s!==void 0&&a.append("relativeHrefRoot",String(s));let l=`?${a.toString()}`,c=await Y(`${n}/devlink/${t}${l}`,{headers:{Authorization:`Bearer ${r}`},timeout:6e4});return O1(c),c.ok?await c.json():I1(c)}catch(t){throw new b(t,{skipLogging:!0})}}async function gl(e){try{let t=await P1(e);if(!t.files||!Array.isArray(t.files))throw new b("Invalid response format from V1 API: expected 'files' array");let n=R1(t.files,e);t.issues&&t.issues.length>0&&B1(t.issues),await pa(n,e.rootDir,!0)}catch(t){throw t instanceof b?t:new b(t,{skipLogging:!0})}}function R1(e,t){let n=t.skipTagSelectors===!0,r=!!t.fileExtensions,o=t.envVariables&&Object.keys(t.envVariables).length>0;if(!n&&!r&&!o)return e;let i=e;if(n){let{rest:s,globalCss:a}=th(e);if(a){let l=eh(a.content);i=[...s,{...a,content:l}]}}return!r&&!o?i:i.map(s=>{let a=s.path,l=s.content;if(r){if(t.fileExtensions.js){let c=t.fileExtensions.js.startsWith(".")?t.fileExtensions.js:`.${t.fileExtensions.js}`;a=a.replace(/\.(jsx|js)$/,c)}if(t.fileExtensions.css){let c=t.fileExtensions.css.startsWith(".")?t.fileExtensions.css:`.${t.fileExtensions.css}`;a=a.replace(/\.css$/,c)}}return o&&(l=j1(l,t.envVariables)),{path:a,content:l}})}function j1(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replace(new RegExp(`DEVLINK_ENV_${r}`,"g"),o.trim()),e):e}function B1(e){p.warn(`
65
+ ${zo(e.length,"component")} could not be fully exported. See code comments for more details:`);let t={"invalid-attribute":"Invalid attribute(s)","unsupported-element":"Unsupported element(s)","unsupported-prop":"Unsupported prop(s)"};e.forEach(n=>{let o=[...Array.from(new Set(n.warnings?.map(i=>i.type)||[])).map(i=>t[i]).filter(Boolean),...n.error?[n.error]:[]];p.warn(`- ${n.componentName}: ${o.join(", ")}`)})}var Gn,rh=A(()=>{"use strict";V();fa();Et();ae();Wo();nh();Gn=class extends Error{constructor(t){super(t)}}});function hi(e){return async function(n){tn.default.removeListener("uncaughtException",hi),tn.default.removeListener("unhandledRejection",hi);let r=await Lo(e);if(!r)return;await new yl(r,n).prompt()}}function oh(e){tn.default.on("uncaughtException",hi(e)),tn.default.on("unhandledRejection",hi(e))}var tn,yl,ih=A(()=>{"use strict";tn=D(require("process"));V();$r();Bo();be();Et();yl=class{config;error;constructor(t,n){this.config=t,this.error=n}stripPII(t=""){return t.replace(/\/(.*)webflow-cli/gi,"/REDACTED_PII/webflow-cli/").replace(/\/(.*)node_modules/gi,"/REDACTED_PII/node_modules")}sendTelemetry(){let t=this.config,n=this.error;Y(`${t.host}/devlink/${t.siteId}/telemetry`,{headers:{Authorization:`Bearer ${t.authToken}`,"Content-Type":"application/json"},method:"post",body:JSON.stringify({cause:n.cause,message:n.message,name:n.name,stack:this.stripPII(n.stack),platform:tn.default.platform,node:tn.default.version})})}async storeChoice(t){try{return he({devlink:{allowTelemetry:t}})}catch{let r=await Rn();await cd({...r,allowTelemetry:t})}}async prompt(){let t=this.config;if(p.error(this.error),t.allowTelemetry===!0)p.info("Sending crash report telemetry..."),this.sendTelemetry();else if(t.allowTelemetry===!1){p.info("Skipping crash report telemetry...");return}else p.info("Telemetry is enabled. Crash reports help us improve Webflow CLI."),p.info("To opt out, run: webflow auth telemetry --disable"),await this.storeChoice(!0),p.info("Sending crash report telemetry..."),this.sendTelemetry()}}});var sh={};wc(sh,{syncComponents:()=>wl});async function wl(e,t){let n=Date.now(),{manifest:r}=H(),{accessToken:o,siteId:i}=await we(r,{site:t?.site,apiToken:t?.apiToken}),s={...o?{authToken:o}:{},...i?{siteId:i}:{},...e&&e.length>0?{components:jn(e),overwriteModule:!1}:{overwriteModule:!0}};oh(s);let a=await Lo(s);if(!a)return bl.default.exit();let l;try{l=Z.forDevlinkSync(a)}catch(u){p.debug(`Failed to initialize telemetry: ${u}`)}await l?.sendUsage("devlink_sync_start",{specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot});let c=p.spinner(`Exporting components into ${a.rootDir}`);try{await gl(a),c.succeed(`Successfully exported components into ${a.rootDir} folder`);let u=Date.now()-n;await l?.sendUsage("devlink_sync_success",{duration:u,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot})}catch(u){let d=u instanceof Error?u.message:String(u);c.fail(`Failed to export components: ${d}`);let f=Date.now()-n;throw await l?.sendError(u instanceof Error?u:new Error(String(u)),"devlink_sync_failure",{duration:f,specificComponents:e&&e.length>0,componentCount:e?.length||0,cssModules:a.cssModules,overwriteModule:a.overwriteModule,relativeHrefRoot:a.relativeHrefRoot,configOverrides:Object.keys(s),argv:bl.default.argv.slice(2)}),u}}var bl,Dl=A(()=>{"use strict";bl=D(require("process"));$r();rh();ih();qe();V();nt();be()});var sb=require("commander");V();var Pu=require("child_process"),Ru=require("fs"),Js=D(require("semver"));V();var Hs="@webflow/webflow-cli",Jt="@webflow/data-types",Fo="@webflow/react",bw=[Hs,Jt,Fo],Ht=class{getInstalledDependencies(){try{let t=(0,Pu.execSync)(`npm ls ${bw.join(" ")} --depth=0 --json --silent`,{encoding:"utf-8"}),n=JSON.parse(t);return n.dependencies?Object.entries(n.dependencies).reduce((r,[o,{version:i}])=>(r[o]=i,r),{}):{}}catch(t){return p.debug(`Failed to get installed dependencies: ${t}`),{}}}getRequiredDependencies(t){let n=JSON.parse((0,Ru.readFileSync)(require.resolve(`${t}/package.json`),"utf8"));return{...n.dependencies,...n.devDependencies}}checkCLIAndDataTypes(t){let n=t[Jt];if(!n)return;let o=this.getRequiredDependencies(Hs)[Jt];if(!Js.default.satisfies(n,o))throw new Error(`Version mismatch: ${Hs} requires ${Jt} v${o} but found v${n}`)}checkReactAndDataTypes(t){let n=t[Jt],r=t[Fo];if(!(!n||!r)&&!Js.default.eq(n,r))throw new Error(`Version mismatch: ${Fo} and ${Jt} must be on the same version. Found ${Fo}@${r} and ${Jt}@${n}`)}run(){let t=this.getInstalledDependencies();this.checkCLIAndDataTypes(t),this.checkReactAndDataTypes(t)}};var Lu=require("fs-extra");Je();var Mu=require("@dotenvx/dotenvx"),Zt=D(require("semver"));V();var Bu=require("child_process"),$u=require("util"),Dw=(0,$u.promisify)(Bu.exec);async function St(e,t){try{let{stdout:n,stderr:r}=await Dw(e,t);return{stdout:n.toString().trim(),stderr:r.toString().trim(),code:0}}catch(n){let r=n;return{stdout:r.stdout??"",stderr:r.stderr??String(r.message??""),code:r.code??1}}}_e();var Zs=D(ko());(0,Mu.config)({quiet:!0,ignore:["MISSING_ENV_FILE"]});var Nu={npm:{updateCommand:"npm install",update:async e=>await St(`npm install ${e}`),getOutdated:async e=>{let{stdout:t}=await St(`npm outdated --json ${e}`);return JSON.parse(t)},lockFile:"package-lock.json",globalFlag:"--global",supported:!0},pnpm:{updateCommand:"pnpm add",update:async e=>await St(`pnpm add ${e}`),getOutdated:async e=>{let{stdout:t}=await St(`pnpm outdated --json ${e}`);return JSON.parse(t)},lockFile:"pnpm-lock.yaml",globalFlag:"--global",supported:!0},yarn:{lockFile:"yarn.lock",globalFlag:"",updateCommand:"",getOutdated:async()=>({}),update:async()=>({stdout:"",stderr:"",code:0}),supported:!1}},vw=["@webflow/webflow-cli","@webflow/data-types","@webflow/react","@webflow/emotion-utils","@webflow/styled-components-utils"],Or=class{packageManager;constructor(){this.packageManager=this.getPackagerManagerInfo()}getPackagerManagerInfo(){for(let[,t]of Object.entries(Nu))if((0,Lu.existsSync)(t.lockFile))return t;return Nu.npm}async listOutdatedPackages(t="local",n=vw){let{getOutdated:r,globalFlag:o}=this.packageManager,i=await r(`${t==="global"?o:""} ${n?.join(" ")}`);return Object.fromEntries(Object.entries(i).map(([s,a])=>Array.isArray(a)?[s,{current:a[0].current,latest:a[0].latest,installationType:t}]:[s,{current:a.current,latest:a.latest,installationType:t}]))}async getOutdatedPackages(){let t=await this.listOutdatedPackages();if(t["@webflow/webflow-cli"])return t;let n=await this.listOutdatedPackages("global",["@webflow/webflow-cli"]);return{...t,...n}}async showUpdatePrompt(t){if(Object.keys(t).length>1){let r=await Eo({message:"New versions of the following @webflow packages are available. Would you like to update?",choices:Object.entries(t).map(([o,{current:i,latest:s}])=>({name:`${o} (${i} \u2192 ${s})`,value:o}))});return r??[]}else{let[[r,{current:o,latest:i}]]=Object.entries(t);return await Ge({message:`A new version of ${r} (${o} \u2192 ${i}) is available. Would you like to update?`,default:!1})?[r]:[]}}showUpdateSuggestions(t){let n=Object.keys(t).length>1,{updateCommand:r,globalFlag:o}=this.packageManager;if(n){console.log(`
66
66
  New versions of the following @webflow packages are available:`),Object.entries(t).forEach(([a,{current:l,latest:c}])=>{console.log(` ${a} (${l} \u2192 ${c})`)});let i=Object.entries(t).filter(([,{installationType:a}])=>a==="local").map(([a])=>`${a}@latest`),s=Object.entries(t).filter(([,{installationType:a}])=>a==="global").map(([a])=>`${a}@latest`);console.log(`
67
67
  To update, run:`),i.length>0&&console.log(` ${r} ${i.join(" ")}`),s.length>0&&console.log(` ${r} ${o} ${s.join(" ")}`)}else{let[[i,{current:s,latest:a,installationType:l}]]=Object.entries(t);console.log(`
68
68
  A new version of ${i} (${s} \u2192 ${a}) is available.`);let c=l==="global"?` ${o}`:"";console.log(`To update, run: ${r}${c} ${i}@latest`)}}shouldSkipUpdateChecks(){return!this.packageManager.supported||process.env.WEBFLOW_SKIP_UPDATE_CHECKS==="true"}getDistTag(){let t=Zt.prerelease(Zs.default.version);return t&&t.length>0&&typeof t[0]=="string"?t[0]:"latest"}async promptPrerelease(t){let n;try{n=p.spinner("Checking for updates (to disable, use --skip-update-check)");let{stdout:r,code:o}=await St(`npm view @webflow/webflow-cli@${t} version`);if(o!==0||!r.trim()){n.succeed("Up to date");return}let i=r.trim(),s=Zs.default.version;if(!Zt.valid(i)||!Zt.valid(s)){n.succeed("Up to date");return}if(!Zt.gt(i,s)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ue()){console.log(`
69
- A new version of @webflow/webflow-cli@${t} is available.`);let{code:d}=await St("npm ls @webflow/webflow-cli --json"),m=(d===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await St("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await Ge({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=p.spinner("Updating");let d=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${d} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),p.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=p.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ue()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=p.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:d}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${d} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),p.debug(String(r))}}};_e();Ws();Ms();Je();qe();nt();_e();be();V();ae();Se();var Xu=e=>{let t=e.command("auth").description("Authentication and configuration commands");t.command("login").description("Authenticate with Webflow and save credentials to .env file").option("-f, --force","Force reauthentication even if credentials exist").action(async n=>{if(ue()){p.info(`${X} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:r}=H();if(!n.force&&So()){let i=Rr(r);p.info(`${te} Webflow credentials already exist:`),i&&p.info(` Site ID: ${i}`),p.info(" API Token: [hidden]"),p.info(`
69
+ A new version of @webflow/webflow-cli@${t} is available.`);let{code:d}=await St("npm ls @webflow/webflow-cli --json"),m=(d===0?"local":"global")==="global"?" --global":"";console.log(`To update, run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`);return}let{code:l}=await St("npm ls @webflow/webflow-cli --json"),c=l===0?"local":"global";if(await Ge({message:`A new version of @webflow/webflow-cli@${t} is available. Would you like to update?`,default:!1})){n=p.spinner("Updating");let d=c==="global"?` ${this.packageManager.globalFlag}`:"";try{await this.packageManager.update(`${d} @webflow/webflow-cli@${t}`),n.succeed("Updated successfully")}catch{let m=c==="global"?` ${this.packageManager.globalFlag}`:"";n.fail(`Update failed. Manually run: ${this.packageManager.updateCommand}${m} @webflow/webflow-cli@${t}`)}}}catch(r){n?.fail("Failed to check for updates"),p.debug(String(r))}}async prompt(){if(this.shouldSkipUpdateChecks())return;let t=this.getDistTag();if(t!=="latest")return this.promptPrerelease(t);let n;try{n=p.spinner("Checking for updates (to disable, use --skip-update-check)");let r=await this.getOutdatedPackages();if(!(Object.keys(r).length>0)){n.succeed("All @webflow packages are up to date");return}if(n.succeed(),!process.stdin.isTTY||ue()){this.showUpdateSuggestions(r);return}let s=await this.showUpdatePrompt(r);if(s.length>0){n=p.spinner("Updating");let{local:a,global:l}=s.reduce((f,m)=>(f[r[m].installationType==="global"?"global":"local"].push(m),f),{local:[],global:[]}),{update:c,globalFlag:u,updateCommand:d}=this.packageManager;try{a.length>0&&await c(`${a.map(f=>`${f}@latest`).join(" ")}`),l.length>0&&await c(`${u} ${l.map(f=>`${f}@latest`).join(" ")}`),n.succeed("Updated successfully")}catch{n.fail(`Update failed. Manually run: ${d} ${s.map(m=>`${m}@latest`).join(" ")}`)}}}catch(r){n?.fail("Failed to check for updates"),p.debug(String(r))}}};_e();Us();Ms();Je();qe();nt();_e();be();V();ae();Se();var Qu=e=>{let t=e.command("auth").description("Authentication and configuration commands");t.command("login").description("Authenticate with Webflow and save credentials to .env file").option("-f, --force","Force reauthentication even if credentials exist").action(async n=>{if(ue()){p.info(`${X} No-input mode enabled. Aborting OAuth authentication`);return}let{manifest:r}=H();if(!n.force&&So()){let i=Rr(r);p.info(`${te} Webflow credentials already exist:`),i&&p.info(` Site ID: ${i}`),p.info(" API Token: [hidden]"),p.info(`
70
70
  Use --force flag to reauthenticate anyway`);return}try{await le({force:n.force}),p.info(`${te} Credentials saved to .env file`),p.info(`
71
- You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new b(o,{prefix:`${X} Authentication failed:`})}}),t.command("telemetry").description("Manage telemetry settings for all Webflow CLI commands").option("--enable","Enable telemetry for all commands").option("--disable","Disable telemetry for all commands").option("--status","Show current telemetry status").action(async n=>{let r=Ft.getInstance();if(n.status){let s=await r.getTelemetryStatus();p.info(Yu(s.enabled));return}if(n.enable){await r.setGlobalPreference(!0),p.info(na(!0));return}if(n.disable){await r.setGlobalPreference(!1),p.info(na(!1));return}let o=await r.getTelemetryStatus();if(p.info(Yu(o.enabled)),ue()){p.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await tt({message:"What would you like to do?",choices:[{name:"Enable telemetry for all commands",value:"enable"},{name:"Disable telemetry for all commands",value:"disable"},{name:"Cancel",value:"cancel"}]});if(i==="enable"||i==="disable"){let s=i==="enable";await r.setGlobalPreference(s),p.info(na(s))}})},na=e=>`${te} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,Yu=e=>`${Sn} Telemetry status: ${e?`enabled ${te}`:`disabled ${X}`}`;var wd=D(require("http")),Dd=D(require("node-fetch")),vd=D(require("serve-handler")),kd=require("fs"),xd=D(require("path")),Cd=require("commander");var ed=D(require("archiver")),oa=require("commander"),Io=require("fs");var Qu=require("cosmiconfig"),ra=require("commander"),Ao=async(e,t)=>{let n=await xw(t),r=n.config.apiVersion;return r&&typeof r!="string"&&ra.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:n.filepath,config:{publicDir:e,...n.config}}},xw=async e=>{let n=await(0,Qu.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return n||ra.program.error(`No ${e} file was found. Run this command within your extension folder.`),n};var td=D(require("mime-types")),Oo=D(require("path")),Cw=5*1024*1024,Fw=new Set(["application/javascript","application/json","application/xml","image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/vnd.microsoft.icon","image/x-icon","video/webm","font/ttf","font/otf","font/woff","font/woff2","text/plain","text/markdown","text/html","text/css"]),nd=async(e,t,n)=>{let{config:r,filepath:o}=await Ao(e,t),i=Oo.join(o,".."),s=!0,a=!1,l=u=>{let d=u.name,f=td.default.lookup(d);return d==="index.html"&&(a=!0),d&&d.endsWith(".DS_Store")||!f?!1:Fw.has(f)?u:(console.log(`Invalid file type: ${f} for file: ${d}`),s=!1,!1)},c=u=>{(0,Io.unlink)(n,d=>{d&&console.error(`Failed to delete file: ${d}`),oa.program.error(u)})};return console.log(`Packaging the contents of the ${r.publicDir} folder into ${n}...`),new Promise(u=>{let d=(0,ed.default)("zip",{zlib:{level:9}}),f=(0,Io.createWriteStream)(Oo.join(i,n));f.on("close",()=>{u(void 0)}),d.directory(Oo.join(i,r.publicDir),!1,l),d.file(o,{name:t}),d.pipe(f),d.finalize(),d.on("warning",m=>{console.log(m)}),d.on("error",m=>{oa.program.error(m.message)}),d.on("finish",()=>{if(!a){c("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){c("Bundling failed due to invalid file types");return}if(!d.pointer()||d.pointer()===0){c("Bundling failed with no output");return}if(d.pointer()>=Cw){c("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${d.pointer()} total bytes written`),console.log(`Done! ${n} is ready for you to upload to your Webflow app.`)})})};Bo();var Tt=D(require("fs")),je=D(require("path"));var Br="webflow.json",cd="index.html",ud="bundle.zip",la="public",ca="extension-scaffolds",$o="default",dd="./";var pd="package.json",fd="wf-placeholder-name",ua=e=>JSON.stringify(e,null,2),md=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
71
+ You can now use other Webflow CLI commands that require authentication`)}catch(o){throw new b(o,{prefix:`${X} Authentication failed:`})}}),t.command("telemetry").description("Manage telemetry settings for all Webflow CLI commands").option("--enable","Enable telemetry for all commands").option("--disable","Disable telemetry for all commands").option("--status","Show current telemetry status").action(async n=>{let r=Ft.getInstance();if(n.status){let s=await r.getTelemetryStatus();p.info(Xu(s.enabled));return}if(n.enable){await r.setGlobalPreference(!0),p.info(na(!0));return}if(n.disable){await r.setGlobalPreference(!1),p.info(na(!1));return}let o=await r.getTelemetryStatus();if(p.info(Xu(o.enabled)),ue()){p.info("\u{1F4A1} When --no-input mode is enabled please provide --enable or --disable option");return}let i=await tt({message:"What would you like to do?",choices:[{name:"Enable telemetry for all commands",value:"enable"},{name:"Disable telemetry for all commands",value:"disable"},{name:"Cancel",value:"cancel"}]});if(i==="enable"||i==="disable"){let s=i==="enable";await r.setGlobalPreference(s),p.info(na(s))}})},na=e=>`${te} Telemetry ${e?"enabled":"disabled"} for all Webflow CLI commands`,Xu=e=>`${Sn} Telemetry status: ${e?`enabled ${te}`:`disabled ${X}`}`;var Dd=D(require("http")),vd=D(require("node-fetch")),kd=D(require("serve-handler")),xd=require("fs"),Cd=D(require("path")),Fd=require("commander");var td=D(require("archiver")),oa=require("commander"),Io=require("fs");var ed=require("cosmiconfig"),ra=require("commander"),Ao=async(e,t)=>{let n=await Fw(t),r=n.config.apiVersion;return r&&typeof r!="string"&&ra.program.error('Error: The apiVersion field in webflow.json must be a string (i.e. "apiVersion": "2").'),{filepath:n.filepath,config:{publicDir:e,...n.config}}},Fw=async e=>{let n=await(0,ed.cosmiconfig)("webflow",{searchPlaces:[e]}).search();return n||ra.program.error(`No ${e} file was found. Run this command within your extension folder.`),n};var nd=D(require("mime-types")),Oo=D(require("path")),Ew=5*1024*1024,_w=new Set(["application/javascript","application/json","application/xml","image/png","image/jpeg","image/gif","image/svg+xml","image/webp","image/vnd.microsoft.icon","image/x-icon","video/webm","font/ttf","font/otf","font/woff","font/woff2","text/plain","text/markdown","text/html","text/css"]),rd=async(e,t,n)=>{let{config:r,filepath:o}=await Ao(e,t),i=Oo.join(o,".."),s=!0,a=!1,l=u=>{let d=u.name,f=nd.default.lookup(d);return d==="index.html"&&(a=!0),d&&d.endsWith(".DS_Store")||!f?!1:_w.has(f)?u:(console.log(`Invalid file type: ${f} for file: ${d}`),s=!1,!1)},c=u=>{(0,Io.unlink)(n,d=>{d&&console.error(`Failed to delete file: ${d}`),oa.program.error(u)})};return console.log(`Packaging the contents of the ${r.publicDir} folder into ${n}...`),new Promise(u=>{let d=(0,td.default)("zip",{zlib:{level:9}}),f=(0,Io.createWriteStream)(Oo.join(i,n));f.on("close",()=>{u(void 0)}),d.directory(Oo.join(i,r.publicDir),!1,l),d.file(o,{name:t}),d.pipe(f),d.finalize(),d.on("warning",m=>{console.log(m)}),d.on("error",m=>{oa.program.error(m.message)}),d.on("finish",()=>{if(!a){c("Could not find index.html in your `publicDir`, all Designer Extension code needs to be inside of `publicDir`");return}if(!s){c("Bundling failed due to invalid file types");return}if(!d.pointer()||d.pointer()===0){c("Bundling failed with no output");return}if(d.pointer()>=Ew){c("Bundling failed due to the bundle exceeding 5MB");return}console.log(`${d.pointer()} total bytes written`),console.log(`Done! ${n} is ready for you to upload to your Webflow app.`)})})};Bo();var Tt=D(require("fs")),je=D(require("path"));var Br="webflow.json",ud="index.html",dd="bundle.zip",la="public",ca="extension-scaffolds",$o="default",pd="./";var fd="package.json",md="wf-placeholder-name",ua=e=>JSON.stringify(e,null,2),hd=e=>{let t="\u2500".repeat(e.length+2);return"\u256D"+t+`\u256E
72
72
  \u2502 `+e+` \u2502
73
- \u2570`+t+"\u256F"};var hd=async(e,t=dd,n=$o,r)=>{let o=r[n];try{for(let i of o){let s=je.join(t,i),a=Iw(s,n,e);if(i.includes(pd)||i.includes(Br))await Ow(i,a,e);else{let l=await Tt.promises.readFile(i);await bd(a,l)}}}catch(i){console.error("Error writing file, ",i)}},gd=async()=>{let e={},t=je.resolve(__dirname),n=je.join(t,ca),r=await Tt.promises.readdir(n);for(let o of r){let i=je.join(n,o),s=await yd(i);e[o]=s}return e},yd=async e=>{let t=[];try{let n=await Tt.promises.readdir(e);for(let r of n){let o=je.join(e,r);if((await Tt.promises.stat(o)).isDirectory()){let s=await yd(o);t.push(...s)}else t.push(o)}}catch(n){console.error(`Error reading ${je}, `,n)}return t},bd=async(e,t)=>{try{await Tt.promises.mkdir(je.dirname(e),{recursive:!0}),await Tt.promises.writeFile(e,t)}catch(n){console.error("Error writing file ",n)}},Ow=async(e,t,n)=>Tt.promises.readFile(e,"utf8").then(async r=>{let o=r.replace(fd,n);await bd(t,o)}),Iw=(e,t,n)=>{let r=je.join(ca,t),o=e.indexOf(r);if(o!==-1){let i=e.substring(o+r.length+1);return je.join(n,i)}return""};var No=async()=>await gd(),Fd=async()=>{let e=await No(),t=Object.keys(e).join(", ");console.log(`Your available templates are: ${t}`),console.log('\u{1F4A1} Syntax: "webflow extension init projectName templateName"'),console.log('\u{1F31F} Example: "webflow extension init my-first-extension react"')},Ed=async(e,t=$o)=>{let n=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let r=await No();await hd(e,n,t,r),console.log(`Done! Check out ${n}/README.md for steps on how to develop your extension.`)},_d=()=>nd(la,Br,ud),Sd=async e=>{let{config:t,filepath:n}=await Ao(la,Br),r=xd.join(n,"..",t.publicDir,cd),i=(await Rn([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(m=>t.featureFlags?.[m]===!0?`ff_on=${m}`:`ff_off=${m}`).join("&"),l=a?`&${a}`:"",u=await(await(0,Dd.default)(`https://${i}/${s}?name=${t.name}${l}`)).text(),d=new wd.Server((m,g)=>{if(m.url==="/"){kd.promises.readFile(r,{encoding:"utf-8"}).catch(v=>{Cd.program.error(v.message)}).then(v=>{let F=u.replace("{{ui}}",v);return g.writeHead(200,{"Content-Length":Buffer.byteLength(F),"Content-Type":"text/html"}),g.end(F)});return}if(m.url==="/__webflow")return g.writeHead(200,{"Content-Length":Buffer.byteLength(ua(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),g.end(ua(t));(0,vd.default)(m,g,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),f=Pw(e);d.listen(f),console.log(md(`Serving your extension at http://localhost:${f}`)+`
74
- `)},Pw=e=>{if(e){let t=parseInt(e,10);return isNaN(t)?(console.log("Invalid port number provided. Using the default port "+1337),1337):t}return 1337};Je();ae();var Td=e=>{let t=e.command("extension").description("CLI for developing Designer Extensions.");t.command("list").description("Get list of project templates that can be used for `init`").action(Fd),t.command("init").description("Bootstrap a Designer Extension.").argument("[projectName]","What is your Designer Extension's name?").argument("[scaffoldName]","Which project template do you want to use?").action(async(n,r)=>{let o=await No(),i=Object.keys(o),s=await Re({message:"What would you like to name your Designer Extension?",default:n,validate:l=>l.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new b("When --no-input mode is enabled please provide the [projectName] argument.");let a=await tt({message:"Which project template would you like to use?",choices:i.map(l=>({name:l,value:l})),default:r||"default"});await Ed(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(_d),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(Sd)};Dl();var $1=require("crypto");Je();_e();V();Se();Is();vo();var sh=require("path"),ah=require("fs-extra");function gi(e,t){try{let n=lh(),r=ch(Object.values(e)),o=t?.force;return r&&n&&!o}catch{return!1}}var lh=()=>{try{return(0,ah.existsSync)((0,sh.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},ch=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"));var j1=D(require("node-fetch")),B1=require("timers/promises");V();$r();pe();ae();$r();Je();Uo();V();qe();nt();be();Uo();V();ae();fa();Se();var Nt=require("commander");var Pi=require("path"),er=require("@webflow/data-types");pe();var yi=require("fs"),vl=D(require("md5"));function kl(e,t){try{let n=(0,yi.statSync)(e),r=(0,yi.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,vl.default)(r),size:n.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function Zr(e,t,n){try{let r=new Blob([e]).size,o=Buffer.from(e,"utf-8");return{value:o,meta:{title:t.replace(/^.*[\\\/]/,""),fileHash:(0,vl.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var uh=D(require("node-fetch")),dh=D(require("form-data"));async function Kr(e,t){let n={...t.fields,file:e.value},r=new dh.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,uh.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});N1(o)}function N1(e){switch(e.status){case 200:case 201:return;case 403:throw new Error("Unauthorized. Please check your AWS access key");default:throw new Error(`Something went wrong when uploading the file: ${e.statusText}`)}}V();be();qe();pe();Et();function L1({apiToken:e=process.env.WEBFLOW_API_TOKEN??process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN,siteId:t=process.env.WEBFLOW_SITE_ID,libraryTarget:n=process.env.WEBFLOW_LIBRARY_TARGET}){if(!e)throw new Error("No API token provided");if(n==="site"){if(!t)throw new Error("No site provided");return{baseUrl:`${U}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${U}/v2/workspaces`,authToken:e}}function M1(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function z1(e){if(e.ok)return;if(e.status===401||e.status===403)throw new Error("Your API token is invalid or not authorized to perform this action. Remove the token from .env and run the command again to generate a new token.");if(e.status===404)throw new Error("Code components are rolling out in phases. Check back soon for access.");let t=await e.json();throw new Error(t.message||e.statusText)}async function jt({endpoint:e,method:t="GET",body:n,options:r}){let{baseUrl:o,authToken:i}=L1(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await Y(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:M1(n)});return await z1(a),a.json()}async function xl({options:e}){return(await jt({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function Cl({name:e,description:t,slug:n,options:r}){return(await jt({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:n},options:r})).payload}async function Fl({resourceId:e,files:t,options:n}){return(await jt({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function El({resourceId:e,codeModule:t,components:n,options:r}){return(await jt({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:n},options:r})).payload}var ng=require("path"),rg=D(require("webpack-merge")),nn=require("@webflow/data-types");pe();V();var mh=require("memfs/lib/volume"),Yr=require("@webflow/data-types");var st="./tmp_entry",ph="components";function U1(e){let t=W1(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function fh(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
73
+ \u2570`+t+"\u256F"};var gd=async(e,t=pd,n=$o,r)=>{let o=r[n];try{for(let i of o){let s=je.join(t,i),a=Rw(s,n,e);if(i.includes(fd)||i.includes(Br))await Pw(i,a,e);else{let l=await Tt.promises.readFile(i);await wd(a,l)}}}catch(i){console.error("Error writing file, ",i)}},yd=async()=>{let e={},t=je.resolve(__dirname),n=je.join(t,ca),r=await Tt.promises.readdir(n);for(let o of r){let i=je.join(n,o),s=await bd(i);e[o]=s}return e},bd=async e=>{let t=[];try{let n=await Tt.promises.readdir(e);for(let r of n){let o=je.join(e,r);if((await Tt.promises.stat(o)).isDirectory()){let s=await bd(o);t.push(...s)}else t.push(o)}}catch(n){console.error(`Error reading ${je}, `,n)}return t},wd=async(e,t)=>{try{await Tt.promises.mkdir(je.dirname(e),{recursive:!0}),await Tt.promises.writeFile(e,t)}catch(n){console.error("Error writing file ",n)}},Pw=async(e,t,n)=>Tt.promises.readFile(e,"utf8").then(async r=>{let o=r.replace(md,n);await wd(t,o)}),Rw=(e,t,n)=>{let r=je.join(ca,t),o=e.indexOf(r);if(o!==-1){let i=e.substring(o+r.length+1);return je.join(n,i)}return""};var No=async()=>await yd(),Ed=async()=>{let e=await No(),t=Object.keys(e).join(", ");console.log(`Your available templates are: ${t}`),console.log('\u{1F4A1} Syntax: "webflow extension init projectName templateName"'),console.log('\u{1F31F} Example: "webflow extension init my-first-extension react"')},_d=async(e,t=$o)=>{let n=`./${e}`;console.log(`Scaffolding your new extension named: ${e}...`);let r=await No();await gd(e,n,t,r),console.log(`Done! Check out ${n}/README.md for steps on how to develop your extension.`)},Sd=()=>rd(la,Br,dd),Td=async e=>{let{config:t,filepath:n}=await Ao(la,Br),r=Cd.join(n,"..",t.publicDir,ud),i=(await Rn([],!0)).extensionTemplateDomain||"webflow-ext.com",s=t.apiVersion==="2"?"template/v2":"template",a=Object.keys(t.featureFlags||{}).map(m=>t.featureFlags?.[m]===!0?`ff_on=${m}`:`ff_off=${m}`).join("&"),l=a?`&${a}`:"",u=await(await(0,vd.default)(`https://${i}/${s}?name=${t.name}${l}`)).text(),d=new Dd.Server((m,g)=>{if(m.url==="/"){xd.promises.readFile(r,{encoding:"utf-8"}).catch(v=>{Fd.program.error(v.message)}).then(v=>{let F=u.replace("{{ui}}",v);return g.writeHead(200,{"Content-Length":Buffer.byteLength(F),"Content-Type":"text/html"}),g.end(F)});return}if(m.url==="/__webflow")return g.writeHead(200,{"Content-Length":Buffer.byteLength(ua(t)),"Content-Type":"application/json","Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*"}),g.end(ua(t));(0,kd.default)(m,g,{public:t.publicDir,cleanUrls:!1,directoryListing:!1})}),f=jw(e);d.listen(f),console.log(hd(`Serving your extension at http://localhost:${f}`)+`
74
+ `)},jw=e=>{if(e){let t=parseInt(e,10);return isNaN(t)?(console.log("Invalid port number provided. Using the default port "+1337),1337):t}return 1337};Je();ae();var Ad=e=>{let t=e.command("extension").description("CLI for developing Designer Extensions.");t.command("list").description("Get list of project templates that can be used for `init`").action(Ed),t.command("init").description("Bootstrap a Designer Extension.").argument("[projectName]","What is your Designer Extension's name?").argument("[scaffoldName]","Which project template do you want to use?").action(async(n,r)=>{let o=await No(),i=Object.keys(o),s=await Re({message:"What would you like to name your Designer Extension?",default:n,validate:l=>l.trim()===""?"The Designer Extension name cannot be empty.":!0});if(s===null)throw new b("When --no-input mode is enabled please provide the [projectName] argument.");let a=await tt({message:"Which project template would you like to use?",choices:i.map(l=>({name:l,value:l})),default:r||"default"});await _d(s,a)}),t.command("bundle").description("Prepare package that can be uploaded to Webflow.").action(Sd),t.command("serve").description("Serve your extension locally.").argument("[port]","The port to serve your extension on").action(Td)};Dl();var L1=require("crypto");Je();_e();V();Se();Is();vo();var ah=require("path"),lh=require("fs-extra");function gi(e,t){try{let n=ch(),r=uh(Object.values(e)),o=t?.force;return r&&n&&!o}catch{return!1}}var ch=()=>{try{return(0,lh.existsSync)((0,ah.join)(process.cwd(),"tsconfig.json"))}catch{return!1}},uh=e=>e.some(t=>t.endsWith(".ts")||t.endsWith(".tsx"));var $1=D(require("node-fetch")),N1=require("timers/promises");V();$r();pe();ae();$r();Je();Wo();V();qe();nt();be();Wo();V();ae();fa();Se();var Nt=require("commander");var Pi=require("path"),er=require("@webflow/data-types");pe();var yi=require("fs"),vl=D(require("md5"));function kl(e,t){try{let n=(0,yi.statSync)(e),r=(0,yi.readFileSync)(e);return{value:r,meta:{title:e.replace(/^.*[\\\/]/,""),fileHash:(0,vl.default)(r),size:n.size,...t||{}}}}catch{throw new Error(`File '${e}' not found`)}}function Zr(e,t,n){try{let r=new Blob([e]).size,o=Buffer.from(e,"utf-8");return{value:o,meta:{title:t.replace(/^.*[\\\/]/,""),fileHash:(0,vl.default)(o),size:r,...n}}}catch{throw new Error(`Error parsing '${t}' inline file`)}}var dh=D(require("node-fetch")),ph=D(require("form-data"));async function Kr(e,t){let n={...t.fields,file:e.value},r=new ph.default;Object.entries(n).forEach(([i,s])=>{r.append(i,s)});let o=await(0,dh.default)("https://"+t.fields.bucket+".s3.amazonaws.com",{method:"POST",body:r});M1(o)}function M1(e){switch(e.status){case 200:case 201:return;case 403:throw new Error("Unauthorized. Please check your AWS access key");default:throw new Error(`Something went wrong when uploading the file: ${e.statusText}`)}}V();be();qe();pe();Et();function z1({apiToken:e=process.env.WEBFLOW_API_TOKEN??process.env.WEBFLOW_WORKSPACE_API_TOKEN??process.env.WEBFLOW_SITE_API_TOKEN,siteId:t=process.env.WEBFLOW_SITE_ID,libraryTarget:n=process.env.WEBFLOW_LIBRARY_TARGET}){if(!e)throw new Error("No API token provided");if(n==="site"){if(!t)throw new Error("No site provided");return{baseUrl:`${W}/v2/sites/${t}`,authToken:e}}return{baseUrl:`${W}/v2/workspaces`,authToken:e}}function W1(e){if(e)return JSON.stringify(Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)))}async function U1(e){if(e.ok)return;if(e.status===401||e.status===403)throw new Error("Your API token is invalid or not authorized to perform this action. Remove the token from .env and run the command again to generate a new token.");if(e.status===404)throw new Error("Code components are rolling out in phases. Check back soon for access.");let t=await e.json();throw new Error(t.message||e.statusText)}async function jt({endpoint:e,method:t="GET",body:n,options:r}){let{baseUrl:o,authToken:i}=z1(r),s=`${o.replace(/\/+$/,"")}/${e.replace(/^\/+/,"")}`,a=await Y(s,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:W1(n)});return await U1(a),a.json()}async function xl({options:e}){return(await jt({endpoint:"/code_libraries",options:e})).payload.workspaces[0]}async function Cl({name:e,description:t,slug:n,options:r}){return(await jt({method:"POST",endpoint:"/code_library/init",body:{name:e,description:t,slug:n},options:r})).payload}async function Fl({resourceId:e,files:t,options:n}){return(await jt({method:"POST",endpoint:`/code_library/${e}/files`,body:{files:t},options:n})).payload}async function El({resourceId:e,codeModule:t,components:n,options:r}){return(await jt({method:"POST",endpoint:`/code_library/${e}/share`,body:{codeModule:t,components:n},options:r})).payload}var rg=require("path"),og=D(require("webpack-merge")),nn=require("@webflow/data-types");pe();V();var hh=require("memfs/lib/volume"),Yr=require("@webflow/data-types");var st="./tmp_entry",fh="components";function V1(e){let t=q1(e);return/^[a-zA-Z]/.test(t.charAt(0))?t:"_"+t}function mh(e,t){let n=e.map(({name:l,path:c,isDefaultExport:u})=>u?`import ${l} from "${c}";`:`import { ${l} } from "${c}";`).join(`
75
75
  `),r=e.filter(l=>l.type==="internal").map(({name:l,exportKey:c})=>`${c}: ${l}`).join(", "),o=e.filter(l=>l.type==="component").map(({name:l,exportKey:c})=>`"${c}": ${l}`).join(", "),i=`env: "${t}"`,s=r,a=o?`components: { ${o} }`:void 0;return`${n}
76
76
 
77
- export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function hh(e,t,n){let r={},o=`${st}/Client.js`,i=`${st}/Server.js`;r[o]=fh([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],Yr.Environment.Client);let s={},a=c=>{let u=U1(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=fh([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([c])=>n[c]?.ssr??!0).map(([c,u])=>{let d=a(c),f=u.startsWith(st)?u.replace(`${st}/`,"./"):u;return{name:d,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],Yr.Environment.Server);let l={[Yr.Environment.Client]:o,[Yr.Environment.Server]:i};return{entryPointsVolume:mh.Volume.fromJSON(r),paths:l}}var W1=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,n)=>n.toUpperCase()).replace(/\s+/g,"");var og=require("memfs/lib/volume");var Dh=D(require("archiver")),Jn=require("path");pe();var Xr=require("@webflow/data-types");pe();V();var Bt=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var gh=2;function yh(e){let t={type:Xr.ModuleLoader.FEDERATION,version:gh,entry:Ls,renderer:_r,components:e};return{title:Er,content:JSON.stringify(t)}}function bh(e){let t={type:Xr.ModuleLoader.SSR,version:gh,entry:On,components:e};return{title:Er,content:JSON.stringify(t)}}function wh(e){let t=`/${Xr.Environment.Client}/${Ls}`;try{if(e.existsSync(t)){let n=e.readFileSync(t,"utf8"),r=JSON.parse(n.toString()),o="publicPath"in r.metaData?r.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return r.exposes.reduce((i,s)=>{let a=s.name;return a===_r||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${Bt(o)}${l}`)})),i},{})}}catch(n){p.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var bi=require("@webflow/data-types"),V1=/\.css$/i;async function vh(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${bi.Environment.Server}/${Sr}`,a=(0,Dh.default)("tar",{gzip:!1}),l=t.createWriteStream(s);a.on("error",d=>(r=!0,i(d))),l.on("close",()=>{if(!r)try{let d={type:"asset",name:Sr,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,Jn.resolve)((0,Jn.join)(`/${bi.Environment.Server}`,f.name));t.existsSync(m)&&t.rmSync(m)}),o([d])}catch(d){return i(d)}finally{r=!0}}),a.pipe(l);let{title:c,content:u}=bh(n);a.append(u,{name:c}),e.forEach(d=>{if(!V1.test(d.name))try{let f=(0,Jn.resolve)((0,Jn.join)(`/${bi.Environment.Server}`,d.name)),m=t.readFileSync(f,"utf8");a.append(m,{name:d.name})}catch(f){return r=!0,i(f)}}),await a.finalize()})}var kh=require("@webflow/data-types");async function xh(e,t,n){let{title:r,content:o}=yh(n);await t.promises.writeFile(`/${kh.Environment.Client}/${r}`,o);let i={type:"asset",name:r,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var Zh=require("@rspack/core"),Kh=D(require("fork-ts-checker-webpack-plugin")),Yh=require("ts-checker-rspack-plugin"),Xh=D(require("mini-css-extract-plugin")),Qh=require("@webflow/data-types");var Fh=require("webpack"),Sl=D(require("mini-css-extract-plugin")),Eh=D(require("tsconfig-paths-webpack-plugin")),_h=require("tsconfig-paths"),Tl=require("@webflow/data-types"),Sh=require("path");pe();var Ch=D(require("postcss-selector-parser")),_l=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,Ch.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});_l.postcss=!0;_l.postcssPlugin="CSSinShadowDOM";var wi=_l;function q1(){return(0,_h.loadConfig)(process.cwd()).resultType==="success"}function Th({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Sl.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[wi]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Sl.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[q1()?new Eh.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Tl.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Sh.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Tl.Environment.Server)return{...s,plugins:[...s.plugins||[],new Fh.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:On,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Ah=require("@module-federation/enhanced"),Al=require("@webflow/data-types");function Oh({libraryName:e,env:t,exposes:n}){if(t===Al.Environment.Client)return{plugins:[new Ah.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Al.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function Ih(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function Di(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var vi=require("@rspack/core"),Ph=require("tsconfig-paths"),Ol=require("@webflow/data-types"),Rh=require("path");pe();function G1(){let e=(0,Ph.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function jh({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:vi.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[wi]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new vi.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=G1();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===Ol.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Rh.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Ol.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new vi.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:On,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Bh=require("@module-federation/enhanced/rspack"),Il=require("@webflow/data-types");function $h({libraryName:e,env:t,exposes:n}){if(t===Il.Environment.Client)return{plugins:[new Bh.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Il.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var H1=D(require("fs")),Nh=require("unionfs"),Lh=require("webpack");function J1(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function ki(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(J1)})}}async function Mh({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new Nh.Union().use(H1));return new Promise((s,a)=>{let l=(0,Lh.webpack)(e);l.inputFileSystem=i,n&&(l.outputFileSystem=n),r&&(l.outputPath=r),l.run((c,u)=>{l.close(d=>{c||d?a(c||d):u?u.hasErrors()||o&&u.hasWarnings()?a(new Error(u.toString("errors-warnings"))):s(ki(u)):a(new Error("Webpack stats are undefined"))})})})}var Z1=D(require("fs")),Pl=D(require("webpack-merge")),zh=require("memfs"),Uh=require("unionfs"),Wh=require("@rspack/core");async function xi({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new Uh.Union().use(Z1)),s=e;return t.length>0&&(s=(0,Pl.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,Pl.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Wh.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,zh.createFsFromVolume)(n)),r&&(c.outputPath=r),c.run((u,d)=>{c.close(f=>{u||f?l(u||f):d?d.hasErrors()||o&&d.hasWarnings()?l(new Error(d.toString("errors-warnings"))):a(ki(d)):l(new Error("Rspack stats are undefined"))})})})}var qh=require("@module-federation/enhanced");var Hn=D(require("webpack-merge"));V();function $t(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function Vh(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Fi(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=K1(s),d=Array.isArray(l)?Ci(...l.map(u)):Ci(u(l));Object.keys(d).some($=>c.includes($))&&p.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...Vh(d,[...c,"ModuleFederationPlugin","module","plugins"]),module:Vh(d.module??{},["rules"])},g=(0,Hn.default)(a,m),v=d.plugins??[];o&&(v=v.filter(o));let F=a.plugins??[],L=(0,Hn.mergeWithCustomize)({customizeArray:(0,Hn.unique)("plugins",t,$=>$t($))})({plugins:v},{plugins:F}).plugins,x=d?.ModuleFederationPlugin?.shared,O=L?.map($=>{if($t($)==="ModuleFederationPlugin"){let T=r($);return new n({...T,...x?{shared:x}:{}})}return $});g.plugins=O;let J=d.module?.rules;if(J&&typeof J=="function"){let $=a.module?.rules??[];g.module={...g.module??{},rules:J($)}}return g}}function Ci(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let n of e){let{module:r,ModuleFederationPlugin:o,plugins:i,...s}=n;if(t={...t,...s},r){let{rules:a,...l}=r;if(t.module={...t.module,...l},a){let c=t.module?.rules;c?t.module.rules=u=>{let d=c(u);return a(d)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function K1(e){return t=>typeof t=="function"?t(e):t}var Y1=Fi({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:qh.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Gh(e,t,n){return Y1(e,t,n)}var Jh=require("@module-federation/enhanced/rspack");var X1=Fi({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:Jh.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>$t(e)!=="MiniCssExtractPlugin"});function Hh(e,t,n){return X1(e,t,n)}var Rl={[Qh.Framework.React]:{generateWebpackBundlerConfig:Ih,generateRspackBundlerConfig:Di}},Q1={webpack:{generateBaseConfig:Th,getFrameworkConfig:(e,t)=>Rl[e].generateWebpackBundlerConfig(t),generateFederationConfig:Oh,mergeConfigs:(e,t,n)=>Gh(e,t,n),bundle:e=>Mh({...e,config:e.config}),typeCheckerPlugin:Kh.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>$t(t)==="MiniCssExtractPlugin"?new Xh.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:jh,getFrameworkConfig:(e,t)=>Rl[e].generateRspackBundlerConfig(t),generateFederationConfig:$h,mergeConfigs:(e,t,n)=>Hh(e,t,n),bundle:e=>xi({...e,config:e.config}),typeCheckerPlugin:Yh.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>$t(t)==="CssExtractRspackPlugin"?new Zh.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Zn=e=>Q1[e],eg=e=>!!Rl[e];var tg={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function Ei(e){let t=e.bundler??"webpack";p.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=hh(e.renderer,e.componentsFiles,e.componentsOptions),o=og.Volume.fromJSON({"/Server":null,"/Client":null});p.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&p.debug("Found bundle config overrides. Merging...");let s=Zn(t),a=F=>{let S=eF({env:F,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),L=s.mergeConfigs(F,S,i);return e?.debugBundler&&(p.info(`${t} config for env ${F}:`),p.dir(L)),L},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(nn.Environment.Server),outputPath:`/${nn.Environment.Server}`}),s.bundle({...l,config:a(nn.Environment.Client),outputPath:`/${nn.Environment.Client}`})]);e?.debugBundler&&(p.debug(o.toTree()),p.debug(`Server Bundler Stats: ${c.toString(tg)}`),p.debug(`Client Bundler Stats: ${u.toString(tg)}`));let d=wh(o);p.debug("Packaging server bundle...");let f=await vh(c.toJson().assets||[],o,d);p.debug("Packaging client bundle...");let m=await xh(u.toJson().assets||[],o,d),g=F=>S=>[S,F];return{outputFiles:[...f.map(g(nn.Environment.Server)),...m.map(g(nn.Environment.Client))],outputVolume:o}}function eF({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!eg(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[_r]:i[e],...o}).reduce((g,[v,F])=>({...g,[`./${v}`]:`./${(0,ng.relative)(process.cwd(),F)}`}),{}),u=Zn(l),d=u.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:r,outputPath:a}),f=u.getFrameworkConfig(n,e),m=u.generateFederationConfig({exposes:c,env:e,libraryName:s});return(0,rg.default)(d,f,m)}var sg=D(require("path")),jl=require("memfs/lib/volume"),Bl=D(require("webpack-merge")),ag=D(require("webpack-node-externals")),Ne=require("@webflow/data-types");var tF=D(require("fs")),Kn=require("path"),Yn=require("webpack");function nF(e,t=tF){let n=(0,Kn.join)(process.cwd(),"node_modules",e);for(;n!==(0,Kn.dirname)(n)&&n!=="node_modules";){let r=(0,Kn.join)(n,"package.json");if(t.existsSync(r))try{let{name:o,version:i}=JSON.parse(t.readFileSync(r,"utf8"));return`${o}@${i}`}catch{return null}n=(0,Kn.dirname)(n)}return null}var _i=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:Yn.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let r=n.getAssets(),o={};Object.values(r).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,l,c]=i.split("."),u=o[a]?.sources??{},d=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(m=>{if(m.startsWith("external")){let g=m.match(/^external \S+ "(.+)"$/)?.[1];if(!g)throw new Error(`Could not extract package name from ${m}`);let v=nF(g,n.inputFileSystem);if(!v)throw new Error(`Could not find package information for ${g}`);v&&d.add(v)}}),o[a]={sources:{...u,[`./${a}.${c}`]:l},dependencies:d},n.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{n.emitAsset(`${i}.js.map`,new Yn.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new Yn.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var ig=D(require("module"));function Qr(e,t){let n=e.readFileSync(t,"utf-8"),r=new ig.default(t,module);return r._compile(n,t),r}function rF(e,t){let n=`/${t}.js`,r=Qr(e,n),o=r.exports.default||r.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:l,options:c}=(0,Ne.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(l||{}).map(([u,d])=>({...d,name:u,defaultValue:typeof d.defaultValue!="string"?JSON.stringify(d.defaultValue):d.defaultValue,settings:d.settings!==void 0?JSON.stringify(d.settings):d.settings})),options:c}}catch(i){let s=i instanceof Error?i.stack:String(i);throw new Error(`Error parsing component data for '${t}': ${s}`)}throw new Error(`Could not get declaration for '${t}'`)}async function oF({declarations:e,sources:t,overrideConfig:n={},performTypeCheck:r,bundler:o="webpack"}){let i=new jl.Volume,s=Zn(o),a=(0,Bl.default)(s.generateBaseConfig({entry:e,env:Ne.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Ne.Framework.React,Ne.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:r?[new s.typeCheckerPlugin]:[]}),l=s.mergeConfigs(Ne.Environment.Client,a,n);return await s.bundle({outputPath:"/",config:l,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function iF({declarations:e,sources:t,overrideConfig:n={},bundler:r}){let o=new jl.Volume,i=Zn(r),s=(0,Bl.default)(i.generateBaseConfig({entry:e,env:Ne.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Ne.Framework.React,Ne.Environment.Client),{entry:e,mode:"production",optimization:{mangleExports:"deterministic",moduleIds:"deterministic",chunkIds:"deterministic"},output:{filename:"[name].[contenthash].js",path:"/",library:{type:"commonjs2"},devtoolModuleFilenameTemplate:"[resource-path]",hashFunction:i.hashFunction},externalsPresets:{node:!0},devtool:"source-map",plugins:[new _i],externals:[(0,ag.default)()]}),a=i.mergeConfigs(Ne.Environment.Client,s,n);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function sF(e){return Object.entries(e.toJSON()).reduce((t,[n,r])=>{if(n.endsWith(".map")&&r?.length){let o=sg.default.basename(n).split(".")[0];t[o]=r}return t},{})}async function Si({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([oF({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r,bundler:i}),o||i==="rspack"?Promise.resolve(null):iF({declarations:e,sources:t,overrideConfig:n,bundler:i})]),{metadata:l,options:c}=Object.keys(e).reduce((d,f)=>{let m=rF(s,f);return d.metadata[f]=m,d.options[f]=m.options||{},d},{metadata:{},options:{}});return{sourceMaps:a?sF(a):{},metadata:l,options:c}}function lg(e,{framework:t,sourceMaps:n}){return Object.fromEntries(Object.keys(e).map(r=>[r,{...e[r],id:r,framework:t,exportPath:"default",hash:n[r]}]))}Je();var ug=D(require("md5"));Ee();_e();var dg=" - ";function aF(e){return e==="added"?` ${E.green("(Added)")}`:e==="removed"?` ${E.yellow("(Removed)")}`:e==="changed"?` ${E.blue("(Changed)")}`:""}function cg(e){if(!e)return"";let t=JSON.parse(e);return(0,ug.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(n=>!n.includes("@webflow/data-types")&&!n.includes("@webflow/react"))].sort()))}function lF({componentsMetadata:e,latestVersion:t,sourceMaps:n}){let r=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(r).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let l=e[s],c=cg(n[s]),u=a.displayName&&l.displayName!==a.displayName,d=c&&a.hash&&c!==cg(a.hash),f=u||d;o[s]={component:l,status:f?"changed":"unchanged",previousName:u?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{r[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:l})=>{let c=s.displayName,u=l?`${l} \u2192 ${c}`:c;return`${dg}${u}${aF(a)}`}).sort().join(`
78
- `)}function cF({componentsMetadata:e}){return Object.values(e).map(n=>`${dg}${n.displayName}`).sort().join(`
79
- `)}async function pg({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:n,sourceMaps:r,workspaceInfo:o}){if(ue())return Promise.resolve(!0);let i=e.id?n.find(({profile:d})=>d.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",l=s?lF({componentsMetadata:t,latestVersion:i,sourceMaps:r}):cF({componentsMetadata:t}),c=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await Ge({message:`${a}
77
+ export default { ${[i,s,a].filter(Boolean).join(", ")} };`}function gh(e,t,n){let r={},o=`${st}/Client.js`,i=`${st}/Server.js`;r[o]=mh([{name:"ClientRenderer",path:e.client,exportKey:"Renderer",type:"internal"}],Yr.Environment.Client);let s={},a=c=>{let u=V1(c);return s[u]?(s[u]+=1,`${u}${s[u]}`):(s[u]=1,u)};r[i]=mh([{name:"ServerRenderer",path:e.server,exportKey:"Renderer",type:"internal"},...Object.entries(t).filter(([c])=>n[c]?.ssr??!0).map(([c,u])=>{let d=a(c),f=u.startsWith(st)?u.replace(`${st}/`,"./"):u;return{name:d,path:f,exportKey:c,isDefaultExport:!0,type:"component"}})],Yr.Environment.Server);let l={[Yr.Environment.Client]:o,[Yr.Environment.Server]:i};return{entryPointsVolume:hh.Volume.fromJSON(r),paths:l}}var q1=e=>e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+|[^\p{L}\p{N}]/gu," ").toLowerCase().replace(new RegExp("(?:^|\\s)(\\p{L})","gu"),(t,n)=>n.toUpperCase()).replace(/\s+/g,"");var ig=require("memfs/lib/volume");var vh=D(require("archiver")),Jn=require("path");pe();var Xr=require("@webflow/data-types");pe();V();var Bt=e=>e.endsWith("/")||/%2F$/i.test(e)?e:`${e}/`;var yh=2;function bh(e){let t={type:Xr.ModuleLoader.FEDERATION,version:yh,entry:Ls,renderer:_r,components:e};return{title:Er,content:JSON.stringify(t)}}function wh(e){let t={type:Xr.ModuleLoader.SSR,version:yh,entry:On,components:e};return{title:Er,content:JSON.stringify(t)}}function Dh(e){let t=`/${Xr.Environment.Client}/${Ls}`;try{if(e.existsSync(t)){let n=e.readFileSync(t,"utf8"),r=JSON.parse(n.toString()),o="publicPath"in r.metaData?r.metaData.publicPath:null;if(!o)throw new Error("Public path not found in module federation manifest");return r.exposes.reduce((i,s)=>{let a=s.name;return a===_r||(i[a]={css:[]},s.assets.css.sync.forEach(l=>{i[a].css.push(`${Bt(o)}${l}`)})),i},{})}}catch(n){p.error(n,{prefix:"Failed to extract components metadata from MF manifest:"})}return{}}var bi=require("@webflow/data-types"),G1=/\.css$/i;async function kh(e,t,n){let r=!1;return new Promise(async(o,i)=>{e.length===0&&i(new Error("No assets to bundle"));let s=`/${bi.Environment.Server}/${Sr}`,a=(0,vh.default)("tar",{gzip:!1}),l=t.createWriteStream(s);a.on("error",d=>(r=!0,i(d))),l.on("close",()=>{if(!r)try{let d={type:"asset",name:Sr,info:{},size:a.pointer(),emitted:!0,comparedForEmit:!1,cached:!1};return e.forEach(f=>{let m=(0,Jn.resolve)((0,Jn.join)(`/${bi.Environment.Server}`,f.name));t.existsSync(m)&&t.rmSync(m)}),o([d])}catch(d){return i(d)}finally{r=!0}}),a.pipe(l);let{title:c,content:u}=wh(n);a.append(u,{name:c}),e.forEach(d=>{if(!G1.test(d.name))try{let f=(0,Jn.resolve)((0,Jn.join)(`/${bi.Environment.Server}`,d.name)),m=t.readFileSync(f,"utf8");a.append(m,{name:d.name})}catch(f){return r=!0,i(f)}}),await a.finalize()})}var xh=require("@webflow/data-types");async function Ch(e,t,n){let{title:r,content:o}=bh(n);await t.promises.writeFile(`/${xh.Environment.Client}/${r}`,o);let i={type:"asset",name:r,info:{},size:o.length,emitted:!0,comparedForEmit:!1,cached:!1};return e.filter(s=>s.name!=="mf-stats.json").concat([i])}var Kh=require("@rspack/core"),Yh=D(require("fork-ts-checker-webpack-plugin")),Xh=require("ts-checker-rspack-plugin"),Qh=D(require("mini-css-extract-plugin")),eg=require("@webflow/data-types");var Eh=require("webpack"),Sl=D(require("mini-css-extract-plugin")),_h=D(require("tsconfig-paths-webpack-plugin")),Sh=require("tsconfig-paths"),Tl=require("@webflow/data-types"),Th=require("path");pe();var Fh=D(require("postcss-selector-parser")),_l=()=>({postcssPlugin:"CSSinShadowDOM",Once(e){e.walkRules(t=>{t.selector=(0,Fh.default)(n=>{n.walkPseudos(r=>{r.value===":root"&&(r.value=":host")})}).processSync(t.selector)})}});_l.postcss=!0;_l.postcssPlugin="CSSinShadowDOM";var wi=_l;function J1(){return(0,Sh.loadConfig)(process.cwd()).resultType==="success"}function Ah({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:Sl.default.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[wi]}}}]},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new Sl.default({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:{plugins:[J1()?new _h.default:null].filter(Boolean)},performance:{hints:!1}};if(t===Tl.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,Th.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Tl.Environment.Server)return{...s,plugins:[...s.plugins||[],new Eh.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:On,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var Oh=require("@module-federation/enhanced"),Al=require("@webflow/data-types");function Ih({libraryName:e,env:t,exposes:n}){if(t===Al.Environment.Client)return{plugins:[new Oh.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Al.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}function Ph(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,use:[{ident:"babel-loader",loader:require.resolve("babel-loader"),options:{presets:[require.resolve("@babel/preset-env"),[require.resolve("@babel/preset-react"),{runtime:"automatic"}],require.resolve("@babel/preset-typescript")]}}]}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}function Di(){return{module:{rules:[{test:/\.(js|ts)x?$/,exclude:/node_modules/,loader:"builtin:swc-loader",options:{jsc:{parser:{syntax:"typescript",tsx:!0},transform:{react:{runtime:"automatic",development:!1,refresh:!1}}}}}]},resolve:{extensions:[".tsx",".ts",".jsx",".js",".json"]}}}var vi=require("@rspack/core"),Rh=require("tsconfig-paths"),Ol=require("@webflow/data-types"),jh=require("path");pe();function H1(){let e=(0,Rh.loadConfig)(process.cwd());if(e.resultType==="success")return e.configFileAbsolutePath}function Bh({entry:e,env:t,mode:n="production",publicPath:r,libraryName:o,outputPath:i}){let s={mode:n,module:{rules:[{test:/\.css$/i,use:[{ident:"mini-css-extract-loader",loader:vi.rspack.CssExtractRspackPlugin.loader},{ident:"css-loader",loader:require.resolve("css-loader"),options:{importLoaders:1}},{ident:"postcss-loader",loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[wi]}}}],type:"javascript/auto"},{test:/\.(png|svg|jpg|jpeg|gif|woff|woff2|eot|ttf|otf)$/i,type:"asset/resource",generator:{filename:"[hash]-[name][ext]"}}]},plugins:[new vi.rspack.CssExtractRspackPlugin({filename:"[contenthash].css",chunkFilename:"[contenthash].css",runtime:!1})],resolve:(()=>{let a=H1();return a?{tsConfig:{configFile:a}}:{}})(),performance:{hints:!1}};if(t===Ol.Environment.Client)return{...s,entry:()=>({}),output:{path:i?(0,jh.join)(process.cwd(),i,t):"/",publicPath:r,clean:!0,uniqueName:o},target:"web"};if(t===Ol.Environment.Server)return{...s,plugins:[...Array.isArray(s.plugins)?s.plugins:[],new vi.rspack.optimize.LimitChunkCountPlugin({maxChunks:1})],entry:e,output:{filename:On,library:{type:"commonjs2"}},optimization:{splitChunks:!1},target:"async-node"};throw new Error(`Unknown environment ${t}`)}var $h=require("@module-federation/enhanced/rspack"),Il=require("@webflow/data-types");function Nh({libraryName:e,env:t,exposes:n}){if(t===Il.Environment.Client)return{plugins:[new $h.ModuleFederationPlugin({name:e,filename:"remoteEntry.js",exposes:n,dts:!1,experiments:{optimization:{disableSnapshot:!0}}})]};if(t===Il.Environment.Server)return{};throw new Error(`Unknown environment ${t}`)}var K1=D(require("fs")),Lh=require("unionfs"),Mh=require("webpack");function Z1(e){return{name:e.name,size:e.size,emitted:e.emitted,info:e.info}}function ki(e){let t=e.toJson();return{hasErrors:()=>e.hasErrors(),hasWarnings:()=>e.hasWarnings(),toString:n=>e.toString(n),toJson:()=>({...t,assets:(t.assets??[]).map(Z1)})}}async function zh({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((s,a)=>(s.use(a),s),new Lh.Union().use(K1));return new Promise((s,a)=>{let l=(0,Mh.webpack)(e);l.inputFileSystem=i,n&&(l.outputFileSystem=n),r&&(l.outputPath=r),l.run((c,u)=>{l.close(d=>{c||d?a(c||d):u?u.hasErrors()||o&&u.hasWarnings()?a(new Error(u.toString("errors-warnings"))):s(ki(u)):a(new Error("Webpack stats are undefined"))})})})}var Y1=D(require("fs")),Pl=D(require("webpack-merge")),Wh=require("memfs"),Uh=require("unionfs"),Vh=require("@rspack/core");async function xi({config:e,sourceVolumes:t=[],outputVolume:n,outputPath:r,failOnWarnings:o=!0}){let i=t.reduce((a,l)=>(a.use(l),a),new Uh.Union().use(Y1)),s=e;return t.length>0&&(s=(0,Pl.default)(s,{experiments:{...e.experiments,useInputFileSystem:[/./]}})),n&&(s=(0,Pl.default)(s,{output:{clean:!1,...r&&{path:r}}})),new Promise((a,l)=>{let c=(0,Vh.rspack)(s);c.inputFileSystem=i,n&&(c.outputFileSystem=(0,Wh.createFsFromVolume)(n)),r&&(c.outputPath=r),c.run((u,d)=>{c.close(f=>{u||f?l(u||f):d?d.hasErrors()||o&&d.hasWarnings()?l(new Error(d.toString("errors-warnings"))):a(ki(d)):l(new Error("Rspack stats are undefined"))})})})}var Gh=require("@module-federation/enhanced");var Hn=D(require("webpack-merge"));V();function $t(e){return e!==null&&typeof e=="object"&&"constructor"in e?e.constructor.name??"":""}function qh(e,t){let n=Object.entries(e).filter(([r])=>!t.includes(r));return Object.fromEntries(n)}function Fi(e){let{deduplicatePluginNames:t,ModuleFederationPluginClass:n,getPluginOptions:r,filterOverridePlugins:o}=e;return function(s,a,l){let c=["entry","output","target"],u=X1(s),d=Array.isArray(l)?Ci(...l.map(u)):Ci(u(l));Object.keys(d).some($=>c.includes($))&&p.warn(`Cannot override blocked properties: ${c.join(", ")}`);let m={...qh(d,[...c,"ModuleFederationPlugin","module","plugins"]),module:qh(d.module??{},["rules"])},g=(0,Hn.default)(a,m),v=d.plugins??[];o&&(v=v.filter(o));let F=a.plugins??[],L=(0,Hn.mergeWithCustomize)({customizeArray:(0,Hn.unique)("plugins",t,$=>$t($))})({plugins:v},{plugins:F}).plugins,x=d?.ModuleFederationPlugin?.shared,O=L?.map($=>{if($t($)==="ModuleFederationPlugin"){let T=r($);return new n({...T,...x?{shared:x}:{}})}return $});g.plugins=O;let J=d.module?.rules;if(J&&typeof J=="function"){let $=a.module?.rules??[];g.module={...g.module??{},rules:J($)}}return g}}function Ci(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={};for(let n of e){let{module:r,ModuleFederationPlugin:o,plugins:i,...s}=n;if(t={...t,...s},r){let{rules:a,...l}=r;if(t.module={...t.module,...l},a){let c=t.module?.rules;c?t.module.rules=u=>{let d=c(u);return a(d)}:t.module.rules=a}}o?.shared&&(t.ModuleFederationPlugin={shared:{...t.ModuleFederationPlugin?.shared,...o.shared}}),i&&(t.plugins=[...t.plugins??[],...i])}return t}function X1(e){return t=>typeof t=="function"?t(e):t}var Q1=Fi({deduplicatePluginNames:["ModuleFederationPlugin","MiniCssExtractPlugin"],ModuleFederationPluginClass:Gh.ModuleFederationPlugin,getPluginOptions:e=>e._options??{}});function Jh(e,t,n){return Q1(e,t,n)}var Hh=require("@module-federation/enhanced/rspack");var eF=Fi({deduplicatePluginNames:["ModuleFederationPlugin","CssExtractRspackPlugin"],ModuleFederationPluginClass:Hh.ModuleFederationPlugin,getPluginOptions:e=>e._options??{},filterOverridePlugins:e=>$t(e)!=="MiniCssExtractPlugin"});function Zh(e,t,n){return eF(e,t,n)}var Rl={[eg.Framework.React]:{generateWebpackBundlerConfig:Ph,generateRspackBundlerConfig:Di}},tF={webpack:{generateBaseConfig:Ah,getFrameworkConfig:(e,t)=>Rl[e].generateWebpackBundlerConfig(t),generateFederationConfig:Ih,mergeConfigs:(e,t,n)=>Jh(e,t,n),bundle:e=>zh({...e,config:e.config}),typeCheckerPlugin:Yh.default,hashFunction:"md5",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>$t(t)==="MiniCssExtractPlugin"?new Qh.default({filename:"[name].[contenthash].css"}):t)})},rspack:{generateBaseConfig:Bh,getFrameworkConfig:(e,t)=>Rl[e].generateRspackBundlerConfig(t),generateFederationConfig:Nh,mergeConfigs:(e,t,n)=>Zh(e,t,n),bundle:e=>xi({...e,config:e.config}),typeCheckerPlugin:Xh.TsCheckerRspackPlugin,hashFunction:"md4",replaceCssPlugin:e=>({...e,plugins:e.plugins?.map(t=>$t(t)==="CssExtractRspackPlugin"?new Kh.CssExtractRspackPlugin({filename:"[name].[contenthash].css"}):t)})}},Zn=e=>tF[e],tg=e=>!!Rl[e];var ng={colors:!0,chunks:!1,modules:!1,chunkModules:!1,reasons:!1,errorDetails:!1,assetsSpace:1/0,warnings:!1,assets:!0,entrypoints:!0,performance:!0};async function Ei(e){let t=e.bundler??"webpack";p.debug("Generating entry points...");let{entryPointsVolume:n,paths:r}=gh(e.renderer,e.componentsFiles,e.componentsOptions),o=ig.Volume.fromJSON({"/Server":null,"/Client":null});p.debug("Generating bundling config...");let i=e.overrideConfig??{};Object.keys(i).length&&p.debug("Found bundle config overrides. Merging...");let s=Zn(t),a=F=>{let S=nF({env:F,mode:e.dev?"development":"production",framework:e.framework,publicPath:e.publicPath,components:e.componentsFiles,entryPaths:r,libraryName:e.libraryIdentifier,bundler:t}),L=s.mergeConfigs(F,S,i);return e?.debugBundler&&(p.info(`${t} config for env ${F}:`),p.dir(L)),L},l={sourceVolumes:[...e.sourceVolumes,n],outputVolume:o,failOnWarnings:e.failOnWarnings},[c,u]=await Promise.all([s.bundle({...l,config:a(nn.Environment.Server),outputPath:`/${nn.Environment.Server}`}),s.bundle({...l,config:a(nn.Environment.Client),outputPath:`/${nn.Environment.Client}`})]);e?.debugBundler&&(p.debug(o.toTree()),p.debug(`Server Bundler Stats: ${c.toString(ng)}`),p.debug(`Client Bundler Stats: ${u.toString(ng)}`));let d=Dh(o);p.debug("Packaging server bundle...");let f=await kh(c.toJson().assets||[],o,d);p.debug("Packaging client bundle...");let m=await Ch(u.toJson().assets||[],o,d),g=F=>S=>[S,F];return{outputFiles:[...f.map(g(nn.Environment.Server)),...m.map(g(nn.Environment.Client))],outputVolume:o}}function nF({env:e,mode:t="production",framework:n,publicPath:r,components:o,entryPaths:i,libraryName:s,outputPath:a,bundler:l="webpack"}){if(!tg(n))throw new Error(`Unknown framework: ${n}`);let c=Object.entries({[_r]:i[e],...o}).reduce((g,[v,F])=>({...g,[`./${v}`]:`./${(0,rg.relative)(process.cwd(),F)}`}),{}),u=Zn(l),d=u.generateBaseConfig({entry:i[e],env:e,mode:t,libraryName:s,publicPath:r,outputPath:a}),f=u.getFrameworkConfig(n,e),m=u.generateFederationConfig({exposes:c,env:e,libraryName:s});return(0,og.default)(d,f,m)}var lg=D(require("path")),Bl=require("memfs/lib/volume"),$l=D(require("webpack-merge")),cg=D(require("webpack-node-externals")),Ne=require("@webflow/data-types");var rF=D(require("fs")),Kn=require("path"),Yn=require("webpack");function oF(e,t=rF){let n=(0,Kn.join)(process.cwd(),"node_modules",e);for(;n!==(0,Kn.dirname)(n)&&n!=="node_modules";){let r=(0,Kn.join)(n,"package.json");if(t.existsSync(r))try{let{name:o,version:i}=JSON.parse(t.readFileSync(r,"utf8"));return`${o}@${i}`}catch{return null}n=(0,Kn.dirname)(n)}return null}var _i=class{apply(t){t.hooks.compilation.tap("ProcessSourceMapsPlugin",function(n){n.hooks.processAssets.tap({name:"ProcessSourceMapsPlugin",stage:Yn.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE},function(){try{let r=n.getAssets(),o={};Object.values(r).forEach(({name:i,source:s})=>{if(!i.endsWith(".map"))return;let[a,l,c]=i.split("."),u=o[a]?.sources??{},d=o[a]?.dependencies??new Set;JSON.parse(s.source().toString()).sources.forEach(m=>{if(m.startsWith("external")){let g=m.match(/^external \S+ "(.+)"$/)?.[1];if(!g)throw new Error(`Could not extract package name from ${m}`);let v=oF(g,n.inputFileSystem);if(!v)throw new Error(`Could not find package information for ${g}`);v&&d.add(v)}}),o[a]={sources:{...u,[`./${a}.${c}`]:l},dependencies:d},n.deleteAsset(i)}),Object.entries(o).forEach(([i,{sources:s,dependencies:a}])=>{n.emitAsset(`${i}.js.map`,new Yn.sources.RawSource(JSON.stringify({sources:s,dependencies:[...a]})))})}catch(r){n.errors.push(new Yn.WebpackError(`[ProcessSourceMapsPlugin] Could not process source maps: ${r instanceof Error?r.stack:String(r)}`))}})})}};var sg=D(require("module")),ag=require("jsdom"),jl="__webflowCliImportModuleWindow__";function iF(e){let n=/^(?:\ufeff?\s*)(?:'use strict'|"use strict");?\s*(?:\r?\n|\r)?/.exec(e),r=!!n,o=`module[${JSON.stringify(jl)}]`,i=[];r||i.push('"use strict";'),i.push(`var __wfW = ${o};`,'if (__wfW == null) { throw new ReferenceError("Webflow CLI internal: missing JSDOM window on module"); }',"var window = __wfW;","var document = __wfW.document;","var navigator = __wfW.navigator;","var HTMLElement = __wfW.HTMLElement;","var localStorage = __wfW.localStorage;","var sessionStorage = __wfW.sessionStorage;","var requestAnimationFrame = __wfW.requestAnimationFrame.bind(__wfW);","var cancelAnimationFrame = __wfW.cancelAnimationFrame.bind(__wfW);","var getComputedStyle = __wfW.getComputedStyle.bind(__wfW);","var performance = __wfW.performance;","");let s=i.join(`
78
+ `)+`
79
+ `;return n?e.slice(0,n[0].length)+s+e.slice(n[0].length):s+e}function Qr(e,t){let n=e.readFileSync(t,"utf-8"),o=new ag.JSDOM("<!DOCTYPE html><html><body></body></html>",{url:"http://localhost/",pretendToBeVisual:!0}).window,i=iF(n),s=new sg.default(t,module);Object.defineProperty(s,jl,{value:o,enumerable:!1,configurable:!0,writable:!1});try{return s._compile(i,t),s}finally{Reflect.deleteProperty(s,jl),o.close()}}function sF(e,t){let n=`/${t}.js`,r=Qr(e,n),o=r.exports.default||r.exports;if(o&&typeof o=="object")try{let{name:i,description:s,group:a,props:l,options:c}=(0,Ne.parseComponentData)(o);return{displayName:i,description:s,group:a,props:Object.entries(l||{}).map(([u,d])=>({...d,name:u,defaultValue:typeof d.defaultValue!="string"?JSON.stringify(d.defaultValue):d.defaultValue,settings:d.settings!==void 0?JSON.stringify(d.settings):d.settings})),options:c}}catch(i){let s=i instanceof Error?i.stack:String(i);throw new Error(`Error parsing component data for '${t}': ${s}`)}throw new Error(`Could not get declaration for '${t}'`)}async function aF({declarations:e,sources:t,overrideConfig:n={},performTypeCheck:r,bundler:o="webpack"}){let i=new Bl.Volume,s=Zn(o),a=(0,$l.default)(s.generateBaseConfig({entry:e,env:Ne.Environment.Client,publicPath:"/",libraryName:"metadata"}),s.getFrameworkConfig(Ne.Framework.React,Ne.Environment.Client),{entry:e,mode:"development",output:{path:"/",library:{type:"commonjs2"}},target:"node",plugins:r?[new s.typeCheckerPlugin]:[]}),l=s.mergeConfigs(Ne.Environment.Client,a,n);return await s.bundle({outputPath:"/",config:l,sourceVolumes:t?[t]:[],outputVolume:i,failOnWarnings:!1}),i}async function lF({declarations:e,sources:t,overrideConfig:n={},bundler:r}){let o=new Bl.Volume,i=Zn(r),s=(0,$l.default)(i.generateBaseConfig({entry:e,env:Ne.Environment.Client,publicPath:"/",libraryName:"source-maps"}),i.getFrameworkConfig(Ne.Framework.React,Ne.Environment.Client),{entry:e,mode:"production",optimization:{mangleExports:"deterministic",moduleIds:"deterministic",chunkIds:"deterministic"},output:{filename:"[name].[contenthash].js",path:"/",library:{type:"commonjs2"},devtoolModuleFilenameTemplate:"[resource-path]",hashFunction:i.hashFunction},externalsPresets:{node:!0},devtool:"source-map",plugins:[new _i],externals:[(0,cg.default)()]}),a=i.mergeConfigs(Ne.Environment.Client,s,n);return a=i.replaceCssPlugin(a),await i.bundle({outputPath:"/",config:a,sourceVolumes:t?[t]:[],outputVolume:o,failOnWarnings:!1}),o}function cF(e){return Object.entries(e.toJSON()).reduce((t,[n,r])=>{if(n.endsWith(".map")&&r?.length){let o=lg.default.basename(n).split(".")[0];t[o]=r}return t},{})}async function Si({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r=!1,skipSourceMaps:o=!1,bundler:i="webpack"}){let[s,a]=await Promise.all([aF({declarations:e,sources:t,overrideConfig:n,performTypeCheck:r,bundler:i}),o||i==="rspack"?Promise.resolve(null):lF({declarations:e,sources:t,overrideConfig:n,bundler:i})]),{metadata:l,options:c}=Object.keys(e).reduce((d,f)=>{let m=sF(s,f);return d.metadata[f]=m,d.options[f]=m.options||{},d},{metadata:{},options:{}});return{sourceMaps:a?cF(a):{},metadata:l,options:c}}function ug(e,{framework:t,sourceMaps:n}){return Object.fromEntries(Object.keys(e).map(r=>[r,{...e[r],id:r,framework:t,exportPath:"default",hash:n[r]}]))}Je();var pg=D(require("md5"));Ee();_e();var fg=" - ";function uF(e){return e==="added"?` ${E.green("(Added)")}`:e==="removed"?` ${E.yellow("(Removed)")}`:e==="changed"?` ${E.blue("(Changed)")}`:""}function dg(e){if(!e)return"";let t=JSON.parse(e);return(0,pg.default)(JSON.stringify([...Object.values(t.sources),...t.dependencies.filter(n=>!n.includes("@webflow/data-types")&&!n.includes("@webflow/react"))].sort()))}function dF({componentsMetadata:e,latestVersion:t,sourceMaps:n}){let r=t.resource.codeLibraryResource.manifest.components.reduce((s,a)=>(s[a.id]=a,s),{}),o={};return Object.entries(r).forEach(([s,a])=>{if(!e[s])o[s]={component:a,status:"removed"};else{let l=e[s],c=dg(n[s]),u=a.displayName&&l.displayName!==a.displayName,d=c&&a.hash&&c!==dg(a.hash),f=u||d;o[s]={component:l,status:f?"changed":"unchanged",previousName:u?a.displayName:void 0}}}),Object.entries(e).forEach(([s,a])=>{r[s]||(o[s]={component:a,status:"added"})}),Object.values(o).map(({component:s,status:a,previousName:l})=>{let c=s.displayName,u=l?`${l} \u2192 ${c}`:c;return`${fg}${u}${uF(a)}`}).sort().join(`
80
+ `)}function pF({componentsMetadata:e}){return Object.values(e).map(n=>`${fg}${n.displayName}`).sort().join(`
81
+ `)}async function mg({libraryConfig:e,componentsMetadata:t,existingCodeLibraries:n,sourceMaps:r,workspaceInfo:o}){if(ue())return Promise.resolve(!0);let i=e.id?n.find(({profile:d})=>d.slug===e.id):null,s=i&&i.profile.status==="ACTIVE",a="Code components:",l=s?dF({componentsMetadata:t,latestVersion:i,sourceMaps:r}):pF({componentsMetadata:t}),c=s?`Ready to update ${e.name} on ${o.name}?`:`Ready to share ${e.name} with ${o.name}?`;return await Ge({message:`${a}
80
82
  ${l}
81
83
 
82
- ${c}`})}var Ti=require("path"),hg=require("memfs/lib/volume");var fg=D(require("fast-glob")),uF=e=>{let t=e.split("/");return t[t.length-1]},dF=e=>uF(e).split(".")[0];async function mg(e,t){return(await fg.default.glob(e,{absolute:!0,...t||{}})).reduce((r,o)=>{let i=dF(o);if(r[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${r[i]}, but also found at ${o}.`);return{...r,[i]:o}},{})}async function Ai(e){let t=await mg(e.components,{cwd:(0,Ti.dirname)(e.manifestPath),ignore:[e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:n,componentsVolume:r}=pF(t,e.renderer.client,e.globals);return{componentsFiles:n,componentsVolume:r}}function pF(e,t,n){let r={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,Ti.extname)(s),l=`${st}/${ph}/${i}${a}`;r[i]=l,o[l]=fF(t,s,n)}),{componentsFiles:r,componentsVolume:hg.Volume.fromJSON(o)}}function fF(e,t,n){return n?`
84
+ ${c}`})}var Ti=require("path"),yg=require("memfs/lib/volume");var hg=D(require("fast-glob")),fF=e=>{let t=e.split("/");return t[t.length-1]},mF=e=>fF(e).split(".")[0];async function gg(e,t){return(await hg.default.glob(e,{absolute:!0,...t||{}})).reduce((r,o)=>{let i=mF(o);if(r[i])throw new Error(`Duplicate component '${i}' found. Already declared at ${r[i]}, but also found at ${o}.`);return{...r,[i]:o}},{})}async function Ai(e){let t=await gg(e.components,{cwd:(0,Ti.dirname)(e.manifestPath),ignore:[e.globals,e.bundleConfig].filter(o=>o!=null)});if(!Object.keys(t).length)throw new Error("No declaration files found");let{componentsFiles:n,componentsVolume:r}=hF(t,e.renderer.client,e.globals);return{componentsFiles:n,componentsVolume:r}}function hF(e,t,n){let r={},o={};return Object.entries(e).forEach(([i,s])=>{let a=(0,Ti.extname)(s),l=`${st}/${fh}/${i}${a}`;r[i]=l,o[l]=gF(t,s,n)}),{componentsFiles:r,componentsVolume:yg.Volume.fromJSON(o)}}function gF(e,t,n){return n?`
83
85
  import { applyDecorators } from "${e}";
84
86
  import componentDefinition from "${t}";
85
87
  const globals = require("${n}") || {};
@@ -101,59 +103,59 @@ export default decoratedDefinition;
101
103
  `.trim():`
102
104
  import componentDefinition from "${t}";
103
105
  export default {...componentDefinition};
104
- `.trim()}nt();var gg=require("@webflow/data-types"),Oi={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:gg.Framework.React};var Xn=require("path"),Qn=require("fs");Ee();Je();V();be();function ht(e){return e.replace(/\\/g,"/")}_e();ae();function yg(e){let t={...e};if(e.globals){let n=(0,Xn.resolve)(process.cwd(),e.globals);if(!(0,Qn.existsSync)(n))throw new Error(`Globals file not found: ${e.globals}
106
+ `.trim()}nt();var bg=require("@webflow/data-types"),Oi={renderer:{client:"@webflow/react",server:"@webflow/react"},components:["**/*.webflow.@(js|jsx|mjs|ts|tsx)"],framework:bg.Framework.React};var Xn=require("path"),Qn=require("fs");Ee();Je();V();be();function ht(e){return e.replace(/\\/g,"/")}_e();ae();function wg(e){let t={...e};if(e.globals){let n=(0,Xn.resolve)(process.cwd(),e.globals);if(!(0,Qn.existsSync)(n))throw new Error(`Globals file not found: ${e.globals}
105
107
  Resolved path: ${n}
106
108
  Please ensure the file exists or remove the 'globals' field from your manifest.`);t.globals=ht(n)}if(e.bundleConfig){let n=(0,Xn.resolve)(process.cwd(),e.bundleConfig);if(!(0,Qn.existsSync)(n))throw new Error(`Bundle config file not found: ${e.bundleConfig}
107
109
  Resolved path: ${n}
108
- Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=ht(n)}if(typeof e.renderer=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer);(0,Qn.existsSync)(n)&&(t.renderer=ht(n))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer.client);(0,Qn.existsSync)(n)&&(t.renderer={...t.renderer,client:ht(n)})}if(typeof e.renderer.server=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer.server);(0,Qn.existsSync)(n)&&(t.renderer={...t.renderer,server:ht(n)})}}return t}async function mF({initialData:e}){let t=await Re({message:"Enter a name for your code library",validate:o=>o.trim()===""?"The library name cannot be empty.":!0,default:e?.name});if(t==null)throw new b("When --no-input mode is enabled please provide a name in your library manifest");let n=await Re({message:"Enter a description for your code library",default:e?.description??""});if(!await Ge({message:"Is the code (including 3rd party packages) you are uploading to Webflow trusted and secure?"}))throw new Error("Code library is not trusted and secure");return{name:t,description:n}}async function hF({existingCodeLibraries:e}){return await tt({message:"Select existing code library (or create new)",choices:[{name:"[Create new code library]",value:null},...e.map(({resource:n,profile:r})=>{let o=`${n.codeLibraryResource.manifest.name} (${r.slug})`;r.status==="ARCHIVED"&&(o+=` ${E.yellow("(Unshared)")}`);let i={id:r.slug,name:n.codeLibraryResource.manifest.name,description:n.codeLibraryResource.manifest.description};return{name:o,value:i}})]})}async function $l({initialData:e,existingCodeLibraries:t}){let n,r={components:Oi.components},o=t.length>0?await hF({existingCodeLibraries:t}):null;if(o)n={...r,...o,...e,id:o.id};else{let a=await mF({initialData:e});n={...r,...e,...a}}let i=yg(n);he({library:i});let{path:s}=Gt();return{libraryManifest:i,manifestPath:s}}async function bg({existingCodeLibraries:e}){let t=p.spinner("Looking for webflow.json manifest");try{let{manifest:n,manifestPath:r}=H(),o=xr(n,"library");if(!o.id){if(xt())return t.succeed(),$l({initialData:o,existingCodeLibraries:e});throw new Error("Library manifest does not have an id")}let i=o.name??e.find(({profile:a})=>a.slug===o.id)?.resource.codeLibraryResource.manifest.name;if(!i&&xt())return t.succeed(),$l({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=yg({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:r})}catch(n){if(n instanceof qt&&xt())return t.info(n.message),$l({existingCodeLibraries:e});throw t.fail(),n}}var Nl=require("memfs/lib/volume"),vg=D(require("webpack-merge"));var kg="/client-renderer.js",xg="/server-renderer.js",wg=`${st}/test-renderers${kg}`,Dg=`${st}/test-renderers${xg}`,gF=new Set(["@webflow/react"]),yF=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function Cg(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(gF.has(e.client)&&yF.has(e.server))return;let t=await DF(e);bF(e.client,t),wF(e.server,t)}function bF(e,t){let n=Qr(t,kg);if(typeof n.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof n.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let r=()=>null,o=n.exports.ClientRenderer(r),i=["mount","hydrate","render","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid client renderer: ${e} ClientRenderer must return an object with a '${s}' function.`)}function wF(e,t){let n=Qr(t,xg);if(typeof n.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let r=()=>null,o=n.exports.ServerRenderer(r),i=["renderToStream","renderToString","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid server renderer: ${e} ServerRenderer must return an object with a '${s}' function.`)}async function DF(e){let t=new Nl.Volume,n=ht(e.client),r=ht(e.server),o={[wg]:`
110
+ Please ensure the file exists or remove the 'bundleConfig' field from your manifest.`);t.bundleConfig=ht(n)}if(typeof e.renderer=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer);(0,Qn.existsSync)(n)&&(t.renderer=ht(n))}else if(typeof e.renderer=="object"&&typeof t.renderer=="object"){if(typeof e.renderer.client=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer.client);(0,Qn.existsSync)(n)&&(t.renderer={...t.renderer,client:ht(n)})}if(typeof e.renderer.server=="string"){let n=(0,Xn.resolve)(process.cwd(),e.renderer.server);(0,Qn.existsSync)(n)&&(t.renderer={...t.renderer,server:ht(n)})}}return t}async function yF({initialData:e}){let t=await Re({message:"Enter a name for your code library",validate:o=>o.trim()===""?"The library name cannot be empty.":!0,default:e?.name});if(t==null)throw new b("When --no-input mode is enabled please provide a name in your library manifest");let n=await Re({message:"Enter a description for your code library",default:e?.description??""});if(!await Ge({message:"Is the code (including 3rd party packages) you are uploading to Webflow trusted and secure?"}))throw new Error("Code library is not trusted and secure");return{name:t,description:n}}async function bF({existingCodeLibraries:e}){return await tt({message:"Select existing code library (or create new)",choices:[{name:"[Create new code library]",value:null},...e.map(({resource:n,profile:r})=>{let o=`${n.codeLibraryResource.manifest.name} (${r.slug})`;r.status==="ARCHIVED"&&(o+=` ${E.yellow("(Unshared)")}`);let i={id:r.slug,name:n.codeLibraryResource.manifest.name,description:n.codeLibraryResource.manifest.description};return{name:o,value:i}})]})}async function Nl({initialData:e,existingCodeLibraries:t}){let n,r={components:Oi.components},o=t.length>0?await bF({existingCodeLibraries:t}):null;if(o)n={...r,...o,...e,id:o.id};else{let a=await yF({initialData:e});n={...r,...e,...a}}let i=wg(n);he({library:i});let{path:s}=Gt();return{libraryManifest:i,manifestPath:s}}async function Dg({existingCodeLibraries:e}){let t=p.spinner("Looking for webflow.json manifest");try{let{manifest:n,manifestPath:r}=H(),o=xr(n,"library");if(!o.id){if(xt())return t.succeed(),Nl({initialData:o,existingCodeLibraries:e});throw new Error("Library manifest does not have an id")}let i=o.name??e.find(({profile:a})=>a.slug===o.id)?.resource.codeLibraryResource.manifest.name;if(!i&&xt())return t.succeed(),Nl({initialData:o,existingCodeLibraries:e});i||(i=o.id),t.succeed();let s=wg({...o,name:i});return Promise.resolve({libraryManifest:s,manifestPath:r})}catch(n){if(n instanceof qt&&xt())return t.info(n.message),Nl({existingCodeLibraries:e});throw t.fail(),n}}var Ll=require("memfs/lib/volume"),xg=D(require("webpack-merge"));var Cg="/client-renderer.js",Fg="/server-renderer.js",vg=`${st}/test-renderers${Cg}`,kg=`${st}/test-renderers${Fg}`,wF=new Set(["@webflow/react"]),DF=new Set(["@webflow/react","@webflow/emotion-utils/server","@webflow/styled-components-utils/server"]);async function Eg(e){if(!e.client||!e.server)throw new Error("Invalid renderer configuration. Both client and server renderers must be specified.");if(wF.has(e.client)&&DF.has(e.server))return;let t=await xF(e);vF(e.client,t),kF(e.server,t)}function vF(e,t){let n=Qr(t,Cg);if(typeof n.exports.ClientRenderer!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'ClientRenderer' export.`);if(typeof n.exports.applyDecorators!="function")throw new Error(`Invalid client renderer: ${e} does not have a valid 'applyDecorators' export.`);let r=()=>null,o=n.exports.ClientRenderer(r),i=["mount","hydrate","render","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid client renderer: ${e} ClientRenderer must return an object with a '${s}' function.`)}function kF(e,t){let n=Qr(t,Fg);if(typeof n.exports.ServerRenderer!="function")throw new Error(`Invalid server renderer: ${e} does not have a valid 'ServerRenderer' export.`);let r=()=>null,o=n.exports.ServerRenderer(r),i=["renderToStream","renderToString","createSlot"];for(let s of i)if(typeof o[s]!="function")throw new Error(`Invalid server renderer: ${e} ServerRenderer must return an object with a '${s}' function.`)}async function xF(e){let t=new Ll.Volume,n=ht(e.client),r=ht(e.server),o={[vg]:`
109
111
  export * from "${n}";
110
- `,[Dg]:`
112
+ `,[kg]:`
111
113
  export * from "${r}";
112
- `},i=(0,vg.default)(Di(),{entry:{"client-renderer":wg,"server-renderer":Dg},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await xi({config:i,sourceVolumes:[Nl.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function Ii({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:n}=await bg({existingCodeLibraries:e}),{renderer:r,...o}=Oi,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??r.client,server:t.renderer?.server??r.server};return await Cg(i),{...o,...t,renderer:i,manifestPath:n}}ae();async function vF(e,t){let{trackPerformance:n,libraryConfig:r}=e;return await n("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await Ai(r);p.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:l}=await Si({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:gi(o,t),bundler:t?.bundler});return p.debug(`Metadata: ${JSON.stringify(a,null,2)}`),p.debug(`Source Maps:
114
+ `},i=(0,xg.default)(Di(),{entry:{"client-renderer":vg,"server-renderer":kg},mode:"development",output:{path:"/",filename:"[name].js",library:{type:"commonjs2"}},target:"node"});return await xi({config:i,sourceVolumes:[Ll.Volume.fromJSON(o)],outputVolume:t,failOnWarnings:!1}),t}async function Ii({existingCodeLibraries:e}){let{libraryManifest:t,manifestPath:n}=await Dg({existingCodeLibraries:e}),{renderer:r,...o}=Oi,i=typeof t.renderer=="string"?{client:t.renderer,server:t.renderer}:{client:t.renderer?.client??r.client,server:t.renderer?.server??r.server};return await Eg(i),{...o,...t,renderer:i,manifestPath:n}}ae();async function CF(e,t){let{trackPerformance:n,libraryConfig:r}=e;return await n("collect_metadata",async()=>{let{componentsFiles:o,componentsVolume:i}=await Ai(r);p.debug(`Components: ${JSON.stringify(o,null,2)}`);let{sourceMaps:s,metadata:a,options:l}=await Si({declarations:o,sources:i,overrideConfig:e.overrideConfig,performTypeCheck:gi(o,t),bundler:t?.bundler});return p.debug(`Metadata: ${JSON.stringify(a,null,2)}`),p.debug(`Source Maps:
113
115
 
114
116
  ${Object.entries(s).reduce((c,[u,d])=>(c+=`${u}: ${JSON.stringify(JSON.parse(d),null,2)}
115
117
 
116
- `,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function kF(e,t,n,r,o,i,s){let{trackPerformance:a,libraryConfig:l}=e;return await a("generate_library_bundle",async()=>await Ei({libraryIdentifier:`_${o}`,renderer:l.renderer,framework:l.framework,publicPath:Bt(i[er.Environment.Client]),sourceVolumes:[n],componentsFiles:t,componentsOptions:r,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function xF(e,t,n,r){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([l,c])=>{let u=(0,Pi.resolve)((0,Pi.join)(`/${c}`,`${l.name}`));return Zr(n.readFileSync(u,"utf8").toString(),u,{bundleEnvironment:c})}),{signatures:a}=await Fl({resourceId:r,files:s.map(({meta:l})=>l),options:i});await Promise.all(a.map(async l=>{let c=s.find(u=>u.meta.fileHash===l.hash);if(!c)throw new Error(`File not found: ${l.hash}`);await Kr(c,l.value)}))})}async function CF(e,t,n,r,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let l={clientModule:{bundleUrl:Bt(o[er.Environment.Client])+Er,loaderType:er.ModuleLoader.FEDERATION},serverModule:{bundleUrl:Bt(o[er.Environment.Server])+Sr}},c=lg(t,{framework:s.framework,sourceMaps:n}),{taskId:u}=await El({resourceId:r,codeModule:l,components:Object.values(c),options:a});p.debug(JSON.stringify({taskId:u},null,2))})}async function Ll(e){e?.verbose&&(process.env.DEBUG="true");let t,n=Date.now(),r;try{r=await le({apiToken:e?.apiToken})}catch(s){throw p.error(s),s}p.debug("Initializing telemetry service...");let o=Z.forCodeLibraries({authToken:r}),i=Tu(o);try{p.debug("Checking dependencies versions..."),new Ht().run();let s={apiToken:r};t=p.spinner("Initializing");let a=await i("get_code_libraries",async()=>await xl({options:s})),{workspace:l,libraries:c}=a;t.succeed(),p.debug("Parsing library config...");let u=await Ii({existingCodeLibraries:c}),d=u.bundleConfig?require(u.bundleConfig):{},f={trackPerformance:i,apiOptions:s,libraryConfig:u,overrideConfig:d};t=p.spinner("Collecting metadata");let{componentsFiles:m,componentsVolume:g,componentsMetadata:v,componentsOptions:F,sourceMaps:S}=await vF(f,e);if(t.succeed(),!await pg({libraryConfig:u,componentsMetadata:v,existingCodeLibraries:c,sourceMaps:S,workspaceInfo:l}))return;t=p.spinner("Creating code library");let{resourceId:x,profileSlug:O,workspace:J,s3Urls:$,cdnUrls:T}=await i("init_code_library",async()=>await Cl({name:u.name,slug:u.id,description:u.description,options:s}));t.succeed(),p.debug(JSON.stringify({resourceId:x,profileSlug:O,s3Urls:$,cdnUrls:T},null,2)),await o.sendUsage("library_initialized",{libraryName:u.name,framework:u.framework,resourceId:x,profileSlug:O}),u.id||he({library:{id:O}}),t=p.spinner("Compiling code components");let{outputFiles:h,outputVolume:y}=await kF(f,m,g,F,x,T,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:u.name,componentCount:Object.keys(m).length,resourceId:x,profileSlug:O}),t=p.spinner("Uploading files"),await xF(f,h,y,x),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:u.name,fileCount:h.length,resourceId:x,profileSlug:O}),t=p.spinner("Sharing library"),await CF(f,v,S,x,T),t.succeed(),p.success(`Code library shared successfully${J?.slug?`: ${An}/dashboard/workspace/${J?.slug}/shared-libraries-and-templates`:"!"}`);let j=Date.now()-n;await o.sendUsage("share_library",{duration:j,componentCount:Object.keys(m).length,libraryName:u.name,framework:u.framework,resourceId:x,profileSlug:O})}catch(s){t?.fail();let a=Date.now()-n;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new b(s)}}var Ri=D(require("fs")),tr=require("path");V();ae();function FF(e){return e.replace(/[-_]+/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).replace(/\s+/g,"")}var EF="dist",_F="http://localhost/";async function Ml(e){e.verbose&&(process.env.DEBUG="true");let t;try{p.debug("Checking dependencies versions..."),new Ht().run(),p.debug("Looking for manifest...");let n=await Ii({existingCodeLibraries:[]}),r=`_${e.libraryId||FF(n.name)}`;e?.debugBundler&&p.debug(`Library Config: ${JSON.stringify(n,null,2)}`),t=p.spinner("Collecting metadata");let{componentsFiles:o,componentsVolume:i}=await Ai(n);e?.debugBundler&&p.debug(`Components: ${JSON.stringify(o,null,2)}`);let s=n.bundleConfig?require(n.bundleConfig):{},{sourceMaps:a,metadata:l,options:c}=await Si({declarations:o,sources:i,overrideConfig:s,performTypeCheck:gi(o,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(p.debug(`Metadata: ${JSON.stringify(l,null,2)}`),p.debug(`Source Maps:
118
+ `,c),"")}`),{componentsFiles:o,componentsVolume:i,componentsMetadata:a,componentsOptions:l,sourceMaps:s}})}async function FF(e,t,n,r,o,i,s){let{trackPerformance:a,libraryConfig:l}=e;return await a("generate_library_bundle",async()=>await Ei({libraryIdentifier:`_${o}`,renderer:l.renderer,framework:l.framework,publicPath:Bt(i[er.Environment.Client]),sourceVolumes:[n],componentsFiles:t,componentsOptions:r,debugBundler:s?.debugBundler,dev:s?.dev,overrideConfig:e.overrideConfig,failOnWarnings:!s?.force,bundler:s?.bundler}))}async function EF(e,t,n,r){let{trackPerformance:o,apiOptions:i}=e;return await o("upload_files",async()=>{let s=t.map(([l,c])=>{let u=(0,Pi.resolve)((0,Pi.join)(`/${c}`,`${l.name}`));return Zr(n.readFileSync(u,"utf8").toString(),u,{bundleEnvironment:c})}),{signatures:a}=await Fl({resourceId:r,files:s.map(({meta:l})=>l),options:i});await Promise.all(a.map(async l=>{let c=s.find(u=>u.meta.fileHash===l.hash);if(!c)throw new Error(`File not found: ${l.hash}`);await Kr(c,l.value)}))})}async function _F(e,t,n,r,o){let{trackPerformance:i,libraryConfig:s,apiOptions:a}=e;return await i("share_library",async()=>{let l={clientModule:{bundleUrl:Bt(o[er.Environment.Client])+Er,loaderType:er.ModuleLoader.FEDERATION},serverModule:{bundleUrl:Bt(o[er.Environment.Server])+Sr}},c=ug(t,{framework:s.framework,sourceMaps:n}),{taskId:u}=await El({resourceId:r,codeModule:l,components:Object.values(c),options:a});p.debug(JSON.stringify({taskId:u},null,2))})}async function Ml(e){e?.verbose&&(process.env.DEBUG="true");let t,n=Date.now(),r;try{r=await le({apiToken:e?.apiToken})}catch(s){throw p.error(s),s}p.debug("Initializing telemetry service...");let o=Z.forCodeLibraries({authToken:r}),i=Au(o);try{p.debug("Checking dependencies versions..."),new Ht().run();let s={apiToken:r};t=p.spinner("Initializing");let a=await i("get_code_libraries",async()=>await xl({options:s})),{workspace:l,libraries:c}=a;t.succeed(),p.debug("Parsing library config...");let u=await Ii({existingCodeLibraries:c}),d=u.bundleConfig?require(u.bundleConfig):{},f={trackPerformance:i,apiOptions:s,libraryConfig:u,overrideConfig:d};t=p.spinner("Collecting metadata");let{componentsFiles:m,componentsVolume:g,componentsMetadata:v,componentsOptions:F,sourceMaps:S}=await CF(f,e);if(t.succeed(),!await mg({libraryConfig:u,componentsMetadata:v,existingCodeLibraries:c,sourceMaps:S,workspaceInfo:l}))return;t=p.spinner("Creating code library");let{resourceId:x,profileSlug:O,workspace:J,s3Urls:$,cdnUrls:T}=await i("init_code_library",async()=>await Cl({name:u.name,slug:u.id,description:u.description,options:s}));t.succeed(),p.debug(JSON.stringify({resourceId:x,profileSlug:O,s3Urls:$,cdnUrls:T},null,2)),await o.sendUsage("library_initialized",{libraryName:u.name,framework:u.framework,resourceId:x,profileSlug:O}),u.id||he({library:{id:O}}),t=p.spinner("Compiling code components");let{outputFiles:h,outputVolume:y}=await FF(f,m,g,F,x,T,e);t.succeed(),await o.sendUsage("bundle_generated",{libraryName:u.name,componentCount:Object.keys(m).length,resourceId:x,profileSlug:O}),t=p.spinner("Uploading files"),await EF(f,h,y,x),t.succeed(),await o.sendUsage("files_uploaded",{libraryName:u.name,fileCount:h.length,resourceId:x,profileSlug:O}),t=p.spinner("Sharing library"),await _F(f,v,S,x,T),t.succeed(),p.success(`Code library shared successfully${J?.slug?`: ${An}/dashboard/workspace/${J?.slug}/shared-libraries-and-templates`:"!"}`);let j=Date.now()-n;await o.sendUsage("share_library",{duration:j,componentCount:Object.keys(m).length,libraryName:u.name,framework:u.framework,resourceId:x,profileSlug:O})}catch(s){t?.fail();let a=Date.now()-n;throw await o.sendError(s instanceof Error?s:new Error(String(s)),"share_library",{duration:a}),new b(s)}}var Ri=D(require("fs")),tr=require("path");V();ae();function SF(e){return e.replace(/[-_]+/g," ").replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).replace(/\s+/g,"")}var TF="dist",AF="http://localhost/";async function zl(e){e.verbose&&(process.env.DEBUG="true");let t;try{p.debug("Checking dependencies versions..."),new Ht().run(),p.debug("Looking for manifest...");let n=await Ii({existingCodeLibraries:[]}),r=`_${e.libraryId||SF(n.name)}`;e?.debugBundler&&p.debug(`Library Config: ${JSON.stringify(n,null,2)}`),t=p.spinner("Collecting metadata");let{componentsFiles:o,componentsVolume:i}=await Ai(n);e?.debugBundler&&p.debug(`Components: ${JSON.stringify(o,null,2)}`);let s=n.bundleConfig?require(n.bundleConfig):{},{sourceMaps:a,metadata:l,options:c}=await Si({declarations:o,sources:i,overrideConfig:s,performTypeCheck:gi(o,e),skipSourceMaps:!e?.debugBundler,bundler:e.bundler});e?.debugBundler&&(p.debug(`Metadata: ${JSON.stringify(l,null,2)}`),p.debug(`Source Maps:
117
119
 
118
120
  ${Object.entries(a).reduce((f,[m,g])=>(f+=`${m}: ${JSON.stringify(JSON.parse(g),null,2)}
119
121
 
120
- `,f),"")}`)),t.succeed(),t=p.spinner("Generating library bundle");let{outputFiles:u,outputVolume:d}=await Ei({libraryIdentifier:r,renderer:n.renderer,framework:n.framework,publicPath:Bt(e.publicPath||_F),sourceVolumes:[i],componentsFiles:o,componentsOptions:c,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:s,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=p.spinner("Writing to disk"),u.forEach(([f,m])=>{let g=(0,tr.join)(`/${m}`,`${f.name}`),v=Zr(d.readFileSync(g,"utf8").toString(),g,{bundleEnvironment:m}),F=(0,tr.join)(process.cwd(),e.outputPath||EF);Ri.default.existsSync((0,tr.join)(F,`${m}`))||Ri.default.mkdirSync((0,tr.join)(F,`${m}`),{recursive:!0}),Ri.default.writeFileSync((0,tr.join)(F,m,f.name),v.value.toString())}),t.succeed(),p.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new b(n)}}var eo=D(require("fs-extra")),zl=D(require("path"));V();Se();function SF(){try{if(!eo.default.existsSync(Te))return null;let e=eo.default.readdirSync(Te).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:zl.default.join(Te,t),time:eo.default.statSync(zl.default.join(Te,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=eo.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(r){let o=r[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function Ul(){let e=SF();e&&console.info(`${Tn} Latest log: ${e}`),console.info(`${Tn} All logs: ${Te}`)}async function Fg(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Ul)}var rn=require("commander"),Wl=new rn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),Vl=new rn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),ql=new rn.Option("--skip-update-check","Skip checking for @webflow packages updates"),Gl=new rn.Option("--verbose","Display more information for debugging purposes."),ji=new rn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),to=new rn.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),Jl=e=>async(t,n)=>{let o={...n.parent?.opts()||{},...t};await e(o)};var TF="Import a library of Code Components into your Webflow Workspace.",AF="Bundle a library of Code Components for local development.",Eg=new Nt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),_g=new Nt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),Sg=new Nt.Option("--dev","Bundle in development mode for debugging purposes."),Tg=new Nt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),OF=new Nt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),IF=new Nt.Option("--public-path <path>","Set the public path for the bundle."),PF=new Nt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function Hl(e,t){return e.command(t).description(TF).addOption(ji).addOption(Eg).addOption(_g).addOption(Sg).addOption(Tg).action(Jl(Ll))}function Zl(e,t){return e.command(t).description(AF).addOption(OF).addOption(IF).addOption(PF).addOption(Eg).addOption(_g).addOption(Sg).addOption(Tg).action(Jl(Ml))}var Ag=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");Hl(t,"share"),Zl(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Ul)};var Og=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(ji).addOption(to).action(wl),Hl(t,"import"),Zl(t,"bundle")};var Oe=D(require("fs")),ke=D(require("path"));V();nt();var Bi="astro",Kl="cloud-scaffolds";var Ig="package.json",Pg="webflow.json",Rg="wf-placeholder-name",jg="CLOUD_MOUNT_PATH",Bg="gitignore";var Yl=async(e,t,n=Bi,r,o,i)=>{try{let s=r[n];if(!s)throw new Error(`Scaffold "${n}" not found`);for(let a of s)try{let l=ke.join(e,a.split(ke.join(Kl,n))[1]?.substring(1)||""),c=a.includes("next.config.ts"),u=a.includes("astro.config.mjs"),d=c||u;if(a.includes(Ig)||a.includes(Pg)){let m=(await Oe.promises.readFile(a,"utf8")).replace(Rg,e);await $i(l,m)}else if(d){let f=await Oe.promises.readFile(a,"utf8");await $i(l,f.replace(jg,t))}else if(ke.basename(l).toLowerCase()===Bg){let f=await Oe.promises.readFile(a,"utf8"),m=ke.join(ke.dirname(l),".gitignore");await $i(m,f)}else{let f=await Oe.promises.readFile(a);await $i(l,f)}}catch(l){p.error(`Error processing file ${a}: ${l}`)}if(o&&i)try{_o({siteId:o,apiToken:i,directory:e})}catch(a){p.error(`Error creating .env file: ${a}`)}}catch(s){throw p.error(`Error applying scaffold: ${s}`),s}},Xl=async()=>{try{let e={},t=ke.join(ke.resolve(__dirname),Kl);if(!Oe.existsSync(t))throw new Error(`Scaffolds directory not found at: ${t}`);let n=await Oe.promises.readdir(t);for(let r of n)try{let o=ke.join(t,r);e[r]=await $g(o)}catch(o){p.error(`Error processing scaffold ${r}: ${o}`)}return e}catch(e){throw p.error(`Error getting available scaffolds: ${e}`),e}},$g=async e=>{let t=[];try{if(!Oe.existsSync(e))throw new Error(`Directory not found: ${e}`);let n=await Oe.promises.readdir(e);for(let r of n)try{let o=ke.join(e,r);(await Oe.promises.stat(o)).isDirectory()?t.push(...await $g(o)):t.push(o)}catch(o){p.error(`Error processing path ${r}: ${o}`)}}catch(n){throw p.error(`Error reading directory ${e}: ${n}`),n}return t},$i=async(e,t)=>{try{await Oe.promises.mkdir(ke.dirname(e),{recursive:!0}),await Oe.promises.writeFile(e,t)}catch(n){throw p.error(`Error writing file ${e}: ${n}`),n}};nt();qe();var Lt=D(require("fs")),Ql=D(require("path"));V();var Ni={angular:{package_identifier:"@angular/ssr",build_command:"ng build",config_template_path:"templates/angular/angular.json.template",wrangler_template_path:"templates/angular/wrangler.angular.json",assets_path:"dist/browser",deployment_type:"ssr",entrypoint_path:"./server.js"},astro:{package_identifier:"@astrojs/cloudflare",build_command:"astro build",config_template_path:"templates/astro/astro.config.mjs.template",additional_config_files:["templates/astro/webflow-loader.ts"],wrangler_template_path:"templates/astro/wrangler.astro.json",assets_path:"dist",deployment_type:"ssr",assets_exclude_path:"_worker.js",entrypoint_path:"./index.js"},docusaurus:{package_identifier:"@docusaurus/core",build_command:"docusaurus build",config_template_path:"templates/docusaurus/docusaurus.config.js.template",wrangler_template_path:"templates/docusaurus/wrangler.docusaurus.json",assets_path:"build",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},gatsby:{package_identifier:"gatsby",build_command:"gatsby build",wrangler_template_path:"templates/gatsby/wrangler.gatsby.json",assets_path:"public",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},nextjs:{package_identifier:"@opennextjs/cloudflare",build_command:"opennextjs-cloudflare build",config_template_path:"templates/nextjs/next.config.ts.template",additional_config_files:["templates/nextjs/webflow-loader.ts"],wrangler_template_path:"templates/nextjs/wrangler.nextjs.json",assets_path:".open-next/assets",entrypoint_path:"./worker.js",deployment_type:"ssr"},nuxt:{package_identifier:"nuxt",build_command:"nuxt build",config_template_path:"templates/nuxt/nuxt.config.ts.template",wrangler_template_path:"templates/nuxt/wrangler.nuxt.json",assets_path:".output/public",entrypoint_path:"./index.js",deployment_type:"ssr"},qwik:{package_identifier:"@builder.io/qwik",build_command:"qwik build",config_template_path:"templates/qwik/vite.config.ts.template",wrangler_template_path:"templates/qwik/wrangler.qwik.json",assets_path:"dist",deployment_type:"ssr",entrypoint_path:"./_worker.js"},react:{package_identifier:"@vitejs/plugin-react",build_command:"tsc -b && vite build",config_template_path:"templates/react/vite.config.ts.template",wrangler_template_path:"templates/react/wrangler.react.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"},remix:{package_identifier:"@remix-run/cloudflare",build_command:"remix vite:build",config_template_path:"templates/remix/vite.config.ts.template",wrangler_template_path:"templates/remix/wrangler.remix.json",assets_path:"build/client",deployment_type:"ssr",entrypoint_path:"./server.js"},solid:{package_identifier:"@solidjs/start",build_command:"vinxi build",config_template_path:"templates/solid/app.config.ts.template",wrangler_template_path:"templates/solid/wrangler.solid.json",assets_path:".output/public",deployment_type:"ssr",entrypoint_path:"./index.js"},svelte:{package_identifier:"@sveltejs/vite-plugin-svelte",build_command:"vite build",config_template_path:"templates/svelte/vite.config.ts.template",wrangler_template_path:"templates/svelte/wrangler.svelte.json",assets_path:".svelte-kit/cloudflare",deployment_type:"ssr",entrypoint_path:"./_worker.js"},vue:{package_identifier:"@vitejs/plugin-vue",build_command:"vue-tsc --build && vite build",config_template_path:"templates/vue/vite.config.ts.template",wrangler_template_path:"templates/vue/wrangler.vue.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"}},Li=["nextjs","astro","remix"];async function Ng(e=process.cwd()){let t=Ql.join(e,"package.json"),n=Ql.join(e,"webflow.json");if(!Lt.existsSync(t))throw new Error("No package.json file found");let r=null;if(Lt.existsSync(n))try{let i=JSON.parse(Lt.readFileSync(n,"utf8")).cloud?.framework;if(i){if(!Ni[i]){let s=Object.keys(Ni).join(", ");throw new Error(`Framework '${i}' from webflow.json is not supported. Must be one of: ${s}`)}if(!Li.includes(i))throw new Error(`Framework '${i}' is not currently supported. Must be one of: ${Li.join(", ")}`);r=i,p.info(`Using framework type from webflow.json: ${r}`)}else throw new Error("webflow.json exists but doesn't contain valid framework information under the 'cloud' key")}catch(o){throw o instanceof SyntaxError?new Error("webflow.json contains invalid JSON"):o}if(!r)try{let o=JSON.parse(Lt.readFileSync(t,"utf8"));for(let s of Li){let l=Ni[s].package_identifier;if(o.dependencies?.[l]||o.devDependencies?.[l]){r=s;break}}if(!r)throw new Error(`Framework not detected or not supported. Only ${Li.join(", ")} are currently supported.`);p.info(`Detected framework: ${r}`),Lt.writeFileSync(n,JSON.stringify({cloud:{framework:r}},null,2))}catch(o){throw o instanceof SyntaxError?new Error("package.json contains invalid JSON"):o}return{framework:r,config:Ni[r]}}var P=D(require("fs")),M=D(require("path")),pr=require("child_process"),ay=D(require("tar"));var de=D(require("fs")),Fe=D(require("path"));var ee={};bc(ee,{BRAND:()=>iE,DIRTY:()=>on,EMPTY_PATH:()=>$F,INVALID:()=>B,NEVER:()=>WE,OK:()=>ve,ParseStatus:()=>ye,Schema:()=>q,ZodAny:()=>Ut,ZodArray:()=>wt,ZodBigInt:()=>an,ZodBoolean:()=>ln,ZodBranded:()=>ro,ZodCatch:()=>wn,ZodDate:()=>cn,ZodDefault:()=>bn,ZodDiscriminatedUnion:()=>Ui,ZodEffects:()=>ze,ZodEnum:()=>gn,ZodError:()=>xe,ZodFirstPartyTypeKind:()=>N,ZodFunction:()=>Vi,ZodIntersection:()=>fn,ZodIssueCode:()=>w,ZodLazy:()=>mn,ZodLiteral:()=>hn,ZodMap:()=>ar,ZodNaN:()=>cr,ZodNativeEnum:()=>yn,ZodNever:()=>Xe,ZodNull:()=>dn,ZodNullable:()=>ct,ZodNumber:()=>sn,ZodObject:()=>Ce,ZodOptional:()=>Le,ZodParsedType:()=>_,ZodPipeline:()=>oo,ZodPromise:()=>Wt,ZodReadonly:()=>Dn,ZodRecord:()=>Wi,ZodSchema:()=>q,ZodSet:()=>lr,ZodString:()=>zt,ZodSymbol:()=>ir,ZodTransformer:()=>ze,ZodTuple:()=>lt,ZodType:()=>q,ZodUndefined:()=>un,ZodUnion:()=>pn,ZodUnknown:()=>bt,ZodVoid:()=>sr,addIssueToContext:()=>k,any:()=>mE,array:()=>bE,bigint:()=>cE,boolean:()=>Zg,coerce:()=>UE,custom:()=>Gg,date:()=>uE,datetimeRegex:()=>Vg,defaultErrorMap:()=>gt,discriminatedUnion:()=>kE,effect:()=>RE,enum:()=>OE,function:()=>SE,getErrorMap:()=>nr,getParsedType:()=>at,instanceof:()=>aE,intersection:()=>xE,isAborted:()=>Mi,isAsync:()=>rr,isDirty:()=>zi,isValid:()=>Mt,late:()=>sE,lazy:()=>TE,literal:()=>AE,makeIssue:()=>no,map:()=>EE,nan:()=>lE,nativeEnum:()=>IE,never:()=>gE,null:()=>fE,nullable:()=>BE,number:()=>Hg,object:()=>wE,objectUtil:()=>ec,oboolean:()=>zE,onumber:()=>ME,optional:()=>jE,ostring:()=>LE,pipeline:()=>NE,preprocess:()=>$E,promise:()=>PE,quotelessJson:()=>RF,record:()=>FE,set:()=>_E,setErrorMap:()=>BF,strictObject:()=>DE,string:()=>Jg,symbol:()=>dE,transformer:()=>RE,tuple:()=>CE,undefined:()=>pE,union:()=>vE,unknown:()=>hE,util:()=>G,void:()=>yE});var G;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(G||(G={}));var ec;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ec||(ec={}));var _=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),at=e=>{switch(typeof e){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:_.object;default:return _.unknown}};var w=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),RF=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),xe=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};xe.create=e=>new xe(e);var jF=(e,t)=>{let n;switch(e.code){case w.invalid_type:e.received===_.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,G.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:n=`Unrecognized key(s) in object: ${G.joinValues(e.keys,", ")}`;break;case w.invalid_union:n="Invalid input";break;case w.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${G.joinValues(e.options)}`;break;case w.invalid_enum_value:n=`Invalid enum value. Expected ${G.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:n="Invalid function arguments";break;case w.invalid_return_type:n="Invalid function return type";break;case w.invalid_date:n="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:G.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case w.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case w.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case w.custom:n="Invalid input";break;case w.invalid_intersection_types:n="Intersection results could not be merged";break;case w.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:n="Number must be finite";break;default:n=t.defaultError,G.assertNever(e)}return{message:n}},gt=jF;var Lg=gt;function BF(e){Lg=e}function nr(){return Lg}var no=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},$F=[];function k(e,t){let n=nr(),r=no({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===gt?void 0:gt].filter(o=>!!o)});e.common.issues.push(r)}var ye=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return B;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return B;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},B=Object.freeze({status:"aborted"}),on=e=>({status:"dirty",value:e}),ve=e=>({status:"valid",value:e}),Mi=e=>e.status==="aborted",zi=e=>e.status==="dirty",Mt=e=>e.status==="valid",rr=e=>typeof Promise<"u"&&e instanceof Promise;var I;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(I||(I={}));var Me=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Mg=(e,t)=>{if(Mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new xe(e.common.issues);return this._error=n,this._error}}};function W(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}var q=class{get description(){return this._def.description}_getType(t){return at(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:at(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ye,ctx:{common:t.parent.common,data:t.data,parsedType:at(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(rr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Mg(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return Mt(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Mt(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(rr(o)?o:Promise.resolve(o));return Mg(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:w.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new ze({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Le.create(this,this._def)}nullable(){return ct.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wt.create(this)}promise(){return Wt.create(this,this._def)}or(t){return pn.create([this,t],this._def)}and(t){return fn.create(this,t,this._def)}transform(t){return new ze({...W(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new bn({...W(this._def),innerType:this,defaultValue:n,typeName:N.ZodDefault})}brand(){return new ro({typeName:N.ZodBranded,type:this,...W(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new wn({...W(this._def),innerType:this,catchValue:n,typeName:N.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return oo.create(this,t)}readonly(){return Dn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},NF=/^c[^\s-]{8,}$/i,LF=/^[0-9a-z]+$/,MF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zF=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,UF=/^[a-z0-9_-]{21}$/i,WF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VF=/^[-+]?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)?)??$/,qF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,GF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",tc,JF=/^(?:(?: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])$/,HF=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ZF=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,KF=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,XF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ug="((\\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])))",QF=new RegExp(`^${Ug}$`);function Wg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function eE(e){return new RegExp(`^${Wg(e)}$`)}function Vg(e){let t=`${Ug}T${Wg(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function tE(e,t){return!!((t==="v4"||!t)&&JF.test(e)||(t==="v6"||!t)&&ZF.test(e))}function nE(e,t){if(!WF.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function rE(e,t){return!!((t==="v4"||!t)&&HF.test(e)||(t==="v6"||!t)&&KF.test(e))}var zt=class e extends q{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_.string){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.string,received:i.parsedType}),B}let r=new ye,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?k(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&k(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")qF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"email",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")tc||(tc=new RegExp(GF,"u")),tc.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"emoji",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")zF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"uuid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")UF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"nanoid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")NF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cuid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")LF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cuid2",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")MF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"ulid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),k(o,{validation:"url",code:w.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"regex",code:w.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Vg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?QF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?eE(i).test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?VF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"duration",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?tE(t.data,i.version)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"ip",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?nE(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"jwt",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?rE(t.data,i.version)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cidr",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?YF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"base64",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?XF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"base64url",code:w.invalid_string,message:i.message}),r.dirty()):G.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:w.invalid_string,...I.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...I.errToObj(t)})}url(t){return this._addCheck({kind:"url",...I.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...I.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...I.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...I.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...I.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...I.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...I.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...I.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...I.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...I.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...I.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...I.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...I.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...I.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...I.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...I.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...I.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...I.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...I.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...I.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...I.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...I.errToObj(n)})}nonempty(t){return this.min(1,I.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};zt.create=e=>new zt({checks:[],typeName:N.ZodString,coerce:e?.coerce??!1,...W(e)});function oE(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var sn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_.number){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.number,received:i.parsedType}),B}let r,o=new ye;for(let i of this._def.checks)i.kind==="int"?G.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),k(r,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?oE(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_finite,message:i.message}),o.dirty()):G.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,I.toString(n))}gt(t,n){return this.setLimit("min",t,!1,I.toString(n))}lte(t,n){return this.setLimit("max",t,!0,I.toString(n))}lt(t,n){return this.setLimit("max",t,!1,I.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:I.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:I.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&G.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};sn.create=e=>new sn({checks:[],typeName:N.ZodNumber,coerce:e?.coerce||!1,...W(e)});var an=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_.bigint)return this._getInvalidInput(t);let r,o=new ye;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):G.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return k(n,{code:w.invalid_type,expected:_.bigint,received:n.parsedType}),B}gte(t,n){return this.setLimit("min",t,!0,I.toString(n))}gt(t,n){return this.setLimit("min",t,!1,I.toString(n))}lte(t,n){return this.setLimit("max",t,!0,I.toString(n))}lt(t,n){return this.setLimit("max",t,!1,I.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};an.create=e=>new an({checks:[],typeName:N.ZodBigInt,coerce:e?.coerce??!1,...W(e)});var ln=class extends q{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_.boolean){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.boolean,received:r.parsedType}),B}return ve(t.data)}};ln.create=e=>new ln({typeName:N.ZodBoolean,coerce:e?.coerce||!1,...W(e)});var cn=class e extends q{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_.date){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.date,received:i.parsedType}),B}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_date}),B}let r=new ye,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):G.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:I.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:I.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};cn.create=e=>new cn({checks:[],coerce:e?.coerce||!1,typeName:N.ZodDate,...W(e)});var ir=class extends q{_parse(t){if(this._getType(t)!==_.symbol){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.symbol,received:r.parsedType}),B}return ve(t.data)}};ir.create=e=>new ir({typeName:N.ZodSymbol,...W(e)});var un=class extends q{_parse(t){if(this._getType(t)!==_.undefined){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.undefined,received:r.parsedType}),B}return ve(t.data)}};un.create=e=>new un({typeName:N.ZodUndefined,...W(e)});var dn=class extends q{_parse(t){if(this._getType(t)!==_.null){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.null,received:r.parsedType}),B}return ve(t.data)}};dn.create=e=>new dn({typeName:N.ZodNull,...W(e)});var Ut=class extends q{constructor(){super(...arguments),this._any=!0}_parse(t){return ve(t.data)}};Ut.create=e=>new Ut({typeName:N.ZodAny,...W(e)});var bt=class extends q{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ve(t.data)}};bt.create=e=>new bt({typeName:N.ZodUnknown,...W(e)});var Xe=class extends q{_parse(t){let n=this._getOrReturnCtx(t);return k(n,{code:w.invalid_type,expected:_.never,received:n.parsedType}),B}};Xe.create=e=>new Xe({typeName:N.ZodNever,...W(e)});var sr=class extends q{_parse(t){if(this._getType(t)!==_.undefined){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.void,received:r.parsedType}),B}return ve(t.data)}};sr.create=e=>new sr({typeName:N.ZodVoid,...W(e)});var wt=class e extends q{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==_.array)return k(n,{code:w.invalid_type,expected:_.array,received:n.parsedType}),B;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(k(n,{code:s?w.too_big:w.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(k(n,{code:w.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(k(n,{code:w.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Me(n,s,n.path,a)))).then(s=>ye.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new Me(n,s,n.path,a)));return ye.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:I.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:I.toString(n)}})}nonempty(t){return this.min(1,t)}};wt.create=(e,t)=>new wt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...W(t)});function or(e){if(e instanceof Ce){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Le.create(or(r))}return new Ce({...e._def,shape:()=>t})}else return e instanceof wt?new wt({...e._def,type:or(e.element)}):e instanceof Le?Le.create(or(e.unwrap())):e instanceof ct?ct.create(or(e.unwrap())):e instanceof lt?lt.create(e.items.map(t=>or(t))):e}var Ce=class e extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=G.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_.object){let c=this._getOrReturnCtx(t);return k(c,{code:w.invalid_type,expected:_.object,received:c.parsedType}),B}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xe&&this._def.unknownKeys==="strip"))for(let c in o.data)s.includes(c)||a.push(c);let l=[];for(let c of s){let u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Me(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xe){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(k(o,{code:w.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Me(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>ye.mergeObjectSync(r,c)):ye.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:I.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:N.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let r of G.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let r of G.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}deepPartial(){return or(this)}partial(t){let n={};for(let r of G.objectKeys(this.shape)){let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let r of G.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Le;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return qg(G.objectKeys(this.shape))}};Ce.create=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strip",catchall:Xe.create(),typeName:N.ZodObject,...W(t)});Ce.strictCreate=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strict",catchall:Xe.create(),typeName:N.ZodObject,...W(t)});Ce.lazycreate=(e,t)=>new Ce({shape:e,unknownKeys:"strip",catchall:Xe.create(),typeName:N.ZodObject,...W(t)});var pn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new xe(a.ctx.common.issues));return k(n,{code:w.invalid_union,unionErrors:s}),B}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(l=>new xe(l));return k(n,{code:w.invalid_union,unionErrors:a}),B}}get options(){return this._def.options}};pn.create=(e,t)=>new pn({options:e,typeName:N.ZodUnion,...W(t)});var yt=e=>e instanceof mn?yt(e.schema):e instanceof ze?yt(e.innerType()):e instanceof hn?[e.value]:e instanceof gn?e.options:e instanceof yn?G.objectValues(e.enum):e instanceof bn?yt(e._def.innerType):e instanceof un?[void 0]:e instanceof dn?[null]:e instanceof Le?[void 0,...yt(e.unwrap())]:e instanceof ct?[null,...yt(e.unwrap())]:e instanceof ro||e instanceof Dn?yt(e.unwrap()):e instanceof wn?yt(e._def.innerType):[],Ui=class e extends q{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.object)return k(n,{code:w.invalid_type,expected:_.object,received:n.parsedType}),B;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(k(n,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=yt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:N.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...W(r)})}};function nc(e,t){let n=at(e),r=at(t);if(e===t)return{valid:!0,data:e};if(n===_.object&&r===_.object){let o=G.objectKeys(t),i=G.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let l=nc(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===_.array&&r===_.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],l=nc(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===_.date&&r===_.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var fn=class extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(Mi(i)||Mi(s))return B;let a=nc(i.value,s.value);return a.valid?((zi(i)||zi(s))&&n.dirty(),{status:n.value,value:a.data}):(k(r,{code:w.invalid_intersection_types}),B)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};fn.create=(e,t,n)=>new fn({left:e,right:t,typeName:N.ZodIntersection,...W(n)});var lt=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.array)return k(r,{code:w.invalid_type,expected:_.array,received:r.parsedType}),B;if(r.data.length<this._def.items.length)return k(r,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),B;!this._def.rest&&r.data.length>this._def.items.length&&(k(r,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new Me(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>ye.mergeArray(n,s)):ye.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};lt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lt({items:e,typeName:N.ZodTuple,rest:null,...W(t)})};var Wi=class e extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.object)return k(r,{code:w.invalid_type,expected:_.object,received:r.parsedType}),B;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new Me(r,a,r.path,a)),value:s._parse(new Me(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ye.mergeObjectAsync(n,o):ye.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof q?new e({keyType:t,valueType:n,typeName:N.ZodRecord,...W(r)}):new e({keyType:zt.create(),valueType:t,typeName:N.ZodRecord,...W(n)})}},ar=class extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.map)return k(r,{code:w.invalid_type,expected:_.map,received:r.parsedType}),B;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Me(r,a,r.path,[c,"key"])),value:i._parse(new Me(r,l,r.path,[c,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};ar.create=(e,t,n)=>new ar({valueType:t,keyType:e,typeName:N.ZodMap,...W(n)});var lr=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.set)return k(r,{code:w.invalid_type,expected:_.set,received:r.parsedType}),B;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(k(r,{code:w.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(k(r,{code:w.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let u of l){if(u.status==="aborted")return B;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}let a=[...r.data.values()].map((l,c)=>i._parse(new Me(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:I.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};lr.create=(e,t)=>new lr({valueType:e,minSize:null,maxSize:null,typeName:N.ZodSet,...W(t)});var Vi=class e extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.function)return k(n,{code:w.invalid_type,expected:_.function,received:n.parsedType}),B;function r(a,l){return no({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nr(),gt].filter(c=>!!c),issueData:{code:w.invalid_arguments,argumentsError:l}})}function o(a,l){return no({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nr(),gt].filter(c=>!!c),issueData:{code:w.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Wt){let a=this;return ve(async function(...l){let c=new xe([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw c.addIssue(o(d,m)),c})})}else{let a=this;return ve(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new xe([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new xe([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:lt.create(t).rest(bt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||lt.create([]).rest(bt.create()),returns:n||bt.create(),typeName:N.ZodFunction,...W(r)})}},mn=class extends q{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};mn.create=(e,t)=>new mn({getter:e,typeName:N.ZodLazy,...W(t)});var hn=class extends q{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return k(n,{received:n.data,code:w.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:t.data}}get value(){return this._def.value}};hn.create=(e,t)=>new hn({value:e,typeName:N.ZodLiteral,...W(t)});function qg(e,t){return new gn({values:e,typeName:N.ZodEnum,...W(t)})}var gn=class e extends q{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return k(n,{expected:G.joinValues(r),received:n.parsedType,code:w.invalid_type}),B}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return k(n,{received:n.data,code:w.invalid_enum_value,options:r}),B}return ve(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};gn.create=qg;var yn=class extends q{_parse(t){let n=G.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==_.string&&r.parsedType!==_.number){let o=G.objectValues(n);return k(r,{expected:G.joinValues(o),received:r.parsedType,code:w.invalid_type}),B}if(this._cache||(this._cache=new Set(G.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=G.objectValues(n);return k(r,{received:r.data,code:w.invalid_enum_value,options:o}),B}return ve(t.data)}get enum(){return this._def.values}};yn.create=(e,t)=>new yn({values:e,typeName:N.ZodNativeEnum,...W(t)});var Wt=class extends q{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.promise&&n.common.async===!1)return k(n,{code:w.invalid_type,expected:_.promise,received:n.parsedType}),B;let r=n.parsedType===_.promise?n.data:Promise.resolve(n.data);return ve(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Wt.create=(e,t)=>new Wt({type:e,typeName:N.ZodPromise,...W(t)});var ze=class extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{k(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return B;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?B:l.status==="dirty"?on(l.value):n.value==="dirty"?on(l.value):l});{if(n.value==="aborted")return B;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?B:a.status==="dirty"?on(a.value):n.value==="dirty"?on(a.value):a}}if(o.type==="refinement"){let s=a=>{let l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Mt(s))return B;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Mt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):B);G.assertNever(o)}};ze.create=(e,t,n)=>new ze({schema:e,typeName:N.ZodEffects,effect:t,...W(n)});ze.createWithPreprocess=(e,t,n)=>new ze({schema:t,effect:{type:"preprocess",transform:e},typeName:N.ZodEffects,...W(n)});var Le=class extends q{_parse(t){return this._getType(t)===_.undefined?ve(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Le.create=(e,t)=>new Le({innerType:e,typeName:N.ZodOptional,...W(t)});var ct=class extends q{_parse(t){return this._getType(t)===_.null?ve(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ct.create=(e,t)=>new ct({innerType:e,typeName:N.ZodNullable,...W(t)});var bn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===_.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};bn.create=(e,t)=>new bn({innerType:e,typeName:N.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...W(t)});var wn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xe(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};wn.create=(e,t)=>new wn({innerType:e,typeName:N.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...W(t)});var cr=class extends q{_parse(t){if(this._getType(t)!==_.nan){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.nan,received:r.parsedType}),B}return{status:"valid",value:t.data}}};cr.create=e=>new cr({typeName:N.ZodNaN,...W(e)});var iE=Symbol("zod_brand"),ro=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},oo=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?B:i.status==="dirty"?(n.dirty(),on(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?B:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:N.ZodPipeline})}},Dn=class extends q{_parse(t){let n=this._def.innerType._parse(t),r=o=>(Mt(o)&&(o.value=Object.freeze(o.value)),o);return rr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};Dn.create=(e,t)=>new Dn({innerType:e,typeName:N.ZodReadonly,...W(t)});function zg(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Gg(e,t={},n){return e?Ut.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=zg(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=zg(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Ut.create()}var sE={object:Ce.lazycreate},N;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(N||(N={}));var aE=(e,t={message:`Input not instance of ${e.name}`})=>Gg(n=>n instanceof e,t),Jg=zt.create,Hg=sn.create,lE=cr.create,cE=an.create,Zg=ln.create,uE=cn.create,dE=ir.create,pE=un.create,fE=dn.create,mE=Ut.create,hE=bt.create,gE=Xe.create,yE=sr.create,bE=wt.create,wE=Ce.create,DE=Ce.strictCreate,vE=pn.create,kE=Ui.create,xE=fn.create,CE=lt.create,FE=Wi.create,EE=ar.create,_E=lr.create,SE=Vi.create,TE=mn.create,AE=hn.create,OE=gn.create,IE=yn.create,PE=Wt.create,RE=ze.create,jE=Le.create,BE=ct.create,$E=ze.createWithPreprocess,NE=oo.create,LE=()=>Jg().optional(),ME=()=>Hg().optional(),zE=()=>Zg().optional(),UE={string:e=>zt.create({...e,coerce:!0}),number:e=>sn.create({...e,coerce:!0}),boolean:e=>ln.create({...e,coerce:!0}),bigint:e=>an.create({...e,coerce:!0}),date:e=>cn.create({...e,coerce:!0})};var WE=B;function qi(e,t=!1){let n=e.length,r=0,o="",i=0,s=16,a=0,l=0,c=0,u=0,d=0;function f(x,O){let J=0,$=0;for(;J<x||!O;){let T=e.charCodeAt(r);if(T>=48&&T<=57)$=$*16+T-48;else if(T>=65&&T<=70)$=$*16+T-65+10;else if(T>=97&&T<=102)$=$*16+T-97+10;else break;r++,J++}return J<x&&($=-1),$}function m(x){r=x,o="",i=0,s=16,d=0}function g(){let x=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&ur(e.charCodeAt(r)))for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;else return d=3,e.substring(x,r);let O=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&ur(e.charCodeAt(r))){for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;O=r}else d=3;return e.substring(x,O)}function v(){let x="",O=r;for(;;){if(r>=n){x+=e.substring(O,r),d=2;break}let J=e.charCodeAt(r);if(J===34){x+=e.substring(O,r),r++;break}if(J===92){if(x+=e.substring(O,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:x+='"';break;case 92:x+="\\";break;case 47:x+="/";break;case 98:x+="\b";break;case 102:x+="\f";break;case 110:x+=`
121
- `;break;case 114:x+="\r";break;case 116:x+=" ";break;case 117:let T=f(4,!0);T>=0?x+=String.fromCharCode(T):d=4;break;default:d=5}O=r;continue}if(J>=0&&J<=31)if(io(J)){x+=e.substring(O,r),d=2;break}else d=6;r++}return x}function F(){if(o="",d=0,i=r,l=a,u=c,r>=n)return i=n,s=17;let x=e.charCodeAt(r);if(rc(x)){do r++,o+=String.fromCharCode(x),x=e.charCodeAt(r);while(rc(x));return s=15}if(io(x))return r++,o+=String.fromCharCode(x),x===13&&e.charCodeAt(r)===10&&(r++,o+=`
122
- `),a++,c=r,s=14;switch(x){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=v(),s=10;case 47:let O=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!io(e.charCodeAt(r));)r++;return o=e.substring(O,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let J=n-1,$=!1;for(;r<J;){let T=e.charCodeAt(r);if(T===42&&e.charCodeAt(r+1)===47){r+=2,$=!0;break}r++,io(T)&&(T===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return $||(r++,d=1),o=e.substring(O,r),s=13}return o+=String.fromCharCode(x),r++,s=16;case 45:if(o+=String.fromCharCode(x),r++,r===n||!ur(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=g(),s=11;default:for(;r<n&&S(x);)r++,x=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(x),r++,s=16}}function S(x){if(rc(x)||io(x))return!1;switch(x){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function L(){let x;do x=F();while(x>=12&&x<=15);return x}return{setPosition:m,getPosition:()=>r,scan:t?L:F,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-u,getTokenError:()=>d}}function rc(e){return e===32||e===9}function io(e){return e===10||e===13}function ur(e){return e>=48&&e<=57}var Kg;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Kg||(Kg={}));var qE=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),dr=200,GE={" ":{"\n":new Array(dr).fill(0).map((e,t)=>`
122
+ `,f),"")}`)),t.succeed(),t=p.spinner("Generating library bundle");let{outputFiles:u,outputVolume:d}=await Ei({libraryIdentifier:r,renderer:n.renderer,framework:n.framework,publicPath:Bt(e.publicPath||AF),sourceVolumes:[i],componentsFiles:o,componentsOptions:c,debugBundler:e?.debugBundler,dev:e?.dev,overrideConfig:s,failOnWarnings:!e.force,bundler:e.bundler});t.succeed(),t=p.spinner("Writing to disk"),u.forEach(([f,m])=>{let g=(0,tr.join)(`/${m}`,`${f.name}`),v=Zr(d.readFileSync(g,"utf8").toString(),g,{bundleEnvironment:m}),F=(0,tr.join)(process.cwd(),e.outputPath||TF);Ri.default.existsSync((0,tr.join)(F,`${m}`))||Ri.default.mkdirSync((0,tr.join)(F,`${m}`),{recursive:!0}),Ri.default.writeFileSync((0,tr.join)(F,m,f.name),v.value.toString())}),t.succeed(),p.success("Code Library bundled successfully!")}catch(n){throw t?.fail(),new b(n)}}var eo=D(require("fs-extra")),Wl=D(require("path"));V();Se();function OF(){try{if(!eo.default.existsSync(Te))return null;let e=eo.default.readdirSync(Te).filter(t=>t.endsWith(".log")).map(t=>({name:t,path:Wl.default.join(Te,t),time:eo.default.statSync(Wl.default.join(Te,t)).mtime.getTime()})).sort((t,n)=>n.time-t.time);if(e.length===0)return null;for(let t of e)try{let r=eo.default.readFileSync(t.path,"utf8").match(/Command: (.+)/);if(r){let o=r[1];if(!/^(log|library\s+log)(\s|$)/.test(o))return t.path}}catch{continue}return null}catch{return null}}async function Ul(){let e=OF();e&&console.info(`${Tn} Latest log: ${e}`),console.info(`${Tn} All logs: ${Te}`)}async function _g(e){e.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Ul)}var rn=require("commander"),Vl=new rn.Option("--no-input","Avoid prompting or doing anything interactive. Use this for CI/CD pipelines."),ql=new rn.Option("--manifest <path>","Path to a manifest.json file or directory containing webflow.json. Default: ./webflow.json"),Gl=new rn.Option("--skip-update-check","Skip checking for @webflow packages updates"),Jl=new rn.Option("--verbose","Display more information for debugging purposes."),ji=new rn.Option("--api-token <token>","API token. Default: value set in WEBFLOW_API_TOKEN env variable."),to=new rn.Option("-s, --site <site-id>","Site ID. Default: value set in webflow.json config."),Hl=e=>async(t,n)=>{let o={...n.parent?.opts()||{},...t};await e(o)};var IF="Import a library of Code Components into your Webflow Workspace.",PF="Bundle a library of Code Components for local development.",Sg=new Nt.Option("-f, --force","Force the bundler to finish compiling, even if there are warnings or type errors."),Tg=new Nt.Option("--debug-bundler","Display final bundler configurations for debugging purposes."),Ag=new Nt.Option("--dev","Bundle in development mode for debugging purposes."),Og=new Nt.Option("--bundler <engine>","Bundler to use: webpack or rspack (experimental). Default: webpack").choices(["webpack","rspack"]).default("webpack").hideHelp(),RF=new Nt.Option("--library-id <id>","Set the library identifier to use for the bundle.").hideHelp(),jF=new Nt.Option("--public-path <path>","Set the public path for the bundle."),BF=new Nt.Option("--output-path <path>","Override the output path for the bundle. Default is './dist'");function Zl(e,t){return e.command(t).description(IF).addOption(ji).addOption(Sg).addOption(Tg).addOption(Ag).addOption(Og).action(Hl(Ml))}function Kl(e,t){return e.command(t).description(PF).addOption(RF).addOption(jF).addOption(BF).addOption(Sg).addOption(Tg).addOption(Ag).addOption(Og).action(Hl(zl))}var Ig=e=>{let t=e.command("library").description("CLI for managing your Webflow libraries of Code Components.");Zl(t,"share"),Kl(t,"bundle"),t.command("log").description("Display the logs directory and path to the latest log file, if available.").action(Ul)};var Pg=e=>{let t=e.command("devlink").description("CLI for managing your Webflow Components.");t.command("sync").description("Sync your Webflow components to your filesystem.").argument("[components...]","A list of components to sync. If none is provided, all components will be synced.").addOption(ji).addOption(to).action(wl),Zl(t,"import"),Kl(t,"bundle")};var Oe=D(require("fs")),ke=D(require("path"));V();nt();var Bi="astro",Yl="cloud-scaffolds";var Rg="package.json",jg="webflow.json",Bg="wf-placeholder-name",$g="CLOUD_MOUNT_PATH",Ng="gitignore";var Xl=async(e,t,n=Bi,r,o,i)=>{try{let s=r[n];if(!s)throw new Error(`Scaffold "${n}" not found`);for(let a of s)try{let l=ke.join(e,a.split(ke.join(Yl,n))[1]?.substring(1)||""),c=a.includes("next.config.ts"),u=a.includes("astro.config.mjs"),d=c||u;if(a.includes(Rg)||a.includes(jg)){let m=(await Oe.promises.readFile(a,"utf8")).replace(Bg,e);await $i(l,m)}else if(d){let f=await Oe.promises.readFile(a,"utf8");await $i(l,f.replace($g,t))}else if(ke.basename(l).toLowerCase()===Ng){let f=await Oe.promises.readFile(a,"utf8"),m=ke.join(ke.dirname(l),".gitignore");await $i(m,f)}else{let f=await Oe.promises.readFile(a);await $i(l,f)}}catch(l){p.error(`Error processing file ${a}: ${l}`)}if(o&&i)try{_o({siteId:o,apiToken:i,directory:e})}catch(a){p.error(`Error creating .env file: ${a}`)}}catch(s){throw p.error(`Error applying scaffold: ${s}`),s}},Ql=async()=>{try{let e={},t=ke.join(ke.resolve(__dirname),Yl);if(!Oe.existsSync(t))throw new Error(`Scaffolds directory not found at: ${t}`);let n=await Oe.promises.readdir(t);for(let r of n)try{let o=ke.join(t,r);e[r]=await Lg(o)}catch(o){p.error(`Error processing scaffold ${r}: ${o}`)}return e}catch(e){throw p.error(`Error getting available scaffolds: ${e}`),e}},Lg=async e=>{let t=[];try{if(!Oe.existsSync(e))throw new Error(`Directory not found: ${e}`);let n=await Oe.promises.readdir(e);for(let r of n)try{let o=ke.join(e,r);(await Oe.promises.stat(o)).isDirectory()?t.push(...await Lg(o)):t.push(o)}catch(o){p.error(`Error processing path ${r}: ${o}`)}}catch(n){throw p.error(`Error reading directory ${e}: ${n}`),n}return t},$i=async(e,t)=>{try{await Oe.promises.mkdir(ke.dirname(e),{recursive:!0}),await Oe.promises.writeFile(e,t)}catch(n){throw p.error(`Error writing file ${e}: ${n}`),n}};nt();qe();var Lt=D(require("fs")),ec=D(require("path"));V();var Ni={angular:{package_identifier:"@angular/ssr",build_command:"ng build",config_template_path:"templates/angular/angular.json.template",wrangler_template_path:"templates/angular/wrangler.angular.json",assets_path:"dist/browser",deployment_type:"ssr",entrypoint_path:"./server.js"},astro:{package_identifier:"@astrojs/cloudflare",build_command:"astro build",config_template_path:"templates/astro/astro.config.mjs.template",additional_config_files:["templates/astro/webflow-loader.ts"],wrangler_template_path:"templates/astro/wrangler.astro.json",assets_path:"dist",deployment_type:"ssr",assets_exclude_path:"_worker.js",entrypoint_path:"./index.js"},docusaurus:{package_identifier:"@docusaurus/core",build_command:"docusaurus build",config_template_path:"templates/docusaurus/docusaurus.config.js.template",wrangler_template_path:"templates/docusaurus/wrangler.docusaurus.json",assets_path:"build",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},gatsby:{package_identifier:"gatsby",build_command:"gatsby build",wrangler_template_path:"templates/gatsby/wrangler.gatsby.json",assets_path:"public",deployment_type:"ssg",entrypoint_path:"./no-op-worker.js"},nextjs:{package_identifier:"@opennextjs/cloudflare",build_command:"opennextjs-cloudflare build",config_template_path:"templates/nextjs/next.config.ts.template",additional_config_files:["templates/nextjs/webflow-loader.ts"],wrangler_template_path:"templates/nextjs/wrangler.nextjs.json",assets_path:".open-next/assets",entrypoint_path:"./worker.js",deployment_type:"ssr"},nuxt:{package_identifier:"nuxt",build_command:"nuxt build",config_template_path:"templates/nuxt/nuxt.config.ts.template",wrangler_template_path:"templates/nuxt/wrangler.nuxt.json",assets_path:".output/public",entrypoint_path:"./index.js",deployment_type:"ssr"},qwik:{package_identifier:"@builder.io/qwik",build_command:"qwik build",config_template_path:"templates/qwik/vite.config.ts.template",wrangler_template_path:"templates/qwik/wrangler.qwik.json",assets_path:"dist",deployment_type:"ssr",entrypoint_path:"./_worker.js"},react:{package_identifier:"@vitejs/plugin-react",build_command:"tsc -b && vite build",config_template_path:"templates/react/vite.config.ts.template",wrangler_template_path:"templates/react/wrangler.react.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"},remix:{package_identifier:"@remix-run/cloudflare",build_command:"remix vite:build",config_template_path:"templates/remix/vite.config.ts.template",wrangler_template_path:"templates/remix/wrangler.remix.json",assets_path:"build/client",deployment_type:"ssr",entrypoint_path:"./server.js"},solid:{package_identifier:"@solidjs/start",build_command:"vinxi build",config_template_path:"templates/solid/app.config.ts.template",wrangler_template_path:"templates/solid/wrangler.solid.json",assets_path:".output/public",deployment_type:"ssr",entrypoint_path:"./index.js"},svelte:{package_identifier:"@sveltejs/vite-plugin-svelte",build_command:"vite build",config_template_path:"templates/svelte/vite.config.ts.template",wrangler_template_path:"templates/svelte/wrangler.svelte.json",assets_path:".svelte-kit/cloudflare",deployment_type:"ssr",entrypoint_path:"./_worker.js"},vue:{package_identifier:"@vitejs/plugin-vue",build_command:"vue-tsc --build && vite build",config_template_path:"templates/vue/vite.config.ts.template",wrangler_template_path:"templates/vue/wrangler.vue.json",assets_path:"dist",deployment_type:"spa",entrypoint_path:"./index.js"}},Li=["nextjs","astro","remix"];async function Mg(e=process.cwd()){let t=ec.join(e,"package.json"),n=ec.join(e,"webflow.json");if(!Lt.existsSync(t))throw new Error("No package.json file found");let r=null;if(Lt.existsSync(n))try{let i=JSON.parse(Lt.readFileSync(n,"utf8")).cloud?.framework;if(i){if(!Ni[i]){let s=Object.keys(Ni).join(", ");throw new Error(`Framework '${i}' from webflow.json is not supported. Must be one of: ${s}`)}if(!Li.includes(i))throw new Error(`Framework '${i}' is not currently supported. Must be one of: ${Li.join(", ")}`);r=i,p.info(`Using framework type from webflow.json: ${r}`)}else throw new Error("webflow.json exists but doesn't contain valid framework information under the 'cloud' key")}catch(o){throw o instanceof SyntaxError?new Error("webflow.json contains invalid JSON"):o}if(!r)try{let o=JSON.parse(Lt.readFileSync(t,"utf8"));for(let s of Li){let l=Ni[s].package_identifier;if(o.dependencies?.[l]||o.devDependencies?.[l]){r=s;break}}if(!r)throw new Error(`Framework not detected or not supported. Only ${Li.join(", ")} are currently supported.`);p.info(`Detected framework: ${r}`),Lt.writeFileSync(n,JSON.stringify({cloud:{framework:r}},null,2))}catch(o){throw o instanceof SyntaxError?new Error("package.json contains invalid JSON"):o}return{framework:r,config:Ni[r]}}var P=D(require("fs")),M=D(require("path")),pr=require("child_process"),cy=D(require("tar"));var de=D(require("fs")),Fe=D(require("path"));var ee={};wc(ee,{BRAND:()=>lE,DIRTY:()=>on,EMPTY_PATH:()=>MF,INVALID:()=>B,NEVER:()=>GE,OK:()=>ve,ParseStatus:()=>ye,Schema:()=>q,ZodAny:()=>Wt,ZodArray:()=>wt,ZodBigInt:()=>an,ZodBoolean:()=>ln,ZodBranded:()=>ro,ZodCatch:()=>wn,ZodDate:()=>cn,ZodDefault:()=>bn,ZodDiscriminatedUnion:()=>Wi,ZodEffects:()=>ze,ZodEnum:()=>gn,ZodError:()=>xe,ZodFirstPartyTypeKind:()=>N,ZodFunction:()=>Vi,ZodIntersection:()=>fn,ZodIssueCode:()=>w,ZodLazy:()=>mn,ZodLiteral:()=>hn,ZodMap:()=>ar,ZodNaN:()=>cr,ZodNativeEnum:()=>yn,ZodNever:()=>Xe,ZodNull:()=>dn,ZodNullable:()=>ct,ZodNumber:()=>sn,ZodObject:()=>Ce,ZodOptional:()=>Le,ZodParsedType:()=>_,ZodPipeline:()=>oo,ZodPromise:()=>Ut,ZodReadonly:()=>Dn,ZodRecord:()=>Ui,ZodSchema:()=>q,ZodSet:()=>lr,ZodString:()=>zt,ZodSymbol:()=>ir,ZodTransformer:()=>ze,ZodTuple:()=>lt,ZodType:()=>q,ZodUndefined:()=>un,ZodUnion:()=>pn,ZodUnknown:()=>bt,ZodVoid:()=>sr,addIssueToContext:()=>k,any:()=>yE,array:()=>vE,bigint:()=>pE,boolean:()=>Yg,coerce:()=>qE,custom:()=>Hg,date:()=>fE,datetimeRegex:()=>Gg,defaultErrorMap:()=>gt,discriminatedUnion:()=>FE,effect:()=>$E,enum:()=>RE,function:()=>OE,getErrorMap:()=>nr,getParsedType:()=>at,instanceof:()=>uE,intersection:()=>EE,isAborted:()=>Mi,isAsync:()=>rr,isDirty:()=>zi,isValid:()=>Mt,late:()=>cE,lazy:()=>IE,literal:()=>PE,makeIssue:()=>no,map:()=>TE,nan:()=>dE,nativeEnum:()=>jE,never:()=>wE,null:()=>gE,nullable:()=>LE,number:()=>Kg,object:()=>kE,objectUtil:()=>tc,oboolean:()=>VE,onumber:()=>UE,optional:()=>NE,ostring:()=>WE,pipeline:()=>zE,preprocess:()=>ME,promise:()=>BE,quotelessJson:()=>$F,record:()=>SE,set:()=>AE,setErrorMap:()=>LF,strictObject:()=>xE,string:()=>Zg,symbol:()=>mE,transformer:()=>$E,tuple:()=>_E,undefined:()=>hE,union:()=>CE,unknown:()=>bE,util:()=>G,void:()=>DE});var G;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(G||(G={}));var tc;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(tc||(tc={}));var _=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),at=e=>{switch(typeof e){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:_.object;default:return _.unknown}};var w=G.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),$F=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),xe=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){let c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(t(o))}else r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};xe.create=e=>new xe(e);var NF=(e,t)=>{let n;switch(e.code){case w.invalid_type:e.received===_.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case w.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,G.jsonStringifyReplacer)}`;break;case w.unrecognized_keys:n=`Unrecognized key(s) in object: ${G.joinValues(e.keys,", ")}`;break;case w.invalid_union:n="Invalid input";break;case w.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${G.joinValues(e.options)}`;break;case w.invalid_enum_value:n=`Invalid enum value. Expected ${G.joinValues(e.options)}, received '${e.received}'`;break;case w.invalid_arguments:n="Invalid function arguments";break;case w.invalid_return_type:n="Invalid function return type";break;case w.invalid_date:n="Invalid date";break;case w.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:G.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case w.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case w.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case w.custom:n="Invalid input";break;case w.invalid_intersection_types:n="Intersection results could not be merged";break;case w.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case w.not_finite:n="Number must be finite";break;default:n=t.defaultError,G.assertNever(e)}return{message:n}},gt=NF;var zg=gt;function LF(e){zg=e}function nr(){return zg}var no=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",l=r.filter(c=>!!c).slice().reverse();for(let c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},MF=[];function k(e,t){let n=nr(),r=no({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===gt?void 0:gt].filter(o=>!!o)});e.common.issues.push(r)}var ye=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return B;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return B;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},B=Object.freeze({status:"aborted"}),on=e=>({status:"dirty",value:e}),ve=e=>({status:"valid",value:e}),Mi=e=>e.status==="aborted",zi=e=>e.status==="dirty",Mt=e=>e.status==="valid",rr=e=>typeof Promise<"u"&&e instanceof Promise;var I;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(I||(I={}));var Me=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wg=(e,t)=>{if(Mt(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new xe(e.common.issues);return this._error=n,this._error}}};function U(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}var q=class{get description(){return this._def.description}_getType(t){return at(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:at(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ye,ctx:{common:t.parent.common,data:t.data,parsedType:at(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(rr(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){let r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Wg(r,o)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)};if(!this["~standard"].async)try{let r=this._parseSync({data:t,path:[],parent:n});return Mt(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Mt(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:at(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(rr(o)?o:Promise.resolve(o));return Wg(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:w.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new ze({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Le.create(this,this._def)}nullable(){return ct.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wt.create(this)}promise(){return Ut.create(this,this._def)}or(t){return pn.create([this,t],this._def)}and(t){return fn.create(this,t,this._def)}transform(t){return new ze({...U(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new bn({...U(this._def),innerType:this,defaultValue:n,typeName:N.ZodDefault})}brand(){return new ro({typeName:N.ZodBranded,type:this,...U(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new wn({...U(this._def),innerType:this,catchValue:n,typeName:N.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return oo.create(this,t)}readonly(){return Dn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zF=/^c[^\s-]{8,}$/i,WF=/^[0-9a-z]+$/,UF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,VF=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,qF=/^[a-z0-9_-]{21}$/i,GF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,JF=/^[-+]?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)?)??$/,HF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ZF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",nc,KF=/^(?:(?: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])$/,YF=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,XF=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,QF=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Vg="((\\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])))",nE=new RegExp(`^${Vg}$`);function qg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function rE(e){return new RegExp(`^${qg(e)}$`)}function Gg(e){let t=`${Vg}T${qg(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function oE(e,t){return!!((t==="v4"||!t)&&KF.test(e)||(t==="v6"||!t)&&XF.test(e))}function iE(e,t){if(!GF.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function sE(e,t){return!!((t==="v4"||!t)&&YF.test(e)||(t==="v6"||!t)&&QF.test(e))}var zt=class e extends q{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_.string){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.string,received:i.parsedType}),B}let r=new ye,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?k(o,{code:w.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&k(o,{code:w.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")HF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"email",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")nc||(nc=new RegExp(ZF,"u")),nc.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"emoji",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")VF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"uuid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")qF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"nanoid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")zF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cuid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")WF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cuid2",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")UF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"ulid",code:w.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),k(o,{validation:"url",code:w.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"regex",code:w.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Gg(i).test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?nE.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?rE(i).test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{code:w.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?JF.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"duration",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?oE(t.data,i.version)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"ip",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?iE(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"jwt",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?sE(t.data,i.version)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"cidr",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?eE.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"base64",code:w.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?tE.test(t.data)||(o=this._getOrReturnCtx(t,o),k(o,{validation:"base64url",code:w.invalid_string,message:i.message}),r.dirty()):G.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:w.invalid_string,...I.errToObj(r)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...I.errToObj(t)})}url(t){return this._addCheck({kind:"url",...I.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...I.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...I.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...I.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...I.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...I.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...I.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...I.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...I.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...I.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...I.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...I.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...I.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...I.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...I.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...I.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...I.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...I.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...I.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...I.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...I.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...I.errToObj(n)})}nonempty(t){return this.min(1,I.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};zt.create=e=>new zt({checks:[],typeName:N.ZodString,coerce:e?.coerce??!1,...U(e)});function aE(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}var sn=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_.number){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.number,received:i.parsedType}),B}let r,o=new ye;for(let i of this._def.checks)i.kind==="int"?G.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),k(r,{code:w.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?aE(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_finite,message:i.message}),o.dirty()):G.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,I.toString(n))}gt(t,n){return this.setLimit("min",t,!1,I.toString(n))}lte(t,n){return this.setLimit("max",t,!0,I.toString(n))}lt(t,n){return this.setLimit("max",t,!1,I.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:I.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:I.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&G.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};sn.create=e=>new sn({checks:[],typeName:N.ZodNumber,coerce:e?.coerce||!1,...U(e)});var an=class e extends q{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_.bigint)return this._getInvalidInput(t);let r,o=new ye;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),k(r,{code:w.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):G.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return k(n,{code:w.invalid_type,expected:_.bigint,received:n.parsedType}),B}gte(t,n){return this.setLimit("min",t,!0,I.toString(n))}gt(t,n){return this.setLimit("min",t,!1,I.toString(n))}lte(t,n){return this.setLimit("max",t,!0,I.toString(n))}lt(t,n){return this.setLimit("max",t,!1,I.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:I.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:I.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};an.create=e=>new an({checks:[],typeName:N.ZodBigInt,coerce:e?.coerce??!1,...U(e)});var ln=class extends q{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_.boolean){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.boolean,received:r.parsedType}),B}return ve(t.data)}};ln.create=e=>new ln({typeName:N.ZodBoolean,coerce:e?.coerce||!1,...U(e)});var cn=class e extends q{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_.date){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_type,expected:_.date,received:i.parsedType}),B}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return k(i,{code:w.invalid_date}),B}let r=new ye,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),k(o,{code:w.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):G.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:I.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:I.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};cn.create=e=>new cn({checks:[],coerce:e?.coerce||!1,typeName:N.ZodDate,...U(e)});var ir=class extends q{_parse(t){if(this._getType(t)!==_.symbol){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.symbol,received:r.parsedType}),B}return ve(t.data)}};ir.create=e=>new ir({typeName:N.ZodSymbol,...U(e)});var un=class extends q{_parse(t){if(this._getType(t)!==_.undefined){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.undefined,received:r.parsedType}),B}return ve(t.data)}};un.create=e=>new un({typeName:N.ZodUndefined,...U(e)});var dn=class extends q{_parse(t){if(this._getType(t)!==_.null){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.null,received:r.parsedType}),B}return ve(t.data)}};dn.create=e=>new dn({typeName:N.ZodNull,...U(e)});var Wt=class extends q{constructor(){super(...arguments),this._any=!0}_parse(t){return ve(t.data)}};Wt.create=e=>new Wt({typeName:N.ZodAny,...U(e)});var bt=class extends q{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ve(t.data)}};bt.create=e=>new bt({typeName:N.ZodUnknown,...U(e)});var Xe=class extends q{_parse(t){let n=this._getOrReturnCtx(t);return k(n,{code:w.invalid_type,expected:_.never,received:n.parsedType}),B}};Xe.create=e=>new Xe({typeName:N.ZodNever,...U(e)});var sr=class extends q{_parse(t){if(this._getType(t)!==_.undefined){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.void,received:r.parsedType}),B}return ve(t.data)}};sr.create=e=>new sr({typeName:N.ZodVoid,...U(e)});var wt=class e extends q{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==_.array)return k(n,{code:w.invalid_type,expected:_.array,received:n.parsedType}),B;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(k(n,{code:s?w.too_big:w.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(k(n,{code:w.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(k(n,{code:w.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Me(n,s,n.path,a)))).then(s=>ye.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new Me(n,s,n.path,a)));return ye.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:I.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:I.toString(n)}})}nonempty(t){return this.min(1,t)}};wt.create=(e,t)=>new wt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...U(t)});function or(e){if(e instanceof Ce){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Le.create(or(r))}return new Ce({...e._def,shape:()=>t})}else return e instanceof wt?new wt({...e._def,type:or(e.element)}):e instanceof Le?Le.create(or(e.unwrap())):e instanceof ct?ct.create(or(e.unwrap())):e instanceof lt?lt.create(e.items.map(t=>or(t))):e}var Ce=class e extends q{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=G.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_.object){let c=this._getOrReturnCtx(t);return k(c,{code:w.invalid_type,expected:_.object,received:c.parsedType}),B}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xe&&this._def.unknownKeys==="strip"))for(let c in o.data)s.includes(c)||a.push(c);let l=[];for(let c of s){let u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Me(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xe){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(k(o,{code:w.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Me(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>ye.mergeObjectSync(r,c)):ye.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return I.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{let o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:I.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:N.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let r of G.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let r of G.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new e({...this._def,shape:()=>n})}deepPartial(){return or(this)}partial(t){let n={};for(let r of G.objectKeys(this.shape)){let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let r of G.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Le;)i=i._def.innerType;n[r]=i}return new e({...this._def,shape:()=>n})}keyof(){return Jg(G.objectKeys(this.shape))}};Ce.create=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strip",catchall:Xe.create(),typeName:N.ZodObject,...U(t)});Ce.strictCreate=(e,t)=>new Ce({shape:()=>e,unknownKeys:"strict",catchall:Xe.create(),typeName:N.ZodObject,...U(t)});Ce.lazycreate=(e,t)=>new Ce({shape:e,unknownKeys:"strip",catchall:Xe.create(),typeName:N.ZodObject,...U(t)});var pn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new xe(a.ctx.common.issues));return k(n,{code:w.invalid_union,unionErrors:s}),B}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(l=>new xe(l));return k(n,{code:w.invalid_union,unionErrors:a}),B}}get options(){return this._def.options}};pn.create=(e,t)=>new pn({options:e,typeName:N.ZodUnion,...U(t)});var yt=e=>e instanceof mn?yt(e.schema):e instanceof ze?yt(e.innerType()):e instanceof hn?[e.value]:e instanceof gn?e.options:e instanceof yn?G.objectValues(e.enum):e instanceof bn?yt(e._def.innerType):e instanceof un?[void 0]:e instanceof dn?[null]:e instanceof Le?[void 0,...yt(e.unwrap())]:e instanceof ct?[null,...yt(e.unwrap())]:e instanceof ro||e instanceof Dn?yt(e.unwrap()):e instanceof wn?yt(e._def.innerType):[],Wi=class e extends q{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.object)return k(n,{code:w.invalid_type,expected:_.object,received:n.parsedType}),B;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(k(n,{code:w.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),B)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=yt(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:N.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...U(r)})}};function rc(e,t){let n=at(e),r=at(t);if(e===t)return{valid:!0,data:e};if(n===_.object&&r===_.object){let o=G.objectKeys(t),i=G.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let l=rc(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===_.array&&r===_.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],l=rc(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===_.date&&r===_.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var fn=class extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(Mi(i)||Mi(s))return B;let a=rc(i.value,s.value);return a.valid?((zi(i)||zi(s))&&n.dirty(),{status:n.value,value:a.data}):(k(r,{code:w.invalid_intersection_types}),B)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};fn.create=(e,t,n)=>new fn({left:e,right:t,typeName:N.ZodIntersection,...U(n)});var lt=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.array)return k(r,{code:w.invalid_type,expected:_.array,received:r.parsedType}),B;if(r.data.length<this._def.items.length)return k(r,{code:w.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),B;!this._def.rest&&r.data.length>this._def.items.length&&(k(r,{code:w.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let l=this._def.items[a]||this._def.rest;return l?l._parse(new Me(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>ye.mergeArray(n,s)):ye.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};lt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lt({items:e,typeName:N.ZodTuple,rest:null,...U(t)})};var Ui=class e extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.object)return k(r,{code:w.invalid_type,expected:_.object,received:r.parsedType}),B;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new Me(r,a,r.path,a)),value:s._parse(new Me(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?ye.mergeObjectAsync(n,o):ye.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof q?new e({keyType:t,valueType:n,typeName:N.ZodRecord,...U(r)}):new e({keyType:zt.create(),valueType:t,typeName:N.ZodRecord,...U(n)})}},ar=class extends q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.map)return k(r,{code:w.invalid_type,expected:_.map,received:r.parsedType}),B;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Me(r,a,r.path,[c,"key"])),value:i._parse(new Me(r,l,r.path,[c,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let l of s){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let l of s){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return B;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}};ar.create=(e,t,n)=>new ar({valueType:t,keyType:e,typeName:N.ZodMap,...U(n)});var lr=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_.set)return k(r,{code:w.invalid_type,expected:_.set,received:r.parsedType}),B;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(k(r,{code:w.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(k(r,{code:w.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let c=new Set;for(let u of l){if(u.status==="aborted")return B;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}let a=[...r.data.values()].map((l,c)=>i._parse(new Me(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new e({...this._def,minSize:{value:t,message:I.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:I.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};lr.create=(e,t)=>new lr({valueType:e,minSize:null,maxSize:null,typeName:N.ZodSet,...U(t)});var Vi=class e extends q{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.function)return k(n,{code:w.invalid_type,expected:_.function,received:n.parsedType}),B;function r(a,l){return no({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nr(),gt].filter(c=>!!c),issueData:{code:w.invalid_arguments,argumentsError:l}})}function o(a,l){return no({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,nr(),gt].filter(c=>!!c),issueData:{code:w.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Ut){let a=this;return ve(async function(...l){let c=new xe([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw c.addIssue(o(d,m)),c})})}else{let a=this;return ve(function(...l){let c=a._def.args.safeParse(l,i);if(!c.success)throw new xe([r(l,c.error)]);let u=Reflect.apply(s,this,c.data),d=a._def.returns.safeParse(u,i);if(!d.success)throw new xe([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:lt.create(t).rest(bt.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||lt.create([]).rest(bt.create()),returns:n||bt.create(),typeName:N.ZodFunction,...U(r)})}},mn=class extends q{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};mn.create=(e,t)=>new mn({getter:e,typeName:N.ZodLazy,...U(t)});var hn=class extends q{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return k(n,{received:n.data,code:w.invalid_literal,expected:this._def.value}),B}return{status:"valid",value:t.data}}get value(){return this._def.value}};hn.create=(e,t)=>new hn({value:e,typeName:N.ZodLiteral,...U(t)});function Jg(e,t){return new gn({values:e,typeName:N.ZodEnum,...U(t)})}var gn=class e extends q{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return k(n,{expected:G.joinValues(r),received:n.parsedType,code:w.invalid_type}),B}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),r=this._def.values;return k(n,{received:n.data,code:w.invalid_enum_value,options:r}),B}return ve(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}};gn.create=Jg;var yn=class extends q{_parse(t){let n=G.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==_.string&&r.parsedType!==_.number){let o=G.objectValues(n);return k(r,{expected:G.joinValues(o),received:r.parsedType,code:w.invalid_type}),B}if(this._cache||(this._cache=new Set(G.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=G.objectValues(n);return k(r,{received:r.data,code:w.invalid_enum_value,options:o}),B}return ve(t.data)}get enum(){return this._def.values}};yn.create=(e,t)=>new yn({values:e,typeName:N.ZodNativeEnum,...U(t)});var Ut=class extends q{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==_.promise&&n.common.async===!1)return k(n,{code:w.invalid_type,expected:_.promise,received:n.parsedType}),B;let r=n.parsedType===_.promise?n.data:Promise.resolve(n.data);return ve(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Ut.create=(e,t)=>new Ut({type:e,typeName:N.ZodPromise,...U(t)});var ze=class extends q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{k(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return B;let l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?B:l.status==="dirty"?on(l.value):n.value==="dirty"?on(l.value):l});{if(n.value==="aborted")return B;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?B:a.status==="dirty"?on(a.value):n.value==="dirty"?on(a.value):a}}if(o.type==="refinement"){let s=a=>{let l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?B:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Mt(s))return B;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Mt(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):B);G.assertNever(o)}};ze.create=(e,t,n)=>new ze({schema:e,typeName:N.ZodEffects,effect:t,...U(n)});ze.createWithPreprocess=(e,t,n)=>new ze({schema:t,effect:{type:"preprocess",transform:e},typeName:N.ZodEffects,...U(n)});var Le=class extends q{_parse(t){return this._getType(t)===_.undefined?ve(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Le.create=(e,t)=>new Le({innerType:e,typeName:N.ZodOptional,...U(t)});var ct=class extends q{_parse(t){return this._getType(t)===_.null?ve(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ct.create=(e,t)=>new ct({innerType:e,typeName:N.ZodNullable,...U(t)});var bn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===_.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};bn.create=(e,t)=>new bn({innerType:e,typeName:N.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...U(t)});var wn=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rr(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new xe(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new xe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};wn.create=(e,t)=>new wn({innerType:e,typeName:N.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...U(t)});var cr=class extends q{_parse(t){if(this._getType(t)!==_.nan){let r=this._getOrReturnCtx(t);return k(r,{code:w.invalid_type,expected:_.nan,received:r.parsedType}),B}return{status:"valid",value:t.data}}};cr.create=e=>new cr({typeName:N.ZodNaN,...U(e)});var lE=Symbol("zod_brand"),ro=class extends q{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},oo=class e extends q{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?B:i.status==="dirty"?(n.dirty(),on(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?B:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:N.ZodPipeline})}},Dn=class extends q{_parse(t){let n=this._def.innerType._parse(t),r=o=>(Mt(o)&&(o.value=Object.freeze(o.value)),o);return rr(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};Dn.create=(e,t)=>new Dn({innerType:e,typeName:N.ZodReadonly,...U(t)});function Ug(e,t){let n=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof n=="string"?{message:n}:n}function Hg(e,t={},n){return e?Wt.create().superRefine((r,o)=>{let i=e(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Ug(t,r),l=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:l})}});if(!i){let s=Ug(t,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):Wt.create()}var cE={object:Ce.lazycreate},N;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(N||(N={}));var uE=(e,t={message:`Input not instance of ${e.name}`})=>Hg(n=>n instanceof e,t),Zg=zt.create,Kg=sn.create,dE=cr.create,pE=an.create,Yg=ln.create,fE=cn.create,mE=ir.create,hE=un.create,gE=dn.create,yE=Wt.create,bE=bt.create,wE=Xe.create,DE=sr.create,vE=wt.create,kE=Ce.create,xE=Ce.strictCreate,CE=pn.create,FE=Wi.create,EE=fn.create,_E=lt.create,SE=Ui.create,TE=ar.create,AE=lr.create,OE=Vi.create,IE=mn.create,PE=hn.create,RE=gn.create,jE=yn.create,BE=Ut.create,$E=ze.create,NE=Le.create,LE=ct.create,ME=ze.createWithPreprocess,zE=oo.create,WE=()=>Zg().optional(),UE=()=>Kg().optional(),VE=()=>Yg().optional(),qE={string:e=>zt.create({...e,coerce:!0}),number:e=>sn.create({...e,coerce:!0}),boolean:e=>ln.create({...e,coerce:!0}),bigint:e=>an.create({...e,coerce:!0}),date:e=>cn.create({...e,coerce:!0})};var GE=B;function qi(e,t=!1){let n=e.length,r=0,o="",i=0,s=16,a=0,l=0,c=0,u=0,d=0;function f(x,O){let J=0,$=0;for(;J<x||!O;){let T=e.charCodeAt(r);if(T>=48&&T<=57)$=$*16+T-48;else if(T>=65&&T<=70)$=$*16+T-65+10;else if(T>=97&&T<=102)$=$*16+T-97+10;else break;r++,J++}return J<x&&($=-1),$}function m(x){r=x,o="",i=0,s=16,d=0}function g(){let x=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&ur(e.charCodeAt(r)))for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;else return d=3,e.substring(x,r);let O=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&ur(e.charCodeAt(r))){for(r++;r<e.length&&ur(e.charCodeAt(r));)r++;O=r}else d=3;return e.substring(x,O)}function v(){let x="",O=r;for(;;){if(r>=n){x+=e.substring(O,r),d=2;break}let J=e.charCodeAt(r);if(J===34){x+=e.substring(O,r),r++;break}if(J===92){if(x+=e.substring(O,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:x+='"';break;case 92:x+="\\";break;case 47:x+="/";break;case 98:x+="\b";break;case 102:x+="\f";break;case 110:x+=`
123
+ `;break;case 114:x+="\r";break;case 116:x+=" ";break;case 117:let T=f(4,!0);T>=0?x+=String.fromCharCode(T):d=4;break;default:d=5}O=r;continue}if(J>=0&&J<=31)if(io(J)){x+=e.substring(O,r),d=2;break}else d=6;r++}return x}function F(){if(o="",d=0,i=r,l=a,u=c,r>=n)return i=n,s=17;let x=e.charCodeAt(r);if(oc(x)){do r++,o+=String.fromCharCode(x),x=e.charCodeAt(r);while(oc(x));return s=15}if(io(x))return r++,o+=String.fromCharCode(x),x===13&&e.charCodeAt(r)===10&&(r++,o+=`
124
+ `),a++,c=r,s=14;switch(x){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=v(),s=10;case 47:let O=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<n&&!io(e.charCodeAt(r));)r++;return o=e.substring(O,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;let J=n-1,$=!1;for(;r<J;){let T=e.charCodeAt(r);if(T===42&&e.charCodeAt(r+1)===47){r+=2,$=!0;break}r++,io(T)&&(T===13&&e.charCodeAt(r)===10&&r++,a++,c=r)}return $||(r++,d=1),o=e.substring(O,r),s=13}return o+=String.fromCharCode(x),r++,s=16;case 45:if(o+=String.fromCharCode(x),r++,r===n||!ur(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=g(),s=11;default:for(;r<n&&S(x);)r++,x=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(x),r++,s=16}}function S(x){if(oc(x)||io(x))return!1;switch(x){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function L(){let x;do x=F();while(x>=12&&x<=15);return x}return{setPosition:m,getPosition:()=>r,scan:t?L:F,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>i,getTokenLength:()=>r-i,getTokenStartLine:()=>l,getTokenStartCharacter:()=>i-u,getTokenError:()=>d}}function oc(e){return e===32||e===9}function io(e){return e===10||e===13}function ur(e){return e>=48&&e<=57}var Xg;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(Xg||(Xg={}));var HE=new Array(20).fill(0).map((e,t)=>" ".repeat(t)),dr=200,ZE={" ":{"\n":new Array(dr).fill(0).map((e,t)=>`
123
125
  `+" ".repeat(t)),"\r":new Array(dr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(dr).fill(0).map((e,t)=>`\r
124
126
  `+" ".repeat(t))}," ":{"\n":new Array(dr).fill(0).map((e,t)=>`
125
127
  `+" ".repeat(t)),"\r":new Array(dr).fill(0).map((e,t)=>"\r"+" ".repeat(t)),"\r\n":new Array(dr).fill(0).map((e,t)=>`\r
126
- `+" ".repeat(t))}};var Gi;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Gi||(Gi={}));function Yg(e,t=[],n=Gi.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return Xg(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function Xg(e,t,n=Gi.DEFAULT){let r=qi(e,!1),o=[],i=0;function s(z){return z?()=>i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(z){return z?oe=>i===0&&z(oe,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(z){return z?oe=>i===0&&z(oe,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(z){return z?()=>{i>0?i++:z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(z){return z?()=>{i>0&&i--,i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),g=c(t.onArrayBegin),v=u(t.onArrayEnd),F=l(t.onLiteralValue),S=a(t.onSeparator),L=s(t.onComment),x=a(t.onError),O=n&&n.disallowComments,J=n&&n.allowTrailingComma;function $(){for(;;){let z=r.scan();switch(r.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:O||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(z){case 12:case 13:O?T(10):L();break;case 16:T(1);break;case 15:case 14:break;default:return z}}}function T(z,oe=[],vt=[]){if(x(z),oe.length+vt.length>0){let ao=r.getToken();for(;ao!==17;){if(oe.indexOf(ao)!==-1){$();break}else if(vt.indexOf(ao)!==-1)break;ao=$()}}}function h(z){let oe=r.getTokenValue();return z?F(oe):(f(oe),o.push(oe)),$(),!0}function y(){switch(r.getToken()){case 11:let z=r.getTokenValue(),oe=Number(z);isNaN(oe)&&(T(2),oe=0),F(oe);break;case 7:F(null);break;case 8:F(!0);break;case 9:F(!1);break;default:return!1}return $(),!0}function j(){return r.getToken()!==10?(T(3,[],[2,5]),!1):(h(!1),r.getToken()===6?(S(":"),$(),Ue()||T(4,[],[2,5])):T(5,[],[2,5]),o.pop(),!0)}function C(){d(),$();let z=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(z||T(4,[],[]),S(","),$(),r.getToken()===2&&J)break}else z&&T(6,[],[]);j()||T(4,[],[2,5]),z=!0}return m(),r.getToken()!==2?T(7,[2],[]):$(),!0}function me(){g(),$();let z=!0,oe=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(oe||T(4,[],[]),S(","),$(),r.getToken()===4&&J)break}else oe&&T(6,[],[]);z?(o.push(0),z=!1):o[o.length-1]++,Ue()||T(4,[],[4,5]),oe=!0}return v(),z||o.pop(),r.getToken()!==4?T(8,[4],[]):$(),!0}function Ue(){switch(r.getToken()){case 3:return me();case 1:return C();case 10:return h(!0);default:return y()}}return $(),r.getToken()===17?n.allowEmptyContent?!0:(T(4,[],[]),!1):Ue()?(r.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}var Qg;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(Qg||(Qg={}));var ey;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ey||(ey={}));var oc=Yg;var ty;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(ty||(ty={}));V();var ny=ee.object({name:ee.string(),main:ee.string(),compatibility_date:ee.string(),compatibility_flags:ee.array(ee.string()).optional(),placement:ee.object({mode:ee.string()}).passthrough().optional(),assets:ee.object({directory:ee.string(),binding:ee.string().optional()}).passthrough().optional(),d1_databases:ee.array(ee.object({database_name:ee.string(),database_id:ee.string(),binding:ee.string(),migrations_dir:ee.string().optional()}).passthrough()).default([]),kv_namespaces:ee.array(ee.object({binding:ee.string(),id:ee.string()}).passthrough()).default([]),r2_buckets:ee.array(ee.object({binding:ee.string(),bucket_name:ee.string()}).passthrough()).default([])}).passthrough();function ry(e,t="wrangler.json"){let n=Fe.join(e,t);if(!de.existsSync(n)){if(t.endsWith(".json"))return p.warn(`/${t} not found, checking for /${t}c`),ry(e,t+"c");p.warn(`/${t} not found`);return}let r=de.readFileSync(n,"utf8");p.info(`reading /${t}...`);let o;try{o=oc(r)}catch(i){p.error(`/${t} loaded but could not parse as JSONC: ${i}`);return}try{let i=ny.parse(o);return p.info(`successfully loaded /${t}`),i}catch(i){p.error(`/${t} valid JSONC but schema validation failed: ${i}`);return}}function oy(e,t,n={}){if(!de.existsSync(e))return 0;de.mkdirSync(t,{recursive:!0});let r=de.readdirSync(e,{withFileTypes:!0}),o=0;for(let i of r){if(n.exclude&&i.name===n.exclude)continue;let s=Fe.join(e,i.name),a=Fe.join(t,i.name);i.isDirectory()?o+=oy(s,a,n):(de.copyFileSync(s,a),o++)}return o}async function iy(e,t){let n=null,r=null,o=Fe.join(t,"wrangler.json"),i=Fe.join(t,"wrangler.jsonc");de.existsSync(o)?(n=o,r=".json"):de.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(p.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),de.copyFileSync(n,Fe.join(t,`clouduser.wrangler${r}`)));let s=n?ry(t,Fe.basename(n)):null,a=Fe.join(__dirname,e.config.wrangler_template_path),l=Fe.join(t,"wrangler.json");if(!de.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(p.info(`copying template /templates/${e.framework}/wrangler.${e.framework}.json to /wrangler.json`),de.copyFileSync(a,l),!s)return;let c=JSON.parse(de.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,p.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,p.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,p.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),de.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let d=s.d1_databases[u];if(!d.migrations_dir){p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=d.migrations_dir,m=Fe.join(t,f);if(!de.existsSync(m)){p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let g=Fe.join(t,"clouduser","migrations",f),v=oy(m,g);v>0?p.info(`copied ${v} migrations to /clouduser/migrations/${f}`):p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function e_(e){if(!/^[a-z0-9-]+$/.test(e))throw new Error(`Invalid object storage bucket name ${JSON.stringify(e)}: Only lowercase letters, numbers, and hyphens are allowed.`);if(e.startsWith("-")||e.endsWith("-"))throw new Error(`Invalid object storage bucket name "${e}": Cannot begin or end with a hyphen.`);if(e.length>27)throw new Error(`Invalid object storage bucket name "${e}": Must be 27 characters or fewer (currently ${e.length} characters).`)}function sy(e){let t=null;for(let i of[".json",".jsonc"]){let s=Fe.join(e,`clouduser.wrangler${i}`);if(de.existsSync(s)){t=s;break}}if(!t)return;let n=de.readFileSync(t,"utf8"),r;try{r=oc(n)}catch(i){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${i}`)}let o=ny.parse(r);if(o.d1_databases&&o.d1_databases.length>0&&o.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${o.d1_databases.length}. Maximum allowed is 5.`);if(o.kv_namespaces&&o.kv_namespaces.length>0&&o.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${o.kv_namespaces.length}. Maximum allowed is 5.`);if(o.r2_buckets&&o.r2_buckets.length>0){if(o.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${o.r2_buckets.length}. Maximum allowed is 5.`);p.info(`validating ${o.r2_buckets.length} object storage bucket name(s)...`);for(let i of o.r2_buckets)e_(i.bucket_name)}}V();Ee();ae();Se();async function ly(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=M.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||M.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=sc(n),c=t.telemetry;await c?.sendUsage("cloud_build_start",{framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),P.mkdirSync(o,{recursive:!0});try{p.info(E.green(`--- \u{1F4E6} Installing dependencies ------------------------------------
127
- `)),await t_(n,e.framework,t.telemetry),p.info(E.green(`--- \u{1F527} Setting up framework configuration ----------------------
128
- `)),await n_(n,e,s,t.deployUrl,t.environmentId),p.info(E.green(`--- \u{1F527} Setting up wrangler configuration -----------------------
129
- `)),await iy(e,n),sy(n),p.info(E.green(`--- \u{1F3D7}\uFE0F Building app -----------------------------------------------
130
- `)),p.info(`running ${e.config.build_command}...`),await r_(n,e.config.build_command,t.telemetry),p.info(E.green(`--- \u{1F9EA} Creating wrangler dry-run ----------------------------------
131
- `)),await o_(n,i),p.info(E.green(`--- \u{1F4C1} Copying assets ------------------------------------------
132
- `)),await i_(n,i,e,s),p.info(E.green(`--- \u{1F4E6} Creating tarball -----------------------------------------
133
- `));let u=await s_(i),d=Date.now()-a;return p.info(`${te} Build completed in ${(d/1e3).toFixed(1)}s`),await c?.sendUsage("cloud_build_success",{duration:d,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}catch(u){let d=Date.now()-a;throw await c?.sendError(u instanceof Error?u:new Error(String(u)),"cloud_build_failure",{duration:d,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}}function sc(e){let t=M.join(e,"wrangler.json");if(!P.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let n=JSON.parse(P.readFileSync(t,"utf8")),r=n.kv_namespaces||[],o=n.d1_databases||[],i=n.r2_buckets||[],s=n.vars||{};return{hasKV:r.length>0,hasD1:o.length>0,hasR2:i.length>0,hasVars:Object.keys(s).length>0,kvCount:r.length,d1Count:o.length,r2Count:i.length,varCount:Object.keys(s).length}}catch(n){return console.debug("Failed to parse wrangler.json for bindings detection:",n),{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0}}}function cy(e){try{let t=M.dirname(e);t.includes(".tmp/webflow-build-")&&(p.info(E.green(`--- \u{1F9F9} Cleaning up build artifacts... -----------------
134
- `)),P.rmSync(t,{recursive:!0,force:!0}))}catch(t){p.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function uy(e,t){try{if(!t.config.config_template_path)return;let n=M.join(__dirname,t.config.config_template_path),r=M.basename(n,".template"),o=r.slice(0,r.lastIndexOf("."));p.info(E.grey(`--- \u{1F9F9} Reverting framework configuration changes ---------------
135
- `));for(let s of["mjs","cjs","js","ts"]){let a=M.join(e,`clouduser.${o}.${s}`),l=M.join(e,`${o}.${s}`);if(P.existsSync(a)){p.info(`restoring /${o}.${s} from /clouduser.${o}.${s}...`),P.existsSync(l)&&P.unlinkSync(l),P.renameSync(a,l);break}}for(let s of[".jsonc",".json"]){let a=M.join(e,`clouduser.wrangler${s}`);if(P.existsSync(a)){p.info(`restoring user wrangler${s} from backup...`);let l=M.join(e,"wrangler.json");P.existsSync(l)&&P.unlinkSync(l);let c=M.join(e,`wrangler${s}`);P.renameSync(a,c);break}}let i=M.join(e,"clouduser");P.existsSync(i)&&(p.info("cleaning up clouduser directory..."),P.rmSync(i,{recursive:!0,force:!0}));for(let s of t.config.additional_config_files||[]){let a=M.join(e,M.basename(s));P.existsSync(a)&&(p.info(`cleaning up additional config file ${a}...`),P.unlinkSync(a))}}catch(n){p.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function t_(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"];try{if(t==="astro"){let a=M.join(e,"package.json"),l=JSON.parse(P.readFileSync(a,"utf8"));l.dependencies?.["@astrojs/react"]||l.devDependencies?.["@astrojs/react"]||(p.info("Warning: cosmic astro integration requires @astrojs/react and this project doesn't require it. Installing now..."),(0,pr.execSync)("npm install --save @astrojs/react",{cwd:e,stdio:"inherit"}))}let i=M.join(e,"package-lock.json");P.existsSync(i)?(p.info("Running npm ci..."),(0,pr.execSync)(`npm ci ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(p.info("Warning: No package-lock.json found, installing dependencies with npm install"),(0,pr.execSync)(`npm install ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:P.existsSync(M.join(e,"package-lock.json"))})}catch(i){let s=Date.now()-r;throw await n?.sendError(i instanceof Error?i:new Error(String(i)),"cloud_install_dependencies_failure",{duration:s,framework:t,hasPackageLock:P.existsSync(M.join(e,"package-lock.json"))}),i}}async function n_(e,t,n,r,o){if(p.info(`Framework: ${t.framework}`),p.info(`Mount path: ${n}`),p.info(`Deployment type: ${t.config.deployment_type}`),!t.config.config_template_path)return;let i=M.join(__dirname,t.config.config_template_path),s=M.basename(i,".template"),a=s.slice(0,s.lastIndexOf("."));for(let d of["mjs","cjs","js","ts"]){let f=M.join(e,`${a}.${d}`);if(P.existsSync(f)){let m=M.join(e,`clouduser.${a}.${d}`);p.info(`renaming user base config /${a}.${d} to /clouduser.${a}.${d}...`),P.renameSync(f,m);break}}let l=M.join(e,s);p.info(`rendering override config from /templates/${t.framework}/${s}.template to /${s}`);let u=P.readFileSync(i,"utf8").replace(/\$\{([^}]+)\}/g,(d,f)=>({COSMIC_MOUNT_PATH:n,COSMIC_DEPLOY_URL:r||(o?`https://${o}.wf-app-prod.cosmic.webflow.services`:"")})[f]||d);P.writeFileSync(l,u);for(let d of t.config.additional_config_files||[]){let f=M.join(__dirname,d);P.statSync(f,{throwIfNoEntry:!1})?(p.info(`copying additional config file /${d} to ${M.join(e,M.basename(d))}`),P.copyFileSync(f,M.join(e,M.basename(d)))):p.warn(`additional config file /${d} does not exist; skipping`)}}async function r_(e,t,n){let r=Date.now();try{let o=t.split(" "),i=o[0],s=o.slice(1);(0,pr.execSync)(`npx ${i} ${s.join(" ")}`,{cwd:e,stdio:"inherit"});let a=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:a,buildCommand:t})}catch(o){let i=Date.now()-r;throw await n?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function o_(e,t){P.mkdirSync(t,{recursive:!0});let n=M.join(e,"wrangler.json"),r=M.join(e,"wrangler.jsonc");if(!P.existsSync(n)&&!P.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,pr.execSync)(`npx wrangler deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function i_(e,t,n,r){let o=n.config.assets_path,i=n.config.assets_exclude_path,s=r.replace(/\/+$/,"").replace(/^\/+/,"");if(n.framework==="nextjs"||n.framework==="astro"){let d=M.join(e,o);if(P.existsSync(d)&&P.statSync(d).isDirectory()){let m=P.readdirSync(d,{withFileTypes:!0}).find(g=>!(!g.isDirectory()||i&&g.name===i||n.framework==="astro"&&(g.name==="_routes.json"||g.name==="_worker.js")));m&&(o=`${o}/${m.name}`)}}let a=M.join(t,"assets",s||"");P.mkdirSync(a,{recursive:!0});let l=M.join(e,o);if(P.existsSync(l)&&P.statSync(l).isDirectory()){p.info(`copying assets from /${o} to output/assets...`);try{i?(p.info(`excluding ${i}`),dy(l,a,i)):ic(l,a)}catch(d){p.error(d,{prefix:"Failed to copy assets:"})}}else p.info("No assets to copy or assets directory not found");let c=M.join(e,"webflow.json");P.existsSync(c)&&P.copyFileSync(c,M.join(t,"webflow.json"));let u=null;for(let d of[".json",".jsonc"]){let f=M.join(e,`clouduser.wrangler${d}`);if(P.existsSync(f)){u=f;break}}if(u){p.info("including user wrangler config in output..."),P.copyFileSync(u,M.join(t,"clouduser.wrangler.json"));let d=M.join(e,"clouduser","migrations");if(P.existsSync(d)){p.info("copying migrations from clouduser/migrations to output/migrations...");let f=M.join(t,"migrations");ic(d,f)}}}async function s_(e){let t=`${e}.tar.gz`;try{return await ay.create({gzip:!0,file:t,cwd:M.dirname(e)},[M.basename(e)]),p.info(`Tarball created: ${t}`),t}catch(n){throw new b(n,{prefix:"Failed to create tarball:"})}}function ic(e,t){P.mkdirSync(t,{recursive:!0});let n=P.readdirSync(e,{withFileTypes:!0});for(let r of n){let o=M.join(e,r.name),i=M.join(t,r.name);r.isDirectory()?ic(o,i):P.copyFileSync(o,i)}}function dy(e,t,n){P.mkdirSync(t,{recursive:!0});let r=P.readdirSync(e,{withFileTypes:!0});for(let o of r){if(o.name===n)continue;let i=M.join(e,o.name),s=M.join(t,o.name);o.isDirectory()?dy(i,s,n):P.copyFileSync(i,s)}}be();pe();V();var a_="DUPLICATE_ENVIRONMENT_MOUNT",l_="ENVIRONMENT_MOUNT_MISMATCH",c_="DUPLICATE_ENVIRONMENT_BRANCH",u_="INVALID_MOUNT_PATH_FORMAT",d_="INVALID_PROJECT_ID",py={[a_]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[l_]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[c_]:"An environment with this branch already exists for this project.",[u_]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[d_]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function fy(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let r=e;t.code=typeof r.code=="string"?r.code:void 0,t.msg=typeof r.msg=="string"?r.msg:void 0,t.status=typeof r.status=="number"?r.status:void 0}let n=t.msg||"";p.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`);for(let r in py)if(n.includes(r))return py[r];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var fr=D(require("fs")),ac=require("child_process");V();ae();Se();var my=104857600;function hy(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function p_(){try{let e=(0,ac.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,ac.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function lc(e,t,n){let r=await fetch(`${U}${t}`,{method:n.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n.body?JSON.stringify(n.body):void 0});if(!r.ok){let o=await r.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=fy(i);throw new Error(s)}return r.json()}async function gy(e,t,n,r){let{manifest:o}=H(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new b("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await f_(e,{siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:p_()});return!s&&l.project_id&&(p.info("\u{1F4DD} Updating webflow.json with project ID..."),he({cloud:{...i,project_id:l.project_id}})),l}async function f_(e,t){let{siteId:n,framework:r,mountPath:o,environment:i,version:s,projectId:a,projectName:l,description:c,directory:u}=t,d={framework:r,mount_path:o,environment:i,version:s};return a&&(d.project_id=a),l&&(d.project_name=l),c&&(d.description=c),u&&(d.app_path=u),lc(e.accessToken,`/cosmic/${n}/cli-deploy-init`,{method:"POST",body:d})}async function yy(e,t){return lc(e.accessToken,`/cosmic/${e.siteId}/cli-project-environments/${t}`,{method:"GET"})}async function by(e){return lc(e.accessToken,`/cosmic/${e.siteId}/cli-projects`,{method:"GET"})}async function wy(e,t){if(!fr.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=fr.statSync(e);if(n.size>my)throw new Error(`Build output is too large (${hy(n.size)}). Maximum allowed size is ${hy(my)}.`);let r=fr.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([l,c])=>{i.append(l,c)});let s=new Blob([r],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let l=await a.text();throw new b(l,{prefix:`${X} Upload failed with response:`})}}async function Dy(e,t){if(!e||e==="undefined")throw new b("Completion URL is undefined or invalid");let n=new URL(e);t&&n.searchParams.set("failed","true");let r=await fetch(n.toString(),{method:"GET"});if(!r.ok)throw new b(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var vy=require("webflow-api");pe();pe();ae();function cc(e){return new vy.WebflowClient({accessToken:e,environment:{base:`${U}/v2`,dataApi:`${U}/v2`,contentDeliveryApi:`${xo}/v2`}})}async function so(e,t){try{let r=await cc(e).sites.get(t);return{id:r.id||t,displayName:r.displayName||"Unknown Site",shortName:r.shortName||"unknown-site",customDomains:r.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new b(n,{prefix:"Error fetching site details:"})}}async function uc(e,t){try{return{customDomains:(await cc(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new b(n,{prefix:"Error fetching custom domains:"})}}async function dc(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new b(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function pc(e,t,n){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(r=>{if(r.mountPath!==t)return!1;if(!n)return!0;if(r.workerUrl)try{return new URL(r.workerUrl).hostname.split(".")[0]===n}catch{return!1}return!1}):!1}async function ky(e,t,n){try{let r=cc(e),o=await so(e,t),i=[];if(n?.domains&&n.domains.length>0)for(let s of n.domains){let a=o.customDomains?.find(l=>l.url===s);a?.id&&i.push(a.id)}await r.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:n?.publishToWebflowSubdomain??!0})}catch(r){throw new b(r,{prefix:"Error publishing site:"})}}Je();ks();V();async function xy(e,t,n){let{siteId:r,accessToken:o}=e,i=En("Validating mount path configuration...").start();try{let s=await so(o,r),a=await uc(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(g=>g.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async g=>{try{let v=await dc(g),F=Array.isArray(v.cosmic)?v.cosmic.map(L=>L.mountPath).filter(L=>typeof L=="string"):[],S=pc(v,t,n);return{domain:g,mountPaths:F,isValid:S===!0}}catch(v){return{domain:g,mountPaths:[],isValid:!1,error:v instanceof Error?v.message:String(v)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),d=await Promise.all(u),f=d.some(g=>!g.isValid),m=d.every(g=>g.isValid);return i.succeed("Mount path validation completed"),{isValid:m,domains:d,needsPublishing:f}}catch(s){throw i.fail("Mount path validation failed"),s}}async function Cy(e,t,n){let{siteId:r,accessToken:o}=e;try{let i=await so(o,r),s=await uc(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let d=await dc(u),f=pc(d,t,n);return{domain:u,isValid:f}}catch(d){return p.debug(`Could not verify mount path for ${u}: ${d}`),{domain:u,isValid:!1}}});return(await Promise.all(l)).filter(u=>u.isValid).map(u=>u.domain)}catch(i){return p.debug(`Error getting valid domains: ${i}`),[]}}function Fy(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function Ey(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await Eo({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:r=>r.length===0?"Please select at least one domain to publish to.":!0});return n??[]}async function _y(){return await Ge({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function fc(e,t){let{siteId:n,accessToken:r}=e,o=En(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await so(r,n)).shortName}.webflow.io`,a=t.includes(s),l=t.filter(c=>c!==s);await ky(r,n,{domains:l,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}be();V();Ee();pe();_e();ae();Se();var Ji=async()=>{try{let e=await Xl();return Object.keys(e)}catch(e){return p.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},mc=async(e,t,n=Bi,r)=>{let o=`./${e}`,i=await Xl(),s=null,a=!1;try{let l=Date.now(),{manifest:c}=H(),u=await we(c,{site:r}),d=u.accessToken,f=u.siteId;if(s=Z.forCloud({authToken:d,siteId:f}),await Yl(e,t,n,i,f,d),process.chdir(o),f){p.info("Running devlink sync to fetch your Webflow components...");try{await m_({site:f,apiToken:d}),a=!0}catch(g){p.error(g,{prefix:"Failed to run devlink sync:"}),p.info("You can manually run 'npx webflow devlink sync' later to sync your components.")}}let m=Date.now()-l;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:m,mountPath:t}),Sy(e)}catch(l){throw p.error(l,{prefix:"Error during Webflow authentication:"}),await Yl(e,t,n,i),process.chdir(o),p.error("Project scaffold was created, but authentication failed."),p.error("To set up Webflow credentials later, run:"),p.error(" webflow auth login"),Sy(e),new b(l,{skipLogging:!0})}},m_=async e=>{let{syncComponents:t}=await Promise.resolve().then(()=>(Dl(),ih));await t(void 0,{site:e.site,apiToken:e.apiToken})},h_=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=H();return t.cloud?.skipMountPathCheck===!0}catch{return!1}},g_=async(e,t,n,r)=>{p.info("\u{1F50D} Validating mount path configuration...");let o=await xy(e,t,n);if(o.isValid)p.info(`${te} Mount path validation passed`);else if(p.info(`
136
- \u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?te:X,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";p.info(`${s} ${i.domain} ${a}`),i.error&&p.debug(` Error: ${i.error}`)}),o.needsPublishing)if(r){p.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await fc(e,i)}else if(await _y()&&xt()){let s=o.domains.filter(l=>!l.isValid).map(l=>l.domain),a=await Ey(s);await fc(e,a)}else p.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},y_=async(e,t,n,r)=>{p.info(`
137
- \u{1F3D7}\uFE0F Building project...`);let o=await ly(e,{mountPath:n,telemetry:r?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});p.info("\u{1F4E4} Uploading build artifacts...");let i=Date.now();await wy(o,t.upload_url);let s=Date.now()-i;return p.info(`${te} Upload completed in ${(s/1e3).toFixed(1)}s`),o},b_=async(e,t,n)=>{p.success(`
138
- \u{1F310} Your cloud app will soon be available at:`);try{let r=await Cy(e,t,n),o=Fy(r,t);o.length>0?o.forEach(i=>{p.info(` ${i}`)}):p.warn(" No domains found with the correct mount path configuration yet.")}catch(r){p.warn(` Could not determine deployment links: ${r instanceof Error?r.message:r}`)}},w_=e=>{e.site_slug?p.success(`Visit your deployment:
128
+ `+" ".repeat(t))}};var Gi;(function(e){e.DEFAULT={allowTrailingComma:!1}})(Gi||(Gi={}));function Qg(e,t=[],n=Gi.DEFAULT){let r=null,o=[],i=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return ey(e,{onObjectBegin:()=>{let l={};s(l),i.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=i.pop()},onArrayBegin:()=>{let l=[];s(l),i.push(o),o=l,r=null},onArrayEnd:()=>{o=i.pop()},onLiteralValue:s,onError:(l,c,u)=>{t.push({error:l,offset:c,length:u})}},n),o[0]}function ey(e,t,n=Gi.DEFAULT){let r=qi(e,!1),o=[],i=0;function s(z){return z?()=>i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(z){return z?oe=>i===0&&z(oe,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(z){return z?oe=>i===0&&z(oe,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function c(z){return z?()=>{i>0?i++:z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(i=1)}:()=>!0}function u(z){return z?()=>{i>0&&i--,i===0&&z(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}let d=c(t.onObjectBegin),f=l(t.onObjectProperty),m=u(t.onObjectEnd),g=c(t.onArrayBegin),v=u(t.onArrayEnd),F=l(t.onLiteralValue),S=a(t.onSeparator),L=s(t.onComment),x=a(t.onError),O=n&&n.disallowComments,J=n&&n.allowTrailingComma;function $(){for(;;){let z=r.scan();switch(r.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:O||T(11);break;case 2:T(12);break;case 6:T(16);break}switch(z){case 12:case 13:O?T(10):L();break;case 16:T(1);break;case 15:case 14:break;default:return z}}}function T(z,oe=[],vt=[]){if(x(z),oe.length+vt.length>0){let ao=r.getToken();for(;ao!==17;){if(oe.indexOf(ao)!==-1){$();break}else if(vt.indexOf(ao)!==-1)break;ao=$()}}}function h(z){let oe=r.getTokenValue();return z?F(oe):(f(oe),o.push(oe)),$(),!0}function y(){switch(r.getToken()){case 11:let z=r.getTokenValue(),oe=Number(z);isNaN(oe)&&(T(2),oe=0),F(oe);break;case 7:F(null);break;case 8:F(!0);break;case 9:F(!1);break;default:return!1}return $(),!0}function j(){return r.getToken()!==10?(T(3,[],[2,5]),!1):(h(!1),r.getToken()===6?(S(":"),$(),We()||T(4,[],[2,5])):T(5,[],[2,5]),o.pop(),!0)}function C(){d(),$();let z=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(z||T(4,[],[]),S(","),$(),r.getToken()===2&&J)break}else z&&T(6,[],[]);j()||T(4,[],[2,5]),z=!0}return m(),r.getToken()!==2?T(7,[2],[]):$(),!0}function me(){g(),$();let z=!0,oe=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(oe||T(4,[],[]),S(","),$(),r.getToken()===4&&J)break}else oe&&T(6,[],[]);z?(o.push(0),z=!1):o[o.length-1]++,We()||T(4,[],[4,5]),oe=!0}return v(),z||o.pop(),r.getToken()!==4?T(8,[4],[]):$(),!0}function We(){switch(r.getToken()){case 3:return me();case 1:return C();case 10:return h(!0);default:return y()}}return $(),r.getToken()===17?n.allowEmptyContent?!0:(T(4,[],[]),!1):We()?(r.getToken()!==17&&T(9,[],[]),!0):(T(4,[],[]),!1)}var ty;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ty||(ty={}));var ny;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(ny||(ny={}));var ic=Qg;var ry;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(ry||(ry={}));V();var oy=ee.object({name:ee.string(),main:ee.string(),compatibility_date:ee.string(),compatibility_flags:ee.array(ee.string()).optional(),placement:ee.object({mode:ee.string()}).passthrough().optional(),assets:ee.object({directory:ee.string(),binding:ee.string().optional()}).passthrough().optional(),d1_databases:ee.array(ee.object({database_name:ee.string(),database_id:ee.string(),binding:ee.string(),migrations_dir:ee.string().optional()}).passthrough()).default([]),kv_namespaces:ee.array(ee.object({binding:ee.string(),id:ee.string()}).passthrough()).default([]),r2_buckets:ee.array(ee.object({binding:ee.string(),bucket_name:ee.string()}).passthrough()).default([])}).passthrough();function iy(e,t="wrangler.json"){let n=Fe.join(e,t);if(!de.existsSync(n)){if(t.endsWith(".json"))return p.warn(`/${t} not found, checking for /${t}c`),iy(e,t+"c");p.warn(`/${t} not found`);return}let r=de.readFileSync(n,"utf8");p.info(`reading /${t}...`);let o;try{o=ic(r)}catch(i){p.error(`/${t} loaded but could not parse as JSONC: ${i}`);return}try{let i=oy.parse(o);return p.info(`successfully loaded /${t}`),i}catch(i){p.error(`/${t} valid JSONC but schema validation failed: ${i}`);return}}function sy(e,t,n={}){if(!de.existsSync(e))return 0;de.mkdirSync(t,{recursive:!0});let r=de.readdirSync(e,{withFileTypes:!0}),o=0;for(let i of r){if(n.exclude&&i.name===n.exclude)continue;let s=Fe.join(e,i.name),a=Fe.join(t,i.name);i.isDirectory()?o+=sy(s,a,n):(de.copyFileSync(s,a),o++)}return o}async function ay(e,t){let n=null,r=null,o=Fe.join(t,"wrangler.json"),i=Fe.join(t,"wrangler.jsonc");de.existsSync(o)?(n=o,r=".json"):de.existsSync(i)&&(n=i,r=".jsonc"),n&&r&&(p.info(`saving user-provided wrangler JSON as /clouduser.wrangler${r}...`),de.copyFileSync(n,Fe.join(t,`clouduser.wrangler${r}`)));let s=n?iy(t,Fe.basename(n)):null,a=Fe.join(__dirname,e.config.wrangler_template_path),l=Fe.join(t,"wrangler.json");if(!de.existsSync(a))throw new Error(`Wrangler template not found at ${a}. Make sure the template is properly copied during build.`);if(p.info(`copying template /templates/${e.framework}/wrangler.${e.framework}.json to /wrangler.json`),de.copyFileSync(a,l),!s)return;let c=JSON.parse(de.readFileSync(l,"utf8"));if(s.kv_namespaces&&s.kv_namespaces.length>0&&(c.kv_namespaces=s.kv_namespaces,p.info(`merged ${s.kv_namespaces.length} KV namespace(s) into template`)),s.r2_buckets&&s.r2_buckets.length>0&&(c.r2_buckets=s.r2_buckets,p.info(`merged ${s.r2_buckets.length} R2 bucket(s) into template`)),s.d1_databases&&s.d1_databases.length>0&&(c.d1_databases=s.d1_databases,p.info(`merged ${s.d1_databases.length} D1 database(s) into template`)),de.writeFileSync(l,JSON.stringify(c,null,2)),s.d1_databases.length!==0)for(let u in s.d1_databases){let d=s.d1_databases[u];if(!d.migrations_dir){p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir is not defined`);continue}let f=d.migrations_dir,m=Fe.join(t,f);if(!de.existsSync(m)){p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) does not exist`);continue}let g=Fe.join(t,"clouduser","migrations",f),v=sy(m,g);v>0?p.info(`copied ${v} migrations to /clouduser/migrations/${f}`):p.info(`skipping migrations for database ${u} in wrangler.json; migrations dir (/${f}) is empty`)}}function r_(e){if(!/^[a-z0-9-]+$/.test(e))throw new Error(`Invalid object storage bucket name ${JSON.stringify(e)}: Only lowercase letters, numbers, and hyphens are allowed.`);if(e.startsWith("-")||e.endsWith("-"))throw new Error(`Invalid object storage bucket name "${e}": Cannot begin or end with a hyphen.`);if(e.length>27)throw new Error(`Invalid object storage bucket name "${e}": Must be 27 characters or fewer (currently ${e.length} characters).`)}function ly(e){let t=null;for(let i of[".json",".jsonc"]){let s=Fe.join(e,`clouduser.wrangler${i}`);if(de.existsSync(s)){t=s;break}}if(!t)return;let n=de.readFileSync(t,"utf8"),r;try{r=ic(n)}catch(i){throw new Error(`Failed to parse wrangler config at ${t} as JSONC: ${i}`)}let o=oy.parse(r);if(o.d1_databases&&o.d1_databases.length>0&&o.d1_databases.length>5)throw new Error(`Too many D1 databases configured: ${o.d1_databases.length}. Maximum allowed is 5.`);if(o.kv_namespaces&&o.kv_namespaces.length>0&&o.kv_namespaces.length>5)throw new Error(`Too many KV namespaces configured: ${o.kv_namespaces.length}. Maximum allowed is 5.`);if(o.r2_buckets&&o.r2_buckets.length>0){if(o.r2_buckets.length>5)throw new Error(`Too many R2 buckets configured: ${o.r2_buckets.length}. Maximum allowed is 5.`);p.info(`validating ${o.r2_buckets.length} object storage bucket name(s)...`);for(let i of o.r2_buckets)r_(i.bucket_name)}}V();Ee();ae();Se();async function uy(e,t={}){let n=t.projectPath||process.cwd(),r=Date.now(),o=M.join(n,".tmp",`webflow-build-${r}`),i=t.outputDir||M.join(o,"output"),s=t.mountPath||"/app",a=Date.now(),l=ac(n),c=t.telemetry;await c?.sendUsage("cloud_build_start",{framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),P.mkdirSync(o,{recursive:!0});try{p.info(E.green(`--- \u{1F4E6} Installing dependencies ------------------------------------
129
+ `)),await o_(n,e.framework,t.telemetry),p.info(E.green(`--- \u{1F527} Setting up framework configuration ----------------------
130
+ `)),await i_(n,e,s,t.deployUrl,t.environmentId),p.info(E.green(`--- \u{1F527} Setting up wrangler configuration -----------------------
131
+ `)),await ay(e,n),ly(n),p.info(E.green(`--- \u{1F3D7}\uFE0F Building app -----------------------------------------------
132
+ `)),p.info(`running ${e.config.build_command}...`),await s_(n,e.config.build_command,t.telemetry),p.info(E.green(`--- \u{1F9EA} Creating wrangler dry-run ----------------------------------
133
+ `)),await a_(n,i),p.info(E.green(`--- \u{1F4C1} Copying assets ------------------------------------------
134
+ `)),await l_(n,i,e,s),p.info(E.green(`--- \u{1F4E6} Creating tarball -----------------------------------------
135
+ `));let u=await c_(i),d=Date.now()-a;return p.info(`${te} Build completed in ${(d/1e3).toFixed(1)}s`),await c?.sendUsage("cloud_build_success",{duration:d,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}catch(u){let d=Date.now()-a;throw await c?.sendError(u instanceof Error?u:new Error(String(u)),"cloud_build_failure",{duration:d,framework:e.framework,buildCommand:e.config.build_command,deploymentType:e.config.deployment_type,mountPath:s,cloudflareBindings:l}),u}}function ac(e){let t=M.join(e,"wrangler.json");if(!P.existsSync(t))return{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0};try{let n=JSON.parse(P.readFileSync(t,"utf8")),r=n.kv_namespaces||[],o=n.d1_databases||[],i=n.r2_buckets||[],s=n.vars||{};return{hasKV:r.length>0,hasD1:o.length>0,hasR2:i.length>0,hasVars:Object.keys(s).length>0,kvCount:r.length,d1Count:o.length,r2Count:i.length,varCount:Object.keys(s).length}}catch(n){return console.debug("Failed to parse wrangler.json for bindings detection:",n),{hasKV:!1,hasD1:!1,hasR2:!1,hasVars:!1,kvCount:0,d1Count:0,r2Count:0,varCount:0}}}function dy(e){try{let t=M.dirname(e);t.includes(".tmp/webflow-build-")&&(p.info(E.green(`--- \u{1F9F9} Cleaning up build artifacts... -----------------
136
+ `)),P.rmSync(t,{recursive:!0,force:!0}))}catch(t){p.warn(`Warning: Failed to clean up build artifacts: ${t}`)}}function py(e,t){try{if(!t.config.config_template_path)return;let n=M.join(__dirname,t.config.config_template_path),r=M.basename(n,".template"),o=r.slice(0,r.lastIndexOf("."));p.info(E.grey(`--- \u{1F9F9} Reverting framework configuration changes ---------------
137
+ `));for(let s of["mjs","cjs","js","ts"]){let a=M.join(e,`clouduser.${o}.${s}`),l=M.join(e,`${o}.${s}`);if(P.existsSync(a)){p.info(`restoring /${o}.${s} from /clouduser.${o}.${s}...`),P.existsSync(l)&&P.unlinkSync(l),P.renameSync(a,l);break}}for(let s of[".jsonc",".json"]){let a=M.join(e,`clouduser.wrangler${s}`);if(P.existsSync(a)){p.info(`restoring user wrangler${s} from backup...`);let l=M.join(e,"wrangler.json");P.existsSync(l)&&P.unlinkSync(l);let c=M.join(e,`wrangler${s}`);P.renameSync(a,c);break}}let i=M.join(e,"clouduser");P.existsSync(i)&&(p.info("cleaning up clouduser directory..."),P.rmSync(i,{recursive:!0,force:!0}));for(let s of t.config.additional_config_files||[]){let a=M.join(e,M.basename(s));P.existsSync(a)&&(p.info(`cleaning up additional config file ${a}...`),P.unlinkSync(a))}}catch(n){p.warn(`Warning: Failed to cleanup framework configuration: ${n}`)}}async function o_(e,t,n){let r=Date.now(),o=["--no-update-notifier","--no-progress"];try{if(t==="astro"){let a=M.join(e,"package.json"),l=JSON.parse(P.readFileSync(a,"utf8"));l.dependencies?.["@astrojs/react"]||l.devDependencies?.["@astrojs/react"]||(p.info("Warning: cosmic astro integration requires @astrojs/react and this project doesn't require it. Installing now..."),(0,pr.execSync)("npm install --save @astrojs/react",{cwd:e,stdio:"inherit"}))}let i=M.join(e,"package-lock.json");P.existsSync(i)?(p.info("Running npm ci..."),(0,pr.execSync)(`npm ci ${o.join(" ")}`,{cwd:e,stdio:"inherit"})):(p.info("Warning: No package-lock.json found, installing dependencies with npm install"),(0,pr.execSync)(`npm install ${o.join(" ")}`,{cwd:e,stdio:"inherit"}));let s=Date.now()-r;await n?.sendUsage("cloud_install_dependencies_success",{duration:s,framework:t,hasPackageLock:P.existsSync(M.join(e,"package-lock.json"))})}catch(i){let s=Date.now()-r;throw await n?.sendError(i instanceof Error?i:new Error(String(i)),"cloud_install_dependencies_failure",{duration:s,framework:t,hasPackageLock:P.existsSync(M.join(e,"package-lock.json"))}),i}}async function i_(e,t,n,r,o){if(p.info(`Framework: ${t.framework}`),p.info(`Mount path: ${n}`),p.info(`Deployment type: ${t.config.deployment_type}`),!t.config.config_template_path)return;let i=M.join(__dirname,t.config.config_template_path),s=M.basename(i,".template"),a=s.slice(0,s.lastIndexOf("."));for(let d of["mjs","cjs","js","ts"]){let f=M.join(e,`${a}.${d}`);if(P.existsSync(f)){let m=M.join(e,`clouduser.${a}.${d}`);p.info(`renaming user base config /${a}.${d} to /clouduser.${a}.${d}...`),P.renameSync(f,m);break}}let l=M.join(e,s);p.info(`rendering override config from /templates/${t.framework}/${s}.template to /${s}`);let u=P.readFileSync(i,"utf8").replace(/\$\{([^}]+)\}/g,(d,f)=>({COSMIC_MOUNT_PATH:n,COSMIC_DEPLOY_URL:r||(o?`https://${o}.wf-app-prod.cosmic.webflow.services`:"")})[f]||d);P.writeFileSync(l,u);for(let d of t.config.additional_config_files||[]){let f=M.join(__dirname,d);P.statSync(f,{throwIfNoEntry:!1})?(p.info(`copying additional config file /${d} to ${M.join(e,M.basename(d))}`),P.copyFileSync(f,M.join(e,M.basename(d)))):p.warn(`additional config file /${d} does not exist; skipping`)}}async function s_(e,t,n){let r=Date.now();try{let o=t.split(" "),i=o[0],s=o.slice(1);(0,pr.execSync)(`npx ${i} ${s.join(" ")}`,{cwd:e,stdio:"inherit"});let a=Date.now()-r;await n?.sendUsage("cloud_build_command_success",{duration:a,buildCommand:t})}catch(o){let i=Date.now()-r;throw await n?.sendError(o instanceof Error?o:new Error(String(o)),"cloud_build_command_failure",{duration:i,buildCommand:t}),new Error(`Build command failed: ${t}`)}}async function a_(e,t){P.mkdirSync(t,{recursive:!0});let n=M.join(e,"wrangler.json"),r=M.join(e,"wrangler.jsonc");if(!P.existsSync(n)&&!P.existsSync(r))throw new Error("Missing wrangler configuration: wrangler.json or wrangler.jsonc file is required");(0,pr.execSync)(`npx wrangler deploy --dry-run --outdir="${t}"`,{cwd:e,stdio:"inherit"})}async function l_(e,t,n,r){let o=n.config.assets_path,i=n.config.assets_exclude_path,s=r.replace(/\/+$/,"").replace(/^\/+/,"");if(n.framework==="nextjs"||n.framework==="astro"){let d=M.join(e,o);if(P.existsSync(d)&&P.statSync(d).isDirectory()){let m=P.readdirSync(d,{withFileTypes:!0}).find(g=>!(!g.isDirectory()||i&&g.name===i||n.framework==="astro"&&(g.name==="_routes.json"||g.name==="_worker.js")));m&&(o=`${o}/${m.name}`)}}let a=M.join(t,"assets",s||"");P.mkdirSync(a,{recursive:!0});let l=M.join(e,o);if(P.existsSync(l)&&P.statSync(l).isDirectory()){p.info(`copying assets from /${o} to output/assets...`);try{i?(p.info(`excluding ${i}`),fy(l,a,i)):sc(l,a)}catch(d){p.error(d,{prefix:"Failed to copy assets:"})}}else p.info("No assets to copy or assets directory not found");let c=M.join(e,"webflow.json");P.existsSync(c)&&P.copyFileSync(c,M.join(t,"webflow.json"));let u=null;for(let d of[".json",".jsonc"]){let f=M.join(e,`clouduser.wrangler${d}`);if(P.existsSync(f)){u=f;break}}if(u){p.info("including user wrangler config in output..."),P.copyFileSync(u,M.join(t,"clouduser.wrangler.json"));let d=M.join(e,"clouduser","migrations");if(P.existsSync(d)){p.info("copying migrations from clouduser/migrations to output/migrations...");let f=M.join(t,"migrations");sc(d,f)}}}async function c_(e){let t=`${e}.tar.gz`;try{return await cy.create({gzip:!0,file:t,cwd:M.dirname(e)},[M.basename(e)]),p.info(`Tarball created: ${t}`),t}catch(n){throw new b(n,{prefix:"Failed to create tarball:"})}}function sc(e,t){P.mkdirSync(t,{recursive:!0});let n=P.readdirSync(e,{withFileTypes:!0});for(let r of n){let o=M.join(e,r.name),i=M.join(t,r.name);r.isDirectory()?sc(o,i):P.copyFileSync(o,i)}}function fy(e,t,n){P.mkdirSync(t,{recursive:!0});let r=P.readdirSync(e,{withFileTypes:!0});for(let o of r){if(o.name===n)continue;let i=M.join(e,o.name),s=M.join(t,o.name);o.isDirectory()?fy(i,s,n):P.copyFileSync(i,s)}}be();pe();V();var u_="DUPLICATE_ENVIRONMENT_MOUNT",d_="ENVIRONMENT_MOUNT_MISMATCH",p_="DUPLICATE_ENVIRONMENT_BRANCH",f_="INVALID_MOUNT_PATH_FORMAT",m_="INVALID_PROJECT_ID",my={[u_]:"An environment with this mount path already exists for this site. Please choose a different mount path.",[d_]:"This environment already exists with a different mount path. Please create a new environment or use the existing environment's mount path.",[p_]:"An environment with this branch already exists for this project.",[f_]:"Mount path format is invalid. It must start with a / and be followed by at least one character (e.g., /app).",[m_]:"Invalid project ID. This project may have been deleted or belongs to a different site. Please remove the 'project_id' from your webflow.json file and redeploy to create a new project."};function hy(e){let t={timestamp:new Date().toISOString()};if(e instanceof Error)t.code=e.name,t.msg=e.message,t.stack=e.stack;else if(typeof e=="object"&&e!==null){let r=e;t.code=typeof r.code=="string"?r.code:void 0,t.msg=typeof r.msg=="string"?r.msg:void 0,t.status=typeof r.status=="number"?r.status:void 0}let n=t.msg||"";p.error(`Error Details: ${JSON.stringify({timestamp:t.timestamp,code:t.code,message:t.msg,status:t.status,stack:t.stack},null,2)}`);for(let r in my)if(n.includes(r))return my[r];return`An unknown error occurred. Error code: ${t.code||"N/A"}, Message: ${t.msg||"No message provided"}`}var fr=D(require("fs")),lc=require("child_process");V();ae();Se();var gy=104857600;function yy(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,r)).toFixed(1))} ${n[r]}`}function h_(){try{let e=(0,lc.execSync)("git rev-parse HEAD",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!/^[0-9a-f]{40}$/.test(e))throw new Error("Invalid commit hash format");try{return(0,lc.execSync)("git status --porcelain --untracked-files=no",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().length>0?`git@${e}+dirty`:`git@${e}`}catch{return`git@${e}`}}catch{return`noversion@${new Date().toISOString()}`}}async function cc(e,t,n){let r=await fetch(`${W}${t}`,{method:n.method,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"},body:n.body?JSON.stringify(n.body):void 0});if(!r.ok){let o=await r.text(),i;try{i=JSON.parse(o)}catch{i={msg:o}}let s=hy(i);throw new Error(s)}return r.json()}async function by(e,t,n,r){let{manifest:o}=H(),i=o.cloud||{},s=i.project_id,a=i.framework;if(!a)throw new b("No framework specified in webflow.json. Please ensure your webflow.json has a cloud.framework property");let l=await g_(e,{siteId:e.siteId,apiToken:e.accessToken,framework:a,mountPath:n,environment:t,projectId:s,projectName:r?.projectName,description:r?.description,directory:r?.directory,version:h_()});return!s&&l.project_id&&(p.info("\u{1F4DD} Updating webflow.json with project ID..."),he({cloud:{...i,project_id:l.project_id}})),l}async function g_(e,t){let{siteId:n,framework:r,mountPath:o,environment:i,version:s,projectId:a,projectName:l,description:c,directory:u}=t,d={framework:r,mount_path:o,environment:i,version:s};return a&&(d.project_id=a),l&&(d.project_name=l),c&&(d.description=c),u&&(d.app_path=u),cc(e.accessToken,`/cosmic/${n}/cli-deploy-init`,{method:"POST",body:d})}async function wy(e,t){return cc(e.accessToken,`/cosmic/${e.siteId}/cli-project-environments/${t}`,{method:"GET"})}async function Dy(e){return cc(e.accessToken,`/cosmic/${e.siteId}/cli-projects`,{method:"GET"})}async function vy(e,t){if(!fr.existsSync(e))throw new Error(`Tarball not found at ${e}`);let n=fr.statSync(e);if(n.size>gy)throw new Error(`Build output is too large (${yy(n.size)}). Maximum allowed size is ${yy(gy)}.`);let r=fr.readFileSync(e),o=JSON.parse(t);if(!o.fields)throw new Error("Upload URL is missing fields property");let i=new FormData;Object.entries(o.fields).forEach(([l,c])=>{i.append(l,c)});let s=new Blob([r],{type:"application/gzip"});i.append("file",s,"output.tar.gz");let a=await fetch(o.url,{method:"POST",body:i});if(!a.ok){let l=await a.text();throw new b(l,{prefix:`${X} Upload failed with response:`})}}async function ky(e,t){if(!e||e==="undefined")throw new b("Completion URL is undefined or invalid");let n=new URL(e);t&&n.searchParams.set("failed","true");let r=await fetch(n.toString(),{method:"GET"});if(!r.ok)throw new b(`Failed to trigger deployment: ${r.status} ${r.statusText}`)}var xy=require("webflow-api");pe();pe();ae();function uc(e){return new xy.WebflowClient({accessToken:e,environment:{base:`${W}/v2`,dataApi:`${W}/v2`,contentDeliveryApi:`${xo}/v2`}})}async function so(e,t){try{let r=await uc(e).sites.get(t);return{id:r.id||t,displayName:r.displayName||"Unknown Site",shortName:r.shortName||"unknown-site",customDomains:r.customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new b(n,{prefix:"Error fetching site details:"})}}async function dc(e,t){try{return{customDomains:(await uc(e).sites.getCustomDomain(t)).customDomains?.map(o=>({id:o.id||"",url:o.url||""}))||[]}}catch(n){throw new b(n,{prefix:"Error fetching custom domains:"})}}async function pc(e){try{let t=await fetch(`https://${e}/manifest.json`);if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);return await t.json()}catch(t){throw new b(t,{prefix:`Failed to fetch manifest from ${e}:`})}}function fc(e,t,n){return e.cosmic&&Array.isArray(e.cosmic)?e.cosmic.some(r=>{if(r.mountPath!==t)return!1;if(!n)return!0;if(r.workerUrl)try{return new URL(r.workerUrl).hostname.split(".")[0]===n}catch{return!1}return!1}):!1}async function Cy(e,t,n){try{let r=uc(e),o=await so(e,t),i=[];if(n?.domains&&n.domains.length>0)for(let s of n.domains){let a=o.customDomains?.find(l=>l.url===s);a?.id&&i.push(a.id)}await r.sites.publish(t,{customDomains:i,publishToWebflowSubdomain:n?.publishToWebflowSubdomain??!0})}catch(r){throw new b(r,{prefix:"Error publishing site:"})}}Je();ks();V();async function Fy(e,t,n){let{siteId:r,accessToken:o}=e,i=En("Validating mount path configuration...").start();try{let s=await so(o,r),a=await dc(o,r),l=[`${s.shortName}.webflow.io`,...a.customDomains?.map(g=>g.url)||[]],c=0;i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (0/${l.length})`;let u=l.map(async g=>{try{let v=await pc(g),F=Array.isArray(v.cosmic)?v.cosmic.map(L=>L.mountPath).filter(L=>typeof L=="string"):[],S=fc(v,t,n);return{domain:g,mountPaths:F,isValid:S===!0}}catch(v){return{domain:g,mountPaths:[],isValid:!1,error:v instanceof Error?v.message:String(v)}}finally{c++,i.text=`Validating ${l.length} domain(s) for mount path: ${t}... (${c}/${l.length})`}}),d=await Promise.all(u),f=d.some(g=>!g.isValid),m=d.every(g=>g.isValid);return i.succeed("Mount path validation completed"),{isValid:m,domains:d,needsPublishing:f}}catch(s){throw i.fail("Mount path validation failed"),s}}async function Ey(e,t,n){let{siteId:r,accessToken:o}=e;try{let i=await so(o,r),s=await dc(o,r),l=[`${i.shortName}.webflow.io`,...s.customDomains?.map(u=>u.url)||[]].map(async u=>{try{let d=await pc(u),f=fc(d,t,n);return{domain:u,isValid:f}}catch(d){return p.debug(`Could not verify mount path for ${u}: ${d}`),{domain:u,isValid:!1}}});return(await Promise.all(l)).filter(u=>u.isValid).map(u=>u.domain)}catch(i){return p.debug(`Error getting valid domains: ${i}`),[]}}function _y(e,t){return e.map(n=>`${n.startsWith("localhost")||n.startsWith("127.0.0.1")?"http":"https"}://${n}${t}`)}async function Sy(e){let t=e.map(r=>({name:r,value:r,checked:!0})),n=await Eo({message:"Select which domains you want to publish to update the mount path configuration:",choices:t,validate:r=>r.length===0?"Please select at least one domain to publish to.":!0});return n??[]}async function Ty(){return await Ge({message:"The mount path doesn't match on some domains. Would you like to publish the site to update the configuration?",default:!0})}async function mc(e,t){let{siteId:n,accessToken:r}=e,o=En(`Publishing site to ${t.length} domain(s)...`).start();try{let s=`${(await so(r,n)).shortName}.webflow.io`,a=t.includes(s),l=t.filter(c=>c!==s);await Cy(r,n,{domains:l,publishToWebflowSubdomain:a}),o.succeed(`Site published successfully to selected domains: ${t.join(", ")}`)}catch{throw o.fail("Failed to publish site"),new Error("Failed to publish site")}}be();V();Ee();pe();_e();ae();Se();var Ji=async()=>{try{let e=await Ql();return Object.keys(e)}catch(e){return p.error(e,{prefix:"Failed to get available scaffolds:"}),[]}},hc=async(e,t,n=Bi,r)=>{let o=`./${e}`,i=await Ql(),s=null,a=!1;try{let l=Date.now(),{manifest:c}=H(),u=await we(c,{site:r}),d=u.accessToken,f=u.siteId;if(s=Z.forCloud({authToken:d,siteId:f}),await Xl(e,t,n,i,f,d),process.chdir(o),f){p.info("Running devlink sync to fetch your Webflow components...");try{await y_({site:f,apiToken:d}),a=!0}catch(g){p.error(g,{prefix:"Failed to run devlink sync:"}),p.info("You can manually run 'npx webflow devlink sync' later to sync your components.")}}let m=Date.now()-l;await s?.sendUsage("project_init",{scaffold:n,scaffoldName:n,devlinkSyncStatus:a,totalDuration:m,mountPath:t}),Ay(e)}catch(l){throw p.error(l,{prefix:"Error during Webflow authentication:"}),await Xl(e,t,n,i),process.chdir(o),p.error("Project scaffold was created, but authentication failed."),p.error("To set up Webflow credentials later, run:"),p.error(" webflow auth login"),Ay(e),new b(l,{skipLogging:!0})}},y_=async e=>{let{syncComponents:t}=await Promise.resolve().then(()=>(Dl(),sh));await t(void 0,{site:e.site,apiToken:e.apiToken})},b_=e=>{if(e?.skipMountPathCheck!==void 0)return e.skipMountPathCheck;try{let{manifest:t}=H();return t.cloud?.skipMountPathCheck===!0}catch{return!1}},w_=async(e,t,n,r)=>{p.info("\u{1F50D} Validating mount path configuration...");let o=await Fy(e,t,n);if(o.isValid)p.info(`${te} Mount path validation passed`);else if(p.info(`
138
+ \u{1F4CB} Mount path validation results:`),o.domains.forEach(i=>{let s=i.isValid?te:X,a=i.isValid?`(mountPath: ${i.mountPaths[0]})`:"(no matching mountPath)";p.info(`${s} ${i.domain} ${a}`),i.error&&p.debug(` Error: ${i.error}`)}),o.needsPublishing)if(r){p.info("\u{1F680} Auto-publishing site to update mount path configuration...");let i=o.domains.filter(s=>!s.isValid).map(s=>s.domain);await mc(e,i)}else if(await Ty()&&xt()){let s=o.domains.filter(l=>!l.isValid).map(l=>l.domain),a=await Sy(s);await mc(e,a)}else p.warn("\u26A0\uFE0F Continuing with deployment without publishing...")},D_=async(e,t,n,r)=>{p.info(`
139
+ \u{1F3D7}\uFE0F Building project...`);let o=await uy(e,{mountPath:n,telemetry:r?.telemetry,deployUrl:t.deploy_url,environmentId:t.environment_id});p.info("\u{1F4E4} Uploading build artifacts...");let i=Date.now();await vy(o,t.upload_url);let s=Date.now()-i;return p.info(`${te} Upload completed in ${(s/1e3).toFixed(1)}s`),o},v_=async(e,t,n)=>{p.success(`
140
+ \u{1F310} Your cloud app will soon be available at:`);try{let r=await Ey(e,t,n),o=_y(r,t);o.length>0?o.forEach(i=>{p.info(` ${i}`)}):p.warn(" No domains found with the correct mount path configuration yet.")}catch(r){p.warn(` Could not determine deployment links: ${r instanceof Error?r.message:r}`)}},k_=e=>{e.site_slug?p.success(`Visit your deployment:
139
141
 
140
142
  ${An}/dashboard/sites/${e.site_slug}/webflow-cloud/projects/${e.project_id}/environments/${e.environment_id}/deployments/${e.deployment_id}`):p.info(`
141
- Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},D_=async(e,t,n,r)=>{try{await Dy(t.completion_url,!!r),r?p.error(`
143
+ Visit the webflow Cloud dashboard to view your deployment: https://webflow.com/dashboard/sites`)},x_=async(e,t,n,r)=>{try{await ky(t.completion_url,!!r),r?p.error(`
142
144
  ${X} Deployment failed due to build error.`):(p.success(`
143
- ${te} Deployment triggered successfully!`),await b_(e,n,t.environment_id),w_(t))}catch(o){throw new b(o,{prefix:"Failed to trigger deployment:"})}},v_=(e,t)=>{e&&uy(process.cwd(),e),t&&cy(t)},Ty=async(e,t,n,r)=>{let o=null,i=null,s=Date.now(),a=null,l=null,c=sc(process.cwd()),u=r?.telemetry;await u?.sendUsage("cloud_deploy_start",{environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,cloudflareBindings:c});try{p.info("\u{1F527} Detecting framework..."),a=await Ng(),p.info(`Framework: ${a.framework}`),p.info(`Build command: ${a.config.build_command}`),p.info("\u{1F3D7}\uFE0F Building project..."),o=await gy(e,t,n,r),h_(r)?p.info("\u23ED\uFE0F Skipping mount path validation..."):await g_(e,n,o.environment_id,r?.autoPublish),i=await y_(a,o,n,r),p.info(`Starting deployment process for environment: ${t} at mount path: ${n}`);let d=Date.now()-s;await u?.sendUsage("cloud_deploy_success",{duration:d,environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,framework:a.framework,buildCommand:a.config.build_command,cloudflareBindings:c})}catch(d){l=d instanceof Error?d:new Error(String(d)),p.error(l,{prefix:"Error during deployment initialization:"});let f=Date.now()-s;await u?.sendError(l,"cloud_deploy_failure",{duration:f,environment:t,mountPath:n,projectName:r?.projectName,cloudflareBindings:c,argv:process.argv.slice(2)})}finally{if(v_(a,i),o&&await D_(e,o,n,l),l)throw new b(l,{skipLogging:!0})}},Sy=e=>{p.info("--- "),p.info(E.bold.green("Get started with the following commands:")),p.info(` cd ${e}`),p.info(" npm install"),p.info(" npm run dev"),p.info(` webflow cloud deploy
145
+ ${te} Deployment triggered successfully!`),await v_(e,n,t.environment_id),k_(t))}catch(o){throw new b(o,{prefix:"Failed to trigger deployment:"})}},C_=(e,t)=>{e&&py(process.cwd(),e),t&&dy(t)},Oy=async(e,t,n,r)=>{let o=null,i=null,s=Date.now(),a=null,l=null,c=ac(process.cwd()),u=r?.telemetry;await u?.sendUsage("cloud_deploy_start",{environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,cloudflareBindings:c});try{p.info("\u{1F527} Detecting framework..."),a=await Mg(),p.info(`Framework: ${a.framework}`),p.info(`Build command: ${a.config.build_command}`),p.info("\u{1F3D7}\uFE0F Building project..."),o=await by(e,t,n,r),b_(r)?p.info("\u23ED\uFE0F Skipping mount path validation..."):await w_(e,n,o.environment_id,r?.autoPublish),i=await D_(a,o,n,r),p.info(`Starting deployment process for environment: ${t} at mount path: ${n}`);let d=Date.now()-s;await u?.sendUsage("cloud_deploy_success",{duration:d,environment:t,mountPath:n,projectName:r?.projectName,hasDescription:!!r?.description,hasDirectory:!!r?.directory,framework:a.framework,buildCommand:a.config.build_command,cloudflareBindings:c})}catch(d){l=d instanceof Error?d:new Error(String(d)),p.error(l,{prefix:"Error during deployment initialization:"});let f=Date.now()-s;await u?.sendError(l,"cloud_deploy_failure",{duration:f,environment:t,mountPath:n,projectName:r?.projectName,cloudflareBindings:c,argv:process.argv.slice(2)})}finally{if(C_(a,i),o&&await x_(e,o,n,l),l)throw new b(l,{skipLogging:!0})}},Ay=e=>{p.info("--- "),p.info(E.bold.green("Get started with the following commands:")),p.info(` cd ${e}`),p.info(" npm install"),p.info(" npm run dev"),p.info(` webflow cloud deploy
144
146
 
145
147
  `),p.info("Run the following command to sync Webflow components when they update:"),p.info(` webflow devlink sync
146
- `),p.info("--- ")};be();Je();nt();qe();V();_e();var Ay=D(require("path"));function vn(e){if(!e||e.trim()==="")return"/";let t=Ay.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((r,o)=>o===0?r:encodeURIComponent(r)).join("/"),t}function Hi(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}ae();var Oy=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects");t.command("create").description("Create a new Webflow Cloud project").argument("<name>","Project name").option("-f, --framework <framework>","Framework to use","nextjs").action(async(n,r)=>{let{framework:o}=r;if(!(await Ji()).find(a=>a===o)){p.error(`Framework ${o} not found`);return}await mc(n,o,o)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let n=await Ji();p.info("Available project templates:"),n.length>0?n.forEach(r=>p.info(`- ${r}`)):p.info("No templates found.")}),t.command("init").description("Bootstrap a new Webflow Cloud project").option("-n, --project-name <name>","Project name").option("-f, --framework <framework>","Framework to use (e.g., astro, nextjs)").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-s, --site-id <siteId>","Webflow site ID to connect to").action(async n=>{let r=process.stdin.isTTY,o=await Ji(),i={};if(r&&xt()){if(!n.projectName){let d=await Re({message:"What would you like to name your project?",validate:f=>f.trim()===""?"Project name cannot be empty":!0});if(d==null)throw new b("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");i.projectName=d}if(n.framework||(i.scaffoldName=await tt({message:"Which framework would you like to use?",choices:o.map(d=>({name:d,value:d})),default:"astro"})),!n.mount){let d=await Re({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});i.mountPath=vn(d)}}let s=n.projectName||i.projectName,a=n.framework||i.scaffoldName,l=n.mount||i.mountPath||"/app",c=n.siteId,u=vn(l);if(!s||typeof s!="string"||s.trim()==="")throw new b("--project-name cannot be empty");if(!a||typeof a!="string"||!o.includes(a)){let d=o.map(f=>`- ${f}`).join(`
148
+ `),p.info("--- ")};be();Je();nt();qe();V();_e();var Iy=D(require("path"));function vn(e){if(!e||e.trim()==="")return"/";let t=Iy.posix.normalize(e);return t.startsWith("/")||(t="/"+t),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t=t.split("/").map((r,o)=>o===0?r:encodeURIComponent(r)).join("/"),t}function Hi(e){return!(!e||e.trim()===""||!e.startsWith("/")||e.includes(".."))}ae();var Py=e=>{let t=e.command("cloud").description("Create and manage Webflow Cloud projects");t.command("create").description("Create a new Webflow Cloud project").argument("<name>","Project name").option("-f, --framework <framework>","Framework to use","nextjs").action(async(n,r)=>{let{framework:o}=r;if(!(await Ji()).find(a=>a===o)){p.error(`Framework ${o} not found`);return}await hc(n,o,o)}),t.command("list").description("Get list of project templates that can be used for `init`").action(async()=>{let n=await Ji();p.info("Available project templates:"),n.length>0?n.forEach(r=>p.info(`- ${r}`)):p.info("No templates found.")}),t.command("init").description("Bootstrap a new Webflow Cloud project").option("-n, --project-name <name>","Project name").option("-f, --framework <framework>","Framework to use (e.g., astro, nextjs)").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-s, --site-id <siteId>","Webflow site ID to connect to").action(async n=>{let r=process.stdin.isTTY,o=await Ji(),i={};if(r&&xt()){if(!n.projectName){let d=await Re({message:"What would you like to name your project?",validate:f=>f.trim()===""?"Project name cannot be empty":!0});if(d==null)throw new b("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");i.projectName=d}if(n.framework||(i.scaffoldName=await tt({message:"Which framework would you like to use?",choices:o.map(d=>({name:d,value:d})),default:"astro"})),!n.mount){let d=await Re({message:"What path do you want to use locally? (e.g., /app)",default:"/app"});i.mountPath=vn(d)}}let s=n.projectName||i.projectName,a=n.framework||i.scaffoldName,l=n.mount||i.mountPath||"/app",c=n.siteId,u=vn(l);if(!s||typeof s!="string"||s.trim()==="")throw new b("--project-name cannot be empty");if(!a||typeof a!="string"||!o.includes(a)){let d=o.map(f=>`- ${f}`).join(`
147
149
  `);throw new b(`--framework "${a||"undefined"}" not found
148
150
 
149
151
  Available frameworks:
150
- ${d}`)}if(typeof u!="string"||!Hi(u))throw new b("Invalid mount path: "+u);if(!c&&(!r||ue()))throw new b("--site-id is required");await mc(s,u,a,c)}),t.command("deploy").description("Deploy your Webflow Cloud project").option("-e, --environment <environment>","Environment name").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-n, --project-name <name>","Project name (for new projects)").option("-d, --directory <path>","Project directory path (for new projects)").option("--description <description>","Project description (for new projects)").option("--skip-mount-path-check","Skip mount path checking").option("--auto-publish","Automatically publish site for mount path updates").action(async n=>{let{manifest:r}=H(),o=await we(r),i;try{i=Z.forCloud({authToken:o.accessToken,siteId:o.siteId})}catch(s){p.debug(`Failed to initialize telemetry: ${s}`)}try{if(n.directory)try{process.chdir(n.directory),p.info(`Changed directory to: ${n.directory}`)}catch(m){throw p.error(`Error: Could not change to directory ${n.directory}`),new b(m)}let{manifest:s}=H(),l=(s.cloud||{}).project_id,c,u,d=n.projectName,f=n.description;if(n.environment&&n.mount){if(c=n.environment,u=vn(n.mount),!Hi(u))throw new b("Invalid mount path: "+u)}else{let m=[];if(!l){if(!d&&ue())throw new b("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let v=await by(o);if(v.projects.length>0){let F=await tt({message:"Select a project to deploy to:",choices:[...v.projects.map(S=>({name:`${S.name} (${S.description||"No description"})`,value:S.id})),{name:"Create new project",value:null}]});F?(l=F,p.info("\u{1F4DD} Updating webflow.json with project ID..."),he({cloud:{project_id:F}})):p.info("Creating a new project will be handled during deployment.")}else p.info("No existing projects found. A new project will be created during deployment.")}catch(v){p.warn("Could not fetch existing projects. A new project will be created during deployment."),p.warn(v instanceof Error?v.message:String(v))}}if(!l&&!d&&(d=await Re({message:"What would you like to name your new project?",default:"New Webflow Cloud Project",validate:v=>v.trim()===""?"Project name cannot be empty":!0})),l)try{let F=(await yy(o,l)).environments.map(S=>({name:`${S.branch} (${S.mount})`,value:{branch:S.branch,mount:S.mount}}));m.push(...F)}catch(v){throw new b(v,{prefix:"Error fetching project environments:"})}m.push({name:"Create new environment",value:null});let g=await tt({message:"Select an environment to deploy to:",choices:m});if(g)c=g.branch,u=vn(g.mount);else if(n.environment?c=n.environment:c=await Re({message:"What environment would you like to deploy to?",default:"main",validate:v=>v.trim()===""?"Environment cannot be empty":!0}),n.mount)u=vn(n.mount);else{let v=await Re({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});u=vn(v)}}if(!Hi(u))throw new b("Invalid mount path: "+u);await Ty(o,c,u,{projectName:d,description:f,directory:n.directory,skipMountPathCheck:n.skipMountPathCheck,autoPublish:n.autoPublish,telemetry:i})}catch(s){throw new b(s,{prefix:"Error during deployment setup:"})}})};var gc=require("commander");nt();qe();be();V();ae();Se();Ee();pe();Et();ae();ae();function re(e,t){if(/[\x00-\x1f?#%/\\]/.test(e)||e.includes(".."))throw new b(`Invalid ${t}: "${e}" contains disallowed characters.`,{isUserError:!0})}var hc=e=>e.replace(/\x1b\[[0-9;]*m/g,""),Iy=(e,t)=>e+" ".repeat(Math.max(0,t-hc(e).length));function kn(e,t){let n=e.map((s,a)=>Math.max(hc(s).length,...t.map(l=>hc(String(l[a])).length))),r=n.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>Iy(s,n[a]+2)).join(""),i=t.map(s=>s.map((a,l)=>Iy(String(a),n[l]+2)).join("")).join(`
152
+ ${d}`)}if(typeof u!="string"||!Hi(u))throw new b("Invalid mount path: "+u);if(!c&&(!r||ue()))throw new b("--site-id is required");await hc(s,u,a,c)}),t.command("deploy").description("Deploy your Webflow Cloud project").option("-e, --environment <environment>","Environment name").option("-m, --mount <mount>","Mount path (e.g., /app)").option("-n, --project-name <name>","Project name (for new projects)").option("-d, --directory <path>","Project directory path (for new projects)").option("--description <description>","Project description (for new projects)").option("--skip-mount-path-check","Skip mount path checking").option("--auto-publish","Automatically publish site for mount path updates").action(async n=>{let{manifest:r}=H(),o=await we(r),i;try{i=Z.forCloud({authToken:o.accessToken,siteId:o.siteId})}catch(s){p.debug(`Failed to initialize telemetry: ${s}`)}try{if(n.directory)try{process.chdir(n.directory),p.info(`Changed directory to: ${n.directory}`)}catch(m){throw p.error(`Error: Could not change to directory ${n.directory}`),new b(m)}let{manifest:s}=H(),l=(s.cloud||{}).project_id,c,u,d=n.projectName,f=n.description;if(n.environment&&n.mount){if(c=n.environment,u=vn(n.mount),!Hi(u))throw new b("Invalid mount path: "+u)}else{let m=[];if(!l){if(!d&&ue())throw new b("When --no-input mode is enabled please provide the --project-name option or the cloud.project_id manifest field.");try{let v=await Dy(o);if(v.projects.length>0){let F=await tt({message:"Select a project to deploy to:",choices:[...v.projects.map(S=>({name:`${S.name} (${S.description||"No description"})`,value:S.id})),{name:"Create new project",value:null}]});F?(l=F,p.info("\u{1F4DD} Updating webflow.json with project ID..."),he({cloud:{project_id:F}})):p.info("Creating a new project will be handled during deployment.")}else p.info("No existing projects found. A new project will be created during deployment.")}catch(v){p.warn("Could not fetch existing projects. A new project will be created during deployment."),p.warn(v instanceof Error?v.message:String(v))}}if(!l&&!d&&(d=await Re({message:"What would you like to name your new project?",default:"New Webflow Cloud Project",validate:v=>v.trim()===""?"Project name cannot be empty":!0})),l)try{let F=(await wy(o,l)).environments.map(S=>({name:`${S.branch} (${S.mount})`,value:{branch:S.branch,mount:S.mount}}));m.push(...F)}catch(v){throw new b(v,{prefix:"Error fetching project environments:"})}m.push({name:"Create new environment",value:null});let g=await tt({message:"Select an environment to deploy to:",choices:m});if(g)c=g.branch,u=vn(g.mount);else if(n.environment?c=n.environment:c=await Re({message:"What environment would you like to deploy to?",default:"main",validate:v=>v.trim()===""?"Environment cannot be empty":!0}),n.mount)u=vn(n.mount);else{let v=await Re({message:"What path should this environment be mounted at? (e.g., /app)",default:"/app"});u=vn(v)}}if(!Hi(u))throw new b("Invalid mount path: "+u);await Oy(o,c,u,{projectName:d,description:f,directory:n.directory,skipMountPathCheck:n.skipMountPathCheck,autoPublish:n.autoPublish,telemetry:i})}catch(s){throw new b(s,{prefix:"Error during deployment setup:"})}})};var yc=require("commander");nt();qe();be();V();ae();Se();Ee();pe();Et();ae();ae();function re(e,t){if(/[\x00-\x1f?#%/\\]/.test(e)||e.includes(".."))throw new b(`Invalid ${t}: "${e}" contains disallowed characters.`,{isUserError:!0})}var gc=e=>e.replace(/\x1b\[[0-9;]*m/g,""),Ry=(e,t)=>e+" ".repeat(Math.max(0,t-gc(e).length));function kn(e,t){let n=e.map((s,a)=>Math.max(gc(s).length,...t.map(l=>gc(String(l[a])).length))),r=n.map(s=>"\u2500".repeat(s+2)).join("\u2500"),o=e.map((s,a)=>Ry(s,n[a]+2)).join(""),i=t.map(s=>s.map((a,l)=>Ry(String(a),n[l]+2)).join("")).join(`
151
153
  `);return`${o}
152
154
  ${r}
153
- ${i}`}async function Py(e,t){re(t,"siteId");let n=await Y(`${U}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to list collections: ${n.status} ${n.statusText}`);return(await n.json()).collections??[]}async function Ry(e,t){re(t,"collectionId");let n=await Y(`${U}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to get collection: ${n.status} ${n.statusText}`);let r=await n.json();return{...r,fields:r.fields??[]}}async function jy(e,t,n){re(t,"siteId");let r={displayName:n.displayName,singularName:n.singularName};n.slug&&(r.slug=n.slug);let o=await Y(`${U}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new b(`Failed to create collection: ${o.status} ${o.statusText}`);return await o.json()}async function By(e,t,n){re(t,"collectionId");let r=await Y(`${U}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:n.displayName,type:n.type,isRequired:n.isRequired??!1})});if(!r.ok)throw new b(`Failed to create field: ${r.status} ${r.statusText}`);return await r.json()}async function $y(e,t,n={}){re(t,"collectionId");let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset)),n.cmsLocaleId&&r.set("cmsLocaleId",n.cmsLocaleId);let o=r.toString()?`?${r.toString()}`:"",i=await Y(`${U}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to list items: ${i.status} ${i.statusText}`);let s=await i.json();return{items:s.items??[],total:s.total??0,count:s.count??s.items?.length??0,limit:s.limit??n.limit??100,offset:s.offset??n.offset??0}}async function Ny(e,t,n,r){re(t,"collectionId"),re(n,"itemId");let o=r?`?cmsLocaleId=${encodeURIComponent(r)}`:"",i=await Y(`${U}/v2/collections/${t}/items/${n}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to get item: ${i.status} ${i.statusText}`);return await i.json()}async function Ly(e,t,n,r=!1){re(t,"collectionId");let o=await Y(`${U}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n,isDraft:r})});if(!o.ok)throw new b(`Failed to create item: ${o.status} ${o.statusText}`);return await o.json()}async function My(e,t,n,r){re(t,"collectionId"),re(n,"itemId");let o=await Y(`${U}/v2/collections/${t}/items/${n}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r})});if(!o.ok)throw new b(`Failed to update item: ${o.status} ${o.statusText}`);return await o.json()}async function zy(e,t,n){re(t,"collectionId"),re(n,"itemId");let r=await Y(`${U}/v2/collections/${t}/items/${n}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new b(`Failed to delete item: ${r.status} ${r.statusText}`)}async function Uy(e,t,n){re(t,"collectionId"),n.forEach(o=>re(o,"itemId"));let r=await Y(`${U}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:n})});if(!r.ok)throw new b(`Failed to publish items: ${r.status} ${r.statusText}`);return await r.json()}function Wy(e,t=["id","displayName","slug"]){if(e.length===0)return E.dim("No collections found.");let n=["id","displayName","singularName","slug","lastUpdated"],r=t.filter(s=>n.includes(s));if(r.length===0)return E.red(`Invalid fields. Available: ${n.join(", ")}`);let o=r.map(s=>E.bold(s)),i=e.map(s=>r.map(a=>{let l=s[a];return l?a==="lastUpdated"?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):l:E.dim("\u2014")}));return kn(o,i)}function Vy(e){let t=[`${E.bold("Collection:")} ${e.displayName}`,`${E.bold("ID:")} ${e.id}`,`${E.bold("Slug:")} ${e.slug}`,`${E.bold("Singular:")} ${e.singularName}`,`${E.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",E.bold("Fields:")];if(e.fields.length===0)return t.push(E.dim(" No fields defined.")),t.join(`
155
+ ${i}`}async function jy(e,t){re(t,"siteId");let n=await Y(`${W}/v2/sites/${t}/collections`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to list collections: ${n.status} ${n.statusText}`);return(await n.json()).collections??[]}async function By(e,t){re(t,"collectionId");let n=await Y(`${W}/v2/collections/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to get collection: ${n.status} ${n.statusText}`);let r=await n.json();return{...r,fields:r.fields??[]}}async function $y(e,t,n){re(t,"siteId");let r={displayName:n.displayName,singularName:n.singularName};n.slug&&(r.slug=n.slug);let o=await Y(`${W}/v2/sites/${t}/collections`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new b(`Failed to create collection: ${o.status} ${o.statusText}`);return await o.json()}async function Ny(e,t,n){re(t,"collectionId");let r=await Y(`${W}/v2/collections/${t}/fields`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({displayName:n.displayName,type:n.type,isRequired:n.isRequired??!1})});if(!r.ok)throw new b(`Failed to create field: ${r.status} ${r.statusText}`);return await r.json()}async function Ly(e,t,n={}){re(t,"collectionId");let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset)),n.cmsLocaleId&&r.set("cmsLocaleId",n.cmsLocaleId);let o=r.toString()?`?${r.toString()}`:"",i=await Y(`${W}/v2/collections/${t}/items${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to list items: ${i.status} ${i.statusText}`);let s=await i.json();return{items:s.items??[],total:s.total??0,count:s.count??s.items?.length??0,limit:s.limit??n.limit??100,offset:s.offset??n.offset??0}}async function My(e,t,n,r){re(t,"collectionId"),re(n,"itemId");let o=r?`?cmsLocaleId=${encodeURIComponent(r)}`:"",i=await Y(`${W}/v2/collections/${t}/items/${n}${o}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to get item: ${i.status} ${i.statusText}`);return await i.json()}async function zy(e,t,n,r=!1){re(t,"collectionId");let o=await Y(`${W}/v2/collections/${t}/items`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:n,isDraft:r})});if(!o.ok)throw new b(`Failed to create item: ${o.status} ${o.statusText}`);return await o.json()}async function Wy(e,t,n,r){re(t,"collectionId"),re(n,"itemId");let o=await Y(`${W}/v2/collections/${t}/items/${n}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({fieldData:r})});if(!o.ok)throw new b(`Failed to update item: ${o.status} ${o.statusText}`);return await o.json()}async function Uy(e,t,n){re(t,"collectionId"),re(n,"itemId");let r=await Y(`${W}/v2/collections/${t}/items/${n}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!r.ok)throw new b(`Failed to delete item: ${r.status} ${r.statusText}`)}async function Vy(e,t,n){re(t,"collectionId"),n.forEach(o=>re(o,"itemId"));let r=await Y(`${W}/v2/collections/${t}/items/publish`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({itemIds:n})});if(!r.ok)throw new b(`Failed to publish items: ${r.status} ${r.statusText}`);return await r.json()}function qy(e,t=["id","displayName","slug"]){if(e.length===0)return E.dim("No collections found.");let n=["id","displayName","singularName","slug","lastUpdated"],r=t.filter(s=>n.includes(s));if(r.length===0)return E.red(`Invalid fields. Available: ${n.join(", ")}`);let o=r.map(s=>E.bold(s)),i=e.map(s=>r.map(a=>{let l=s[a];return l?a==="lastUpdated"?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):l:E.dim("\u2014")}));return kn(o,i)}function Gy(e){let t=[`${E.bold("Collection:")} ${e.displayName}`,`${E.bold("ID:")} ${e.id}`,`${E.bold("Slug:")} ${e.slug}`,`${E.bold("Singular:")} ${e.singularName}`,`${E.bold("Updated:")} ${new Date(e.lastUpdated).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}`,"",E.bold("Fields:")];if(e.fields.length===0)return t.push(E.dim(" No fields defined.")),t.join(`
154
156
  `);let n=["NAME","SLUG","TYPE","REQUIRED"].map(o=>E.bold(o)),r=e.fields.map(o=>[o.displayName,o.slug,o.type,o.isRequired?"yes":"no"]);return t.push(kn(n,r)),t.join(`
155
- `)}function qy(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return E.dim("No items found.");let n=t.map(o=>E.bold(o)),r=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?E.yellow("draft"):E.green("live");if(i==="isArchived")return o.isArchived?E.dim("archived"):"";if(i==="lastUpdated"||i==="lastPublished"||i==="createdOn"){let a=o[i];return a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):E.dim("\u2014")}let s=o[i];return s==null?E.dim("\u2014"):String(s)}));return kn(n,r)}var Dt=new gc.Option("--json","Output as JSON"),mr=new gc.Option("--dry-run","Preview without executing"),Gy=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),n=t.command("collections").description("Manage CMS collections");n.command("list").description("List all CMS collections for a site").addOption(to).addOption(Dt).option("--fields <fields>","Comma-separated fields to display (id, displayName, singularName, slug, lastUpdated)","id,displayName,slug").action(async i=>{let s,a;if(i.site)s=await le(),a=i.site;else{let{manifest:u}=H(),d=await we(u);s=d.accessToken,a=d.siteId}let l=Z.forCms({authToken:s,siteId:a}),c=Date.now();try{let u=await Py(s,a);if(await l.sendUsage("cms_collections_list",{duration:Date.now()-c,count:u.length}),u.length===0){p.info("No collections found.");return}if(i.json){p.info(JSON.stringify(u,null,2));return}let d=i.fields.split(",").map(f=>f.trim());p.info(Wy(u,d))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_list",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to list collections:`})}}),n.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(Dt).action(async(i,s)=>{let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await Ry(a,i);if(await l.sendUsage("cms_collections_get",{duration:Date.now()-c}),s.json){p.info(JSON.stringify(u,null,2));return}p.info(Vy(u))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_get",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to get collection:`})}}),n.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(to).requiredOption("--name <displayName>","Collection display name").option("--singular-name <singularName>","Singular name (defaults to --name)").option("--slug <slug>","URL slug for the collection (auto-derived from --name if omitted)").addOption(mr).addOption(Dt).action(async i=>{let s=i.singularName??i.name,a=i.slug??i.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(i.dryRun){p.info("Dry run \u2014 would create collection:"),p.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let l,c;if(i.site)l=await le(),c=i.site;else{let{manifest:f}=H(),m=await we(f);l=m.accessToken,c=m.siteId}let u=Z.forCms({authToken:l,siteId:c}),d=Date.now();try{let f=await jy(l,c,{displayName:i.name,singularName:s,slug:a});if(await u.sendUsage("cms_collections_create",{duration:Date.now()-d}),i.json){p.info(JSON.stringify(f,null,2));return}p.info(`${te} Collection created: ${f.id}`),p.info(` Name: ${f.displayName}`),p.info(` Slug: ${f.slug}`)}catch(f){throw await u.sendError(f instanceof Error?f:new Error(String(f)),"cms_collections_create",{duration:Date.now()-d}),new b(f,{prefix:`${X} Failed to create collection:`})}}),t.command("fields").description("Manage CMS collection fields").command("create").description("Add a field to a CMS collection. Use --dry-run to preview.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--name <displayName>","Field display name").requiredOption("--type <type>","Field type (e.g. PlainText, RichText, Number, DateTime, Link, Image, Video, Color, Bool, Option, ItemRef, ItemRefSet)").option("--required","Mark field as required").addOption(mr).addOption(Dt).action(async i=>{if(i.dryRun){p.info("Dry run \u2014 would create field:"),p.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{let c=await By(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-l}),i.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Field created: ${c.id}`),p.info(` Name: ${c.displayName}`),p.info(` Type: ${c.type}`),p.info(` Slug: ${c.slug}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_fields_create",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to create field:`})}});let o=t.command("items").description("Manage CMS items");o.command("list").description("List items in a CMS collection").requiredOption("--collection <collectionId>","Collection ID").option("--limit <n>","Maximum items to return (default: 100)","100").option("--offset <n>","Number of items to skip (default: 0)","0").option("--locale <cmsLocaleId>","CMS locale ID to filter by").addOption(Dt).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await le(),a=Z.forCms({authToken:s}),l=Date.now(),c=parseInt(i.limit,10)||100,u=parseInt(i.offset,10)||0;try{let d=await $y(s,i.collection,{limit:c,offset:u,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-l,count:d.items.length}),d.items.length===0){p.info("No items found.");return}if(i.json){p.info(JSON.stringify(d,null,2));return}let f=i.fields.split(",").map(F=>F.trim());p.info(qy(d.items,f));let m=u+1,g=u+d.items.length;if(d.items.length>=c||u>0){let F=d.total>0?` of ${d.total}`:"";p.info(`
156
- Showing ${m}\u2013${g}${F} items. Use --offset ${g} to load next page.`)}}catch(d){throw await a.sendError(d instanceof Error?d:new Error(String(d)),"cms_items_list",{duration:Date.now()-l}),new b(d,{prefix:`${X} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(Dt).action(async i=>{let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{let c=await Ny(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-l}),i.json){p.info(JSON.stringify(c,null,2));return}let u=c.isArchived?"archived":c.isDraft?"draft":"live";p.info(`${c.id} [${u}]`),p.info(` Last updated: ${new Date(c.lastUpdated).toLocaleString()}`),c.lastPublished&&p.info(` Last published: ${new Date(c.lastPublished).toLocaleString()}`),p.info(" Fields:"),p.info(JSON.stringify(c.fieldData,null,4).replace(/^/gm," "))}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_get",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(mr).addOption(Dt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new b(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){p.info("Dry run \u2014 would create item:"),p.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await Ly(a,i.collection,s,i.draft??!1);if(await l.sendUsage("cms_items_create",{duration:Date.now()-c,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}p.info(`${te} Item created: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_create",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(mr).addOption(Dt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new b(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){p.info("Dry run \u2014 would update item:"),p.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await My(a,i.collection,i.item,s);if(await l.sendUsage("cms_items_update",{duration:Date.now()-c,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}p.info(`${te} Item updated: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_update",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(mr).action(async i=>{if(i.dryRun){p.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),p.info("Dry run complete \u2014 no changes made.");return}let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{await zy(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-l,dryRun:!1}),p.info(`${te} Item deleted: ${i.item}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_delete",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(mr).addOption(Dt).action(async i=>{let s=i.items.split(",").map(u=>u.trim());if(i.dryRun){p.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(u=>p.info(` ${u}`)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await Uy(a,i.collection,s);if(await l.sendUsage("cms_items_publish",{duration:Date.now()-c,itemCount:s.length,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}let d=u.publishedItemIds?.length??0;p.info(`${te} Published ${d} item(s)`),u.errors?.length&&u.errors.forEach(f=>p.warn(` ${f.itemId}: ${f.message}`))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_publish",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to publish items:`})}})};Ee();nt();qe();be();V();ae();Se();Ee();pe();Et();ae();async function Hy(e,t,n={}){if(re(t,"siteId"),n.folderId){re(n.folderId,"folderId");let a=await k_(e,n.folderId),l=new Set(a.assets);if(l.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let c=[],u=0,d=100;for(;;){let F=await Y(`${U}/v2/sites/${t}/assets?limit=${d}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!F.ok)throw new b(`Failed to list assets: ${F.status} ${F.statusText}`);let S=await F.json(),L=S.assets??[];c.push(...L);let x=S.pagination?.total??0;if(u+=L.length,u>=x||L.length===0)break}let f=c.filter(F=>l.has(F.id)),m=n.offset??0,g=n.limit??f.length,v=f.slice(m,m+g);return{assets:v,pagination:{total:f.length,limit:v.length,offset:m}}}let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset));let o=r.toString(),i=await Y(`${U}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function Zy(e,t,n,r,o){re(t,"siteId"),o&&re(o,"folderId");let i=kl(n);x_(i.meta.title,i.meta.size);let s=r??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let l=await Y(`${U}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!l.ok)throw new b(`Failed to initiate asset upload: ${l.status} ${l.statusText}`);let c=await l.json(),u={fields:c.uploadDetails,_id:c.id,s3Url:c.hostedUrl??"",url:c.uploadUrl??"",contentType:c.contentType??"",origFileName:c.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await Kr(i,u)}catch(d){throw await Y(`${U}/v2/assets/${u._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),d}return{id:u._id,hostedUrl:u.s3Url,displayName:s,originalFileName:i.meta.title}}async function Ky(e,t,n){re(t,"assetId");let r=await Y(`${U}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new b(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function k_(e,t){re(t,"folderId");let n=await Y(`${U}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function Yy(e,t){re(t,"siteId");let n=await Y(`${U}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function Xy(e,t,n,r){re(t,"siteId"),r&&re(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await Y(`${U}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new b(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var Jy={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function x_(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=Jy[n];if(!r){let o=Object.keys(Jy).join(", ");throw new b(`Unsupported file type ".${n}". Allowed types: ${o}`,{isUserError:!0})}if(t>r.maxBytes){let o=r.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new b(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var Zi=["id","displayName","originalFileName","contentType","size","lastUpdated"];function Qy(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return E.dim("No assets found.");let n=t.filter(a=>Zi.includes(a));if(n.length===0)return E.red(`Invalid fields. Available: ${Zi.join(", ")}`);let r=t.filter(a=>!Zi.includes(a)),o=r.length>0?E.yellow(`Warning: unknown field(s) ignored: ${r.join(", ")}. Available: ${Zi.join(", ")}
157
- `):"",i=n.map(a=>E.bold(a)),s=e.map(a=>n.map(l=>{let c=a[l];if(c==null||l==="size"&&c===0)return E.dim("\u2014");if(l==="size")return C_(Number(c));if(l==="lastUpdated"){let d=new Date(String(c)),f=String(d.getMonth()+1).padStart(2,"0"),m=String(d.getDate()).padStart(2,"0"),g=String(d.getFullYear()).slice(-2),v=String(d.getHours()).padStart(2,"0"),F=String(d.getMinutes()).padStart(2,"0");return`${f}/${m}/${g} ${v}:${F}`}let u=String(c);return l==="displayName"&&u.length>40?E.dim("\u2026")+u.slice(-39):u}));return o+kn(i,s)}function C_(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function eb(e){if(e.length===0)return E.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>E.bold(o)),r=t.map(o=>[o.id,o.displayName,String(o.assets.length),new Date(o.lastUpdated).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})]);return kn(n,r)}var tb=e=>{let t=e.command("assets").description("Manage Webflow site assets");t.command("list").description("List all assets for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--folder <folderId>","Filter by folder ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, originalFileName, contentType, size, lastUpdated)","id,displayName,lastUpdated,size").option("--limit <n>","Max number of assets to return (default 100)",parseInt).option("--offset <n>","Number of assets to skip",parseInt).action(async r=>{let o,i;if(r.site)o=await le(),i=r.site;else{let{manifest:l}=H(),c=await we(l);o=c.accessToken,i=c.siteId}let s=Z.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:l,pagination:c}=await Hy(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){p.info("No assets found.");return}let u=[...l].sort((m,g)=>m.displayName.localeCompare(g.displayName));if(r.json){p.info(JSON.stringify({assets:u,pagination:c},null,2));return}let d=r.fields.split(",").map(m=>m.trim());p.info(Qy(u,d));let f=(r.offset??0)+l.length;f<c.total&&p.info(E.dim(`Showing ${f} of ${c.total} assets. Use --offset ${f} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
158
- Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(r,o)=>{if(o.dryRun){p.info(`Dry run \u2014 would upload: ${r}`),o.name&&p.info(` Display name: ${o.name}`),o.folder&&p.info(` Folder: ${o.folder}`),p.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await le(),s=o.site;else{let{manifest:c}=H(),u=await we(c);i=u.accessToken,s=u.siteId}let a=Z.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Zy(i,s,r,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-l,dryRun:!1}),o.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Asset uploaded: ${c.id}`),c.hostedUrl&&p.info(` URL: ${c.hostedUrl}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_upload",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(r,o)=>{if(!o.altText&&!o.displayName)throw new b("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){p.info(`Dry run \u2014 would update asset: ${r}`),o.altText&&p.info(` Alt text: ${o.altText}`),o.displayName&&p.info(` Display name: ${o.displayName}`),p.info("Dry run complete \u2014 no changes made.");return}let i=await le(),s=Z.forAssets({authToken:i}),a=Date.now();try{let l=await Ky(i,r,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){p.info(JSON.stringify(l,null,2));return}p.info(`${te} Asset updated: ${l.id}`),l.displayName&&p.info(` Display name: ${l.displayName}`),l.altText&&p.info(` Alt text: ${l.altText}`)}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_update",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to update asset:`})}});let n=t.command("folders").description("Manage asset folders");n.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async r=>{let o,i;if(r.site)o=await le(),i=r.site;else{let{manifest:l}=H(),c=await we(l);o=c.accessToken,i=c.siteId}let s=Z.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await Yy(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:l.length}),r.json){p.info(JSON.stringify(l,null,2));return}p.info(eb(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to list folders:`})}}),n.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(r,o)=>{let i,s;if(o.site)i=await le(),s=o.site;else{let{manifest:c}=H(),u=await we(c);i=u.accessToken,s=u.siteId}let a=Z.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Xy(i,s,r,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-l}),o.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Folder created: ${c.id}`),p.info(` Name: ${c.displayName}`),c.parentFolder&&p.info(` Parent: ${c.parentFolder}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_create",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to create folder:`})}})};var nb=D(ko());function yc(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>yc(n,t))}function rb(e){let t=nb.default.version;e.name("webflow").description("Webflow CLI").version(t).addOption(Wl).addOption(Vl).addOption(ql).addOption(Gl).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||mu(!0),dt.start(),r.manifest&&hu(r.manifest);try{await Z.promptForConsentIfNeeded()}catch(o){p.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new Or().prompt()}catch(o){p.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{dt.displayGrouped(),dt.stop()}),Xu(e),Gy(e),Td(e),Og(e),Oy(e),Ag(e),tb(e),Fg(e),e.commands.forEach(n=>{yc(n,[Wl,Vl,ql,Gl])})}V();ae();var ib=new ob.Command;rb(ib);ib.parseAsync().catch(e=>{if(e instanceof b)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else e.skipLogging||p.error(e,{prefix:e.prefix});else p.error(e);process.exit(1)});
157
+ `)}function Jy(e,t=["id","isDraft","lastUpdated"]){if(e.length===0)return E.dim("No items found.");let n=t.map(o=>E.bold(o)),r=e.map(o=>t.map(i=>{if(i==="fieldData")return JSON.stringify(o.fieldData);if(i==="isDraft")return o.isDraft?E.yellow("draft"):E.green("live");if(i==="isArchived")return o.isArchived?E.dim("archived"):"";if(i==="lastUpdated"||i==="lastPublished"||i==="createdOn"){let a=o[i];return a?new Date(a).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):E.dim("\u2014")}let s=o[i];return s==null?E.dim("\u2014"):String(s)}));return kn(n,r)}var Dt=new yc.Option("--json","Output as JSON"),mr=new yc.Option("--dry-run","Preview without executing"),Hy=e=>{let t=e.command("cms").description("Manage Webflow CMS content"),n=t.command("collections").description("Manage CMS collections");n.command("list").description("List all CMS collections for a site").addOption(to).addOption(Dt).option("--fields <fields>","Comma-separated fields to display (id, displayName, singularName, slug, lastUpdated)","id,displayName,slug").action(async i=>{let s,a;if(i.site)s=await le(),a=i.site;else{let{manifest:u}=H(),d=await we(u);s=d.accessToken,a=d.siteId}let l=Z.forCms({authToken:s,siteId:a}),c=Date.now();try{let u=await jy(s,a);if(await l.sendUsage("cms_collections_list",{duration:Date.now()-c,count:u.length}),u.length===0){p.info("No collections found.");return}if(i.json){p.info(JSON.stringify(u,null,2));return}let d=i.fields.split(",").map(f=>f.trim());p.info(qy(u,d))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_list",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to list collections:`})}}),n.command("get").description("Get details and field schema for a CMS collection").argument("<collectionId>","Collection ID").addOption(Dt).action(async(i,s)=>{let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await By(a,i);if(await l.sendUsage("cms_collections_get",{duration:Date.now()-c}),s.json){p.info(JSON.stringify(u,null,2));return}p.info(Gy(u))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_collections_get",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to get collection:`})}}),n.command("create").description("Create a new CMS collection on a site. Use --dry-run to preview.").addOption(to).requiredOption("--name <displayName>","Collection display name").option("--singular-name <singularName>","Singular name (defaults to --name)").option("--slug <slug>","URL slug for the collection (auto-derived from --name if omitted)").addOption(mr).addOption(Dt).action(async i=>{let s=i.singularName??i.name,a=i.slug??i.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"");if(i.dryRun){p.info("Dry run \u2014 would create collection:"),p.info(JSON.stringify({displayName:i.name,singularName:s,slug:a},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let l,c;if(i.site)l=await le(),c=i.site;else{let{manifest:f}=H(),m=await we(f);l=m.accessToken,c=m.siteId}let u=Z.forCms({authToken:l,siteId:c}),d=Date.now();try{let f=await $y(l,c,{displayName:i.name,singularName:s,slug:a});if(await u.sendUsage("cms_collections_create",{duration:Date.now()-d}),i.json){p.info(JSON.stringify(f,null,2));return}p.info(`${te} Collection created: ${f.id}`),p.info(` Name: ${f.displayName}`),p.info(` Slug: ${f.slug}`)}catch(f){throw await u.sendError(f instanceof Error?f:new Error(String(f)),"cms_collections_create",{duration:Date.now()-d}),new b(f,{prefix:`${X} Failed to create collection:`})}}),t.command("fields").description("Manage CMS collection fields").command("create").description("Add a field to a CMS collection. Use --dry-run to preview.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--name <displayName>","Field display name").requiredOption("--type <type>","Field type (e.g. PlainText, RichText, Number, DateTime, Link, Image, Video, Color, Bool, Option, ItemRef, ItemRefSet)").option("--required","Mark field as required").addOption(mr).addOption(Dt).action(async i=>{if(i.dryRun){p.info("Dry run \u2014 would create field:"),p.info(JSON.stringify({collectionId:i.collection,displayName:i.name,type:i.type,isRequired:i.required??!1},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{let c=await Ny(s,i.collection,{displayName:i.name,type:i.type,isRequired:i.required??!1});if(await a.sendUsage("cms_fields_create",{duration:Date.now()-l}),i.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Field created: ${c.id}`),p.info(` Name: ${c.displayName}`),p.info(` Type: ${c.type}`),p.info(` Slug: ${c.slug}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_fields_create",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to create field:`})}});let o=t.command("items").description("Manage CMS items");o.command("list").description("List items in a CMS collection").requiredOption("--collection <collectionId>","Collection ID").option("--limit <n>","Maximum items to return (default: 100)","100").option("--offset <n>","Number of items to skip (default: 0)","0").option("--locale <cmsLocaleId>","CMS locale ID to filter by").addOption(Dt).option("--fields <fields>","Comma-separated fields to display (id, isDraft, isArchived, lastUpdated, fieldData)","id,isDraft,lastUpdated").action(async i=>{let s=await le(),a=Z.forCms({authToken:s}),l=Date.now(),c=parseInt(i.limit,10)||100,u=parseInt(i.offset,10)||0;try{let d=await Ly(s,i.collection,{limit:c,offset:u,cmsLocaleId:i.locale});if(await a.sendUsage("cms_items_list",{duration:Date.now()-l,count:d.items.length}),d.items.length===0){p.info("No items found.");return}if(i.json){p.info(JSON.stringify(d,null,2));return}let f=i.fields.split(",").map(F=>F.trim());p.info(Jy(d.items,f));let m=u+1,g=u+d.items.length;if(d.items.length>=c||u>0){let F=d.total>0?` of ${d.total}`:"";p.info(`
158
+ Showing ${m}\u2013${g}${F} items. Use --offset ${g} to load next page.`)}}catch(d){throw await a.sendError(d instanceof Error?d:new Error(String(d)),"cms_items_list",{duration:Date.now()-l}),new b(d,{prefix:`${X} Failed to list items:`})}}),o.command("get").description("Get a single CMS item by ID").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").option("--locale <cmsLocaleId>","CMS locale ID to retrieve content for").addOption(Dt).action(async i=>{let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{let c=await My(s,i.collection,i.item,i.locale);if(await a.sendUsage("cms_items_get",{duration:Date.now()-l}),i.json){p.info(JSON.stringify(c,null,2));return}let u=c.isArchived?"archived":c.isDraft?"draft":"live";p.info(`${c.id} [${u}]`),p.info(` Last updated: ${new Date(c.lastUpdated).toLocaleString()}`),c.lastPublished&&p.info(` Last published: ${new Date(c.lastPublished).toLocaleString()}`),p.info(" Fields:"),p.info(JSON.stringify(c.fieldData,null,4).replace(/^/gm," "))}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_get",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to get item:`})}}),o.command("create").description("Create a new CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--data <json>","Item field data as a JSON string").option("--draft","Create as draft (not published)").addOption(mr).addOption(Dt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new b(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){p.info("Dry run \u2014 would create item:"),p.info(JSON.stringify({fieldData:s,isDraft:i.draft??!1},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await zy(a,i.collection,s,i.draft??!1);if(await l.sendUsage("cms_items_create",{duration:Date.now()-c,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}p.info(`${te} Item created: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_create",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to create item:`})}}),o.command("update").description("Update an existing CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").requiredOption("--data <json>","Updated field data as a JSON string").addOption(mr).addOption(Dt).action(async i=>{let s;try{s=JSON.parse(i.data)}catch{throw new b(`Invalid JSON for --data: ${i.data}`)}if(i.dryRun){p.info("Dry run \u2014 would update item:"),p.info(JSON.stringify({collectionId:i.collection,itemId:i.item,fieldData:s},null,2)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await Wy(a,i.collection,i.item,s);if(await l.sendUsage("cms_items_update",{duration:Date.now()-c,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}p.info(`${te} Item updated: ${u.id}`)}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_update",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to update item:`})}}),o.command("delete").description("Delete a CMS item. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--item <itemId>","Item ID").addOption(mr).action(async i=>{if(i.dryRun){p.info(`Dry run \u2014 would delete item ${i.item} from collection ${i.collection}`),p.info("Dry run complete \u2014 no changes made.");return}let s=await le(),a=Z.forCms({authToken:s}),l=Date.now();try{await Uy(s,i.collection,i.item),await a.sendUsage("cms_items_delete",{duration:Date.now()-l,dryRun:!1}),p.info(`${te} Item deleted: ${i.item}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"cms_items_delete",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to delete item:`})}}),o.command("publish").description("Publish one or more CMS items. Use --dry-run to preview before executing.").requiredOption("--collection <collectionId>","Collection ID").requiredOption("--items <itemIds>","Comma-separated item IDs to publish").addOption(mr).addOption(Dt).action(async i=>{let s=i.items.split(",").map(u=>u.trim());if(i.dryRun){p.info(`Dry run \u2014 would publish ${s.length} item(s) in collection ${i.collection}:`),s.forEach(u=>p.info(` ${u}`)),p.info("Dry run complete \u2014 no changes made.");return}let a=await le(),l=Z.forCms({authToken:a}),c=Date.now();try{let u=await Vy(a,i.collection,s);if(await l.sendUsage("cms_items_publish",{duration:Date.now()-c,itemCount:s.length,dryRun:!1}),i.json){p.info(JSON.stringify(u,null,2));return}let d=u.publishedItemIds?.length??0;p.info(`${te} Published ${d} item(s)`),u.errors?.length&&u.errors.forEach(f=>p.warn(` ${f.itemId}: ${f.message}`))}catch(u){throw await l.sendError(u instanceof Error?u:new Error(String(u)),"cms_items_publish",{duration:Date.now()-c}),new b(u,{prefix:`${X} Failed to publish items:`})}})};Ee();nt();qe();be();V();ae();Se();Ee();pe();Et();ae();async function Ky(e,t,n={}){if(re(t,"siteId"),n.folderId){re(n.folderId,"folderId");let a=await F_(e,n.folderId),l=new Set(a.assets);if(l.size===0)return{assets:[],pagination:{total:0,limit:0,offset:0}};let c=[],u=0,d=100;for(;;){let F=await Y(`${W}/v2/sites/${t}/assets?limit=${d}&offset=${u}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!F.ok)throw new b(`Failed to list assets: ${F.status} ${F.statusText}`);let S=await F.json(),L=S.assets??[];c.push(...L);let x=S.pagination?.total??0;if(u+=L.length,u>=x||L.length===0)break}let f=c.filter(F=>l.has(F.id)),m=n.offset??0,g=n.limit??f.length,v=f.slice(m,m+g);return{assets:v,pagination:{total:f.length,limit:v.length,offset:m}}}let r=new URLSearchParams;n.limit!=null&&r.set("limit",String(n.limit)),n.offset!=null&&r.set("offset",String(n.offset));let o=r.toString(),i=await Y(`${W}/v2/sites/${t}/assets${o?`?${o}`:""}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!i.ok)throw new b(`Failed to list assets: ${i.status} ${i.statusText}`);let s=await i.json();return{assets:s.assets??[],pagination:s.pagination??{total:0,limit:100,offset:0}}}async function Yy(e,t,n,r,o){re(t,"siteId"),o&&re(o,"folderId");let i=kl(n);E_(i.meta.title,i.meta.size);let s=r??i.meta.title,a={fileName:i.meta.title,fileHash:i.meta.fileHash,displayName:s};o&&(a.parentFolder=o);let l=await Y(`${W}/v2/sites/${t}/assets`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)});if(!l.ok)throw new b(`Failed to initiate asset upload: ${l.status} ${l.statusText}`);let c=await l.json(),u={fields:c.uploadDetails,_id:c.id,s3Url:c.hostedUrl??"",url:c.uploadUrl??"",contentType:c.contentType??"",origFileName:c.originalFileName??i.meta.title,success_action_redirect:"",createdOn:"",updatedOn:""};try{await Kr(i,u)}catch(d){throw await Y(`${W}/v2/assets/${u._id}`,{method:"DELETE",headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}}).catch(()=>{}),d}return{id:u._id,hostedUrl:u.s3Url,displayName:s,originalFileName:i.meta.title}}async function Xy(e,t,n){re(t,"assetId");let r=await Y(`${W}/v2/assets/${t}`,{method:"PATCH",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new b(`Failed to update asset: ${r.status} ${r.statusText}`);return await r.json()}async function F_(e,t){re(t,"folderId");let n=await Y(`${W}/v2/asset_folders/${t}`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to get folder: ${n.status} ${n.statusText}`);return await n.json()}async function Qy(e,t){re(t,"siteId");let n=await Y(`${W}/v2/sites/${t}/asset_folders`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new b(`Failed to list folders: ${n.status} ${n.statusText}`);return(await n.json()).assetFolders??[]}async function eb(e,t,n,r){re(t,"siteId"),r&&re(r,"parentFolderId");let o={displayName:n};r&&(o.parentFolder=r);let i=await Y(`${W}/v2/sites/${t}/asset_folders`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(o)});if(!i.ok)throw new b(`Failed to create folder: ${i.status} ${i.statusText}`);return await i.json()}var Zy={png:{category:"image",maxBytes:4*1024*1024},jpeg:{category:"image",maxBytes:4*1024*1024},jpg:{category:"image",maxBytes:4*1024*1024},gif:{category:"image",maxBytes:4*1024*1024},svg:{category:"image",maxBytes:4*1024*1024},webp:{category:"image",maxBytes:4*1024*1024},avif:{category:"image",maxBytes:4*1024*1024},pdf:{category:"document",maxBytes:10*1024*1024},doc:{category:"document",maxBytes:10*1024*1024},docx:{category:"document",maxBytes:10*1024*1024},xls:{category:"document",maxBytes:10*1024*1024},xlsx:{category:"document",maxBytes:10*1024*1024},ppt:{category:"document",maxBytes:10*1024*1024},pptx:{category:"document",maxBytes:10*1024*1024},txt:{category:"document",maxBytes:10*1024*1024},csv:{category:"document",maxBytes:10*1024*1024},odt:{category:"document",maxBytes:10*1024*1024},ods:{category:"document",maxBytes:10*1024*1024},odp:{category:"document",maxBytes:10*1024*1024},json:{category:"lottie",maxBytes:10*1024*1024},lottie:{category:"lottie",maxBytes:10*1024*1024}};function E_(e,t){let n=e.split(".").pop()?.toLowerCase()??"",r=Zy[n];if(!r){let o=Object.keys(Zy).join(", ");throw new b(`Unsupported file type ".${n}". Allowed types: ${o}`,{isUserError:!0})}if(t>r.maxBytes){let o=r.maxBytes/1048576,i=(t/(1024*1024)).toFixed(1);throw new b(`File too large: ${i} MB exceeds the ${o} MB limit for ${r.category} files.`,{isUserError:!0})}}var Zi=["id","displayName","originalFileName","contentType","size","lastUpdated"];function tb(e,t=["id","displayName","lastUpdated","size"]){if(e.length===0)return E.dim("No assets found.");let n=t.filter(a=>Zi.includes(a));if(n.length===0)return E.red(`Invalid fields. Available: ${Zi.join(", ")}`);let r=t.filter(a=>!Zi.includes(a)),o=r.length>0?E.yellow(`Warning: unknown field(s) ignored: ${r.join(", ")}. Available: ${Zi.join(", ")}
159
+ `):"",i=n.map(a=>E.bold(a)),s=e.map(a=>n.map(l=>{let c=a[l];if(c==null||l==="size"&&c===0)return E.dim("\u2014");if(l==="size")return __(Number(c));if(l==="lastUpdated"){let d=new Date(String(c)),f=String(d.getMonth()+1).padStart(2,"0"),m=String(d.getDate()).padStart(2,"0"),g=String(d.getFullYear()).slice(-2),v=String(d.getHours()).padStart(2,"0"),F=String(d.getMinutes()).padStart(2,"0");return`${f}/${m}/${g} ${v}:${F}`}let u=String(c);return l==="displayName"&&u.length>40?E.dim("\u2026")+u.slice(-39):u}));return o+kn(i,s)}function __(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function nb(e){if(e.length===0)return E.dim("No folders found.");let t=[...e].sort((o,i)=>o.displayName.localeCompare(i.displayName)),n=["id","displayName","assets","lastUpdated"].map(o=>E.bold(o)),r=t.map(o=>[o.id,o.displayName,String(o.assets.length),new Date(o.lastUpdated).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1})]);return kn(n,r)}var rb=e=>{let t=e.command("assets").description("Manage Webflow site assets");t.command("list").description("List all assets for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--folder <folderId>","Filter by folder ID").option("--json","Output as JSON").option("--fields <fields>","Comma-separated fields to display (id, displayName, originalFileName, contentType, size, lastUpdated)","id,displayName,lastUpdated,size").option("--limit <n>","Max number of assets to return (default 100)",parseInt).option("--offset <n>","Number of assets to skip",parseInt).action(async r=>{let o,i;if(r.site)o=await le(),i=r.site;else{let{manifest:l}=H(),c=await we(l);o=c.accessToken,i=c.siteId}let s=Z.forAssets({authToken:o,siteId:i}),a=Date.now();try{let{assets:l,pagination:c}=await Ky(o,i,{limit:r.limit,offset:r.offset,folderId:r.folder});if(await s.sendUsage("assets_list",{duration:Date.now()-a,count:l.length}),l.length===0){p.info("No assets found.");return}let u=[...l].sort((m,g)=>m.displayName.localeCompare(g.displayName));if(r.json){p.info(JSON.stringify({assets:u,pagination:c},null,2));return}let d=r.fields.split(",").map(m=>m.trim());p.info(tb(u,d));let f=(r.offset??0)+l.length;f<c.total&&p.info(E.dim(`Showing ${f} of ${c.total} assets. Use --offset ${f} to see more.`))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_list",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to list assets:`})}}),t.command("upload").description(`Upload a file as an asset. Use --dry-run to preview before uploading.
160
+ Supported types: png, jpg, jpeg, gif, svg, webp, avif (\u22644 MB); pdf, doc, docx, xls, xlsx, ppt, pptx, txt, csv, odt, ods, odp, json, lottie (\u226410 MB)`).argument("<file>","Path to the file to upload (see supported types above)").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--name <displayName>","Display name for the asset (defaults to filename)").option("--folder <folderId>","Upload into a folder").option("--dry-run","Preview the upload without executing it").option("--json","Output as JSON").action(async(r,o)=>{if(o.dryRun){p.info(`Dry run \u2014 would upload: ${r}`),o.name&&p.info(` Display name: ${o.name}`),o.folder&&p.info(` Folder: ${o.folder}`),p.info("Dry run complete \u2014 no changes made.");return}let i,s;if(o.site)i=await le(),s=o.site;else{let{manifest:c}=H(),u=await we(c);i=u.accessToken,s=u.siteId}let a=Z.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await Yy(i,s,r,o.name,o.folder);if(await a.sendUsage("assets_upload",{duration:Date.now()-l,dryRun:!1}),o.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Asset uploaded: ${c.id}`),c.hostedUrl&&p.info(` URL: ${c.hostedUrl}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_upload",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to upload asset:`})}}),t.command("update").description("Update an asset's metadata. Use --dry-run to preview.").argument("<assetId>","Asset ID to update").option("--alt-text <text>","Alt text for the asset").option("--display-name <name>","New display name for the asset").option("--dry-run","Preview without executing").option("--json","Output as JSON").action(async(r,o)=>{if(!o.altText&&!o.displayName)throw new b("Provide at least one of --alt-text or --display-name.",{isUserError:!0});if(o.dryRun){p.info(`Dry run \u2014 would update asset: ${r}`),o.altText&&p.info(` Alt text: ${o.altText}`),o.displayName&&p.info(` Display name: ${o.displayName}`),p.info("Dry run complete \u2014 no changes made.");return}let i=await le(),s=Z.forAssets({authToken:i}),a=Date.now();try{let l=await Xy(i,r,{altText:o.altText,displayName:o.displayName});if(await s.sendUsage("assets_update",{duration:Date.now()-a,dryRun:!1}),o.json){p.info(JSON.stringify(l,null,2));return}p.info(`${te} Asset updated: ${l.id}`),l.displayName&&p.info(` Display name: ${l.displayName}`),l.altText&&p.info(` Alt text: ${l.altText}`)}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_update",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to update asset:`})}});let n=t.command("folders").description("Manage asset folders");n.command("list").description("List all asset folders for a site").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--json","Output as JSON").action(async r=>{let o,i;if(r.site)o=await le(),i=r.site;else{let{manifest:l}=H(),c=await we(l);o=c.accessToken,i=c.siteId}let s=Z.forAssets({authToken:o,siteId:i}),a=Date.now();try{let l=await Qy(o,i);if(await s.sendUsage("assets_folders_list",{duration:Date.now()-a,count:l.length}),r.json){p.info(JSON.stringify(l,null,2));return}p.info(nb(l))}catch(l){throw await s.sendError(l instanceof Error?l:new Error(String(l)),"assets_folders_list",{duration:Date.now()-a}),new b(l,{prefix:`${X} Failed to list folders:`})}}),n.command("create").description("Create a new asset folder").argument("<name>","Display name for the folder").option("--site <siteId>","Site ID (falls back to manifest or prompts)").option("--parent <folderId>","Parent folder ID (creates a nested folder)").option("--json","Output as JSON").action(async(r,o)=>{let i,s;if(o.site)i=await le(),s=o.site;else{let{manifest:c}=H(),u=await we(c);i=u.accessToken,s=u.siteId}let a=Z.forAssets({authToken:i,siteId:s}),l=Date.now();try{let c=await eb(i,s,r,o.parent);if(await a.sendUsage("assets_folders_create",{duration:Date.now()-l}),o.json){p.info(JSON.stringify(c,null,2));return}p.info(`${te} Folder created: ${c.id}`),p.info(` Name: ${c.displayName}`),c.parentFolder&&p.info(` Parent: ${c.parentFolder}`)}catch(c){throw await a.sendError(c instanceof Error?c:new Error(String(c)),"assets_folders_create",{duration:Date.now()-l}),new b(c,{prefix:`${X} Failed to create folder:`})}})};var ob=D(ko());function bc(e,t){t.forEach(n=>{e.addOption(n)}),e.commands.forEach(n=>bc(n,t))}function ib(e){let t=ob.default.version;e.name("webflow").description("Webflow CLI").version(t).addOption(Vl).addOption(ql).addOption(Gl).addOption(Jl).showHelpAfterError(),e.hook("preAction",async n=>{let r=n.opts();r.input||hu(!0),dt.start(),r.manifest&&gu(r.manifest);try{await Z.promptForConsentIfNeeded()}catch(o){p.debug(`Failed to check telemetry preference: ${o}`)}try{r.skipUpdateCheck||await new Or().prompt()}catch(o){p.debug(`Failed to check for package updates: ${o}`)}}),e.hook("postAction",async()=>{dt.displayGrouped(),dt.stop()}),Qu(e),Hy(e),Ad(e),Pg(e),Py(e),Ig(e),rb(e),_g(e),e.commands.forEach(n=>{bc(n,[Vl,ql,Gl,Jl])})}V();ae();var ab=new sb.Command;ib(ab);ab.parseAsync().catch(e=>{if(e instanceof b)if(e.isUserError){let t=e.prefix?`${e.prefix} `:"";console.error(`${t}${e.message}`)}else e.skipLogging||p.error(e,{prefix:e.prefix});else p.error(e);process.exit(1)});
159
161
  //# sourceMappingURL=index.js.map