@jxsuite/compiler 0.0.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.
@@ -0,0 +1,165 @@
1
+ var e7=Object.defineProperty;var Z6=(Z)=>Z;function X6(Z,X){this[Z]=Z6.bind(null,X)}var d0=(Z,X)=>{for(var z in X)e7(Z,z,{get:X[z],enumerable:!0,configurable:!0,set:X6.bind(X,z)})};var z6=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var Y0=((Z)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Z,{get:(X,z)=>(typeof require<"u"?require:X)[z]}):Z)(function(Z){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+Z+'" is not supported')});var k1={};d0(k1,{sep:()=>h7,resolve:()=>q0,relative:()=>k7,posix:()=>c7,parse:()=>u7,normalize:()=>f0,join:()=>S7,isAbsolute:()=>E7,format:()=>m7,extname:()=>y7,dirname:()=>g7,delimiter:()=>f7,default:()=>VZ,basename:()=>v7,_makeLong:()=>b7});function s(Z){if(typeof Z!=="string")throw TypeError("Path must be a string. Received "+JSON.stringify(Z))}function x7(Z,X){var z="",G=0,J=-1,q=0,Q;for(var W=0;W<=Z.length;++W){if(W<Z.length)Q=Z.charCodeAt(W);else if(Q===47)break;else Q=47;if(Q===47){if(J===W-1||q===1);else if(J!==W-1&&q===2){if(z.length<2||G!==2||z.charCodeAt(z.length-1)!==46||z.charCodeAt(z.length-2)!==46){if(z.length>2){var Y=z.lastIndexOf("/");if(Y!==z.length-1){if(Y===-1)z="",G=0;else z=z.slice(0,Y),G=z.length-1-z.lastIndexOf("/");J=W,q=0;continue}}else if(z.length===2||z.length===1){z="",G=0,J=W,q=0;continue}}if(X){if(z.length>0)z+="/..";else z="..";G=2}}else{if(z.length>0)z+="/"+Z.slice(J+1,W);else z=Z.slice(J+1,W);G=W-J-1}J=W,q=0}else if(Q===46&&q!==-1)++q;else q=-1}return z}function MZ(Z,X){var z=X.dir||X.root,G=X.base||(X.name||"")+(X.ext||"");if(!z)return G;if(z===X.root)return z+G;return z+Z+G}function q0(){var Z="",X=!1,z;for(var G=arguments.length-1;G>=-1&&!X;G--){var J;if(G>=0)J=arguments[G];else{if(z===void 0)z=process.cwd();J=z}if(s(J),J.length===0)continue;Z=J+"/"+Z,X=J.charCodeAt(0)===47}if(Z=x7(Z,!X),X)if(Z.length>0)return"/"+Z;else return"/";else if(Z.length>0)return Z;else return"."}function f0(Z){if(s(Z),Z.length===0)return".";var X=Z.charCodeAt(0)===47,z=Z.charCodeAt(Z.length-1)===47;if(Z=x7(Z,!X),Z.length===0&&!X)Z=".";if(Z.length>0&&z)Z+="/";if(X)return"/"+Z;return Z}function E7(Z){return s(Z),Z.length>0&&Z.charCodeAt(0)===47}function S7(){if(arguments.length===0)return".";var Z;for(var X=0;X<arguments.length;++X){var z=arguments[X];if(s(z),z.length>0)if(Z===void 0)Z=z;else Z+="/"+z}if(Z===void 0)return".";return f0(Z)}function k7(Z,X){if(s(Z),s(X),Z===X)return"";if(Z=q0(Z),X=q0(X),Z===X)return"";var z=1;for(;z<Z.length;++z)if(Z.charCodeAt(z)!==47)break;var G=Z.length,J=G-z,q=1;for(;q<X.length;++q)if(X.charCodeAt(q)!==47)break;var Q=X.length,W=Q-q,Y=J<W?J:W,U=-1,M=0;for(;M<=Y;++M){if(M===Y){if(W>Y){if(X.charCodeAt(q+M)===47)return X.slice(q+M+1);else if(M===0)return X.slice(q+M)}else if(J>Y){if(Z.charCodeAt(z+M)===47)U=M;else if(M===0)U=0}break}var V=Z.charCodeAt(z+M),K=X.charCodeAt(q+M);if(V!==K)break;else if(V===47)U=M}var F="";for(M=z+U+1;M<=G;++M)if(M===G||Z.charCodeAt(M)===47)if(F.length===0)F+="..";else F+="/..";if(F.length>0)return F+X.slice(q+U);else{if(q+=U,X.charCodeAt(q)===47)++q;return X.slice(q)}}function b7(Z){return Z}function g7(Z){if(s(Z),Z.length===0)return".";var X=Z.charCodeAt(0),z=X===47,G=-1,J=!0;for(var q=Z.length-1;q>=1;--q)if(X=Z.charCodeAt(q),X===47){if(!J){G=q;break}}else J=!1;if(G===-1)return z?"/":".";if(z&&G===1)return"//";return Z.slice(0,G)}function v7(Z,X){if(X!==void 0&&typeof X!=="string")throw TypeError('"ext" argument must be a string');s(Z);var z=0,G=-1,J=!0,q;if(X!==void 0&&X.length>0&&X.length<=Z.length){if(X.length===Z.length&&X===Z)return"";var Q=X.length-1,W=-1;for(q=Z.length-1;q>=0;--q){var Y=Z.charCodeAt(q);if(Y===47){if(!J){z=q+1;break}}else{if(W===-1)J=!1,W=q+1;if(Q>=0)if(Y===X.charCodeAt(Q)){if(--Q===-1)G=q}else Q=-1,G=W}}if(z===G)G=W;else if(G===-1)G=Z.length;return Z.slice(z,G)}else{for(q=Z.length-1;q>=0;--q)if(Z.charCodeAt(q)===47){if(!J){z=q+1;break}}else if(G===-1)J=!1,G=q+1;if(G===-1)return"";return Z.slice(z,G)}}function y7(Z){s(Z);var X=-1,z=0,G=-1,J=!0,q=0;for(var Q=Z.length-1;Q>=0;--Q){var W=Z.charCodeAt(Q);if(W===47){if(!J){z=Q+1;break}continue}if(G===-1)J=!1,G=Q+1;if(W===46){if(X===-1)X=Q;else if(q!==1)q=1}else if(X!==-1)q=-1}if(X===-1||G===-1||q===0||q===1&&X===G-1&&X===z+1)return"";return Z.slice(X,G)}function m7(Z){if(Z===null||typeof Z!=="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof Z);return MZ("/",Z)}function u7(Z){s(Z);var X={root:"",dir:"",base:"",ext:"",name:""};if(Z.length===0)return X;var z=Z.charCodeAt(0),G=z===47,J;if(G)X.root="/",J=1;else J=0;var q=-1,Q=0,W=-1,Y=!0,U=Z.length-1,M=0;for(;U>=J;--U){if(z=Z.charCodeAt(U),z===47){if(!Y){Q=U+1;break}continue}if(W===-1)Y=!1,W=U+1;if(z===46){if(q===-1)q=U;else if(M!==1)M=1}else if(q!==-1)M=-1}if(q===-1||W===-1||M===0||M===1&&q===W-1&&q===Q+1){if(W!==-1)if(Q===0&&G)X.base=X.name=Z.slice(1,W);else X.base=X.name=Z.slice(Q,W)}else{if(Q===0&&G)X.name=Z.slice(1,q),X.base=Z.slice(1,W);else X.name=Z.slice(Q,q),X.base=Z.slice(Q,W);X.ext=Z.slice(q,W)}if(Q>0)X.dir=Z.slice(0,Q-1);else if(G)X.dir="/";return X}var h7="/",f7=":",c7,VZ;var b1=z6(()=>{c7=((Z)=>(Z.posix=Z,Z))({resolve:q0,normalize:f0,isAbsolute:E7,join:S7,relative:k7,_makeLong:b7,dirname:g7,basename:v7,extname:y7,format:m7,parse:u7,sep:h7,delimiter:f7,win32:null,posix:null}),VZ=c7});var t7={};d0(t7,{compileClassJson:()=>TZ});function TZ(Z,X={}){let z=Z.title;if(!z)throw Error("compileClassJson: missing title (class name)");let G=RZ(Z.extends),J=Z.$defs?.fields??{},q=Z.$defs?.constructor,Q=Z.$defs?.methods??{},W=[];if(W.push("// Generated by @jxsuite/compiler from .class.json — do not edit manually"),Z.$id)W.push(`// Source: ${Z.$id}`);W.push("");let Y=G!=="Object"?` extends ${G}`:"";W.push(`class ${z}${Y} {`);for(let[U,M]of Object.entries(J)){let V=M;if(V.scope!=="static")continue;let K=V.identifier??U,F=V.access==="private"?"#":"",D=V.initializer!==void 0?JSON.stringify(V.initializer):V.default!==void 0?JSON.stringify(V.default):"null";W.push(` static ${F}${K} = ${D};`)}for(let[U,M]of Object.entries(J)){let V=M;if(V.scope==="static")continue;if(V.access!=="private")continue;let K=V.identifier??U;W.push(` #${K};`)}if(Object.keys(J).length>0)W.push("");if(W.push(" constructor(config = {}) {"),q?.superCall||G!=="Object"){let U=q?.superCall?.arguments?q.superCall.arguments.join(", "):"";W.push(` super(${U});`)}for(let[U,M]of Object.entries(J)){let V=M;if(V.scope==="static")continue;let K=V.identifier??U,F=V.access==="private"?"#":"",D=V.initializer!==void 0?JSON.stringify(V.initializer):V.default!==void 0?JSON.stringify(V.default):"null";W.push(` this.${F}${K} = config.${K} !== undefined ? config.${K} : ${D};`)}if(q?.body){let U=Array.isArray(q.body)?q.body:[q.body];for(let M of U)W.push(` ${M}`)}W.push(" }");for(let[U,M]of Object.entries(Q)){let V=M,K=V.identifier??U,F=V.scope==="static",$=V.access==="private"?"#":"",H=F?"static ":"",A=V.returnType?.$ref?.includes("Promise")||jZ(V)?"async ":"",B=a7(V.parameters??[]),C=NZ(V.body);if(W.push(""),V.role==="accessor"){if(V.getter)W.push(` ${H}get ${$}${K}() {`),W.push(` ${V.getter.body}`),W.push(" }");if(V.setter){let T=a7(V.setter.parameters??[]);W.push(` ${H}set ${$}${K}(${T}) {`),W.push(` ${V.setter.body}`),W.push(" }")}}else{W.push(` ${H}${A}${$}${K}(${B}) {`);for(let T of C)W.push(` ${T}`);W.push(" }")}}return W.push("}"),W.push(""),W.push(`export { ${z} };`),W.push(`export default ${z};`),W.push(""),W.join(`
2
+ `)}function RZ(Z){if(!Z)return"Object";if(typeof Z==="string")return Z;if(Z.$ref){let z=Z.$ref.match(/([A-Za-z0-9_]+)\.class\.json/);return z?z[1]:"Object"}return"Object"}function a7(Z){return Z.map((X)=>{if(X.$ref)return X.$ref.split("/").pop();return X.identifier??X.name??"arg"}).join(", ")}function NZ(Z){if(!Z)return[""];if(Array.isArray(Z))return Z;return[Z]}function jZ(Z){return(Array.isArray(Z.body)?Z.body.join(`
3
+ `):Z.body??"").includes("await ")}var{readFileSync:PZ}=(()=>({}));var q1=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"]);function G6(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function f(Z){return Z.replace(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function v1(Z){return Object.entries(Z).filter(([X])=>!G6(X)).map(([X,z])=>`${f(X)}: ${z}`).join("; ")}var m1="https://esm.sh/@vue/reactivity@3.5.32",u1="https://esm.sh/lit-html@3.3.0",J6=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"]);function K1(Z){for(let X of Object.keys(Z))if(!J6.has(X))return!1;return!0}function E(Z){return typeof Z==="string"&&Z.includes("${")}function U0(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,z]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(z&&typeof z==="object"&&!Array.isArray(z)&&z.timing==="compiler")continue;if(typeof z!=="object"||z===null||Array.isArray(z))return!0;if(z.$prototype)return!0;if("default"in z)return!0;if(K1(z))continue;return!0}if(Z.$switch)return!0;if(Z.children?.$prototype==="Array")return!0;if(Array.isArray(Z.children)){if(Z.children.some((X)=>U0(X)))return!0}for(let[X,z]of Object.entries(Z)){if(q1.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(E(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(E(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(E(X))return!0}return!1}function n0(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(Z.children?.$prototype==="Array")return!0;for(let[X,z]of Object.entries(Z)){if(q1.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(E(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(E(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(E(X))return!0}return!1}function F1(Z,X=null,z={},G={}){return{scope:Z?.state?q6(Z.state,X):X??Object.create(null),scopeDefs:z,media:G}}function q6(Z={},X=null){let z=Object.create(X??null);for(let[G,J]of Object.entries(Z)){if(typeof J!=="object"||J===null||Array.isArray(J)){V1(z,G,y1(J));continue}if("default"in J){V1(z,G,y1(J.default));continue}if(!J.$prototype&&!K1(J))V1(z,G,y1(J))}for(let[G,J]of Object.entries(Z)){if(typeof J==="string"&&E(J)){l0(z,G,()=>o0(J,z));continue}if(!J||typeof J!=="object")continue;if(J.$prototype==="Function"){if(J.body){let q=Function("state",...J.parameters??J.arguments??[],J.body);if(J.body.includes("return"))l0(z,G,()=>q(z));else V1(z,G,q)}else if(!J.body?.includes("return"))V1(z,G,()=>{});continue}if(J.$prototype==="LocalStorage"||J.$prototype==="SessionStorage")V1(z,G,y1(J.default??null))}return z}function V1(Z,X,z){Object.defineProperty(Z,X,{value:z,enumerable:!0,configurable:!0,writable:!0})}function l0(Z,X,z){Object.defineProperty(Z,X,{enumerable:!0,configurable:!0,get:z})}function b(Z,X){if(t(Z))return Q6(Z.$ref,X);if(E(Z))return o0(Z,X);return Z}function t(Z){return Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string"}function Q6(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let z=Z.split("/"),G=z[1],J=X.$map?.[G]??X["$map/"+G];return z.length>2?i0(J,z.slice(2).join("/")):J}if(Z.startsWith("#/state/")){let z=Z.slice(8),G=z.indexOf("/");if(G<0)return X[z];return i0(X[z.slice(0,G)],z.slice(G+1))}return X[Z]??null}function o0(Z,X){return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}function i0(Z,X){if(!X)return Z;return X.split("/").reduce((z,G)=>z==null?void 0:z[G],Z)}function y1(Z){if(Z===null||typeof Z!=="object")return Z;return JSON.parse(JSON.stringify(Z))}function h1(Z,X){let z="",G=b(Z.id,X),J=b(Z.className,X),q=b(Z.hidden,X),Q=b(Z.tabIndex,X),W=b(Z.title,X),Y=b(Z.lang,X),U=b(Z.dir,X);if(G)z+=` id="${I(G)}"`;if(J)z+=` class="${I(J)}"`;if(q)z+=" hidden";if(Q!==void 0&&Q!==null)z+=` tabindex="${I(String(Q))}"`;if(W)z+=` title="${I(W)}"`;if(Y)z+=` lang="${I(Y)}"`;if(U)z+=` dir="${I(U)}"`;if(Z.style){let M=new Set;for(let[K,F]of Object.entries(Z.style))if(K.startsWith("@")&&F&&typeof F==="object"){for(let D of Object.keys(F))if(!D.startsWith(":")&&!D.startsWith(".")&&!D.startsWith("&")&&!D.startsWith("["))M.add(D)}let V=Object.entries(Z.style).filter(([K,F])=>!K.startsWith(":")&&!K.startsWith(".")&&!K.startsWith("&")&&!K.startsWith("[")&&!K.startsWith("@")&&!M.has(K)&&F!==null&&typeof F!=="object").map(([K,F])=>{let D=b(F,X);return D==null?null:`${f(K)}: ${D}`}).filter(Boolean).join("; ");if(V)z+=` style="${V}"`}if(Z.attributes)for(let[M,V]of Object.entries(Z.attributes)){let K=b(V,X);if(K!==null&&K!==void 0&&(typeof K==="string"||typeof K==="number"||typeof K==="boolean"))z+=` ${M}="${I(String(K))}"`}return z}function H1(Z,X={}){let z=[];if(r0(Z,z,X,""),z.length===0)return"";return`<style>
4
+ ${z.join(`
5
+ `)}
6
+ </style>`}function r0(Z,X,z,G=""){if(!Z||typeof Z!=="object")return;let J=Z.id?`#${Z.id}`:Z.className?`.${Z.className.split(" ")[0]}`:Z.tagName??"*";if(Z.style){let q=new Set;for(let[Q,W]of Object.entries(Z.style))if(Q.startsWith("@")&&W&&typeof W==="object"){for(let Y of Object.keys(W))if(!Y.startsWith(":")&&!Y.startsWith(".")&&!Y.startsWith("&")&&!Y.startsWith("["))q.add(Y)}if(q.size>0){let Q=[];for(let W of q){let Y=Z.style[W];if(Y!==null&&Y!==void 0&&typeof Y!=="object")Q.push(`${f(W)}: ${Y}`)}if(Q.length>0)X.push(`${J} { ${Q.join("; ")} }`)}for(let[Q,W]of Object.entries(Z.style))if(Q.startsWith("@")){let Y=Q.startsWith("@--")?z[Q.slice(1)]??Q.slice(1):Q.slice(1);X.push(`@media ${Y} { ${J} { ${v1(W)} } }`);for(let[U,M]of Object.entries(W)){if(!(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")))continue;let V=U.startsWith("&")?U.replace("&",J):`${J}${U}`;X.push(`@media ${Y} { ${V} { ${v1(M)} } }`)}}else if(Q.startsWith(":")||Q.startsWith(".")||Q.startsWith("&")||Q.startsWith("[")){let Y=Q.startsWith("&")?Q.replace("&",J):`${J}${Q}`;X.push(`${Y} { ${v1(W)} }`)}}if(Array.isArray(Z.children))Z.children.forEach((q)=>{r0(q,X,z,J)})}function I(Z){return String(Z).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function f1(Z){return Z.split("-").map((X)=>X.charAt(0).toUpperCase()+X.slice(1)).join("")}function s0(Z){let X=new Map;return a0(Z,X),[...X.values()]}function a0(Z,X){if(!Z||typeof Z!=="object")return;if(Z.state)for(let[z,G]of Object.entries(Z.state)){let J=G;if(J&&typeof J==="object"&&J.timing==="server"&&J.$src&&J.$export&&!J.$prototype)X.set(J.$export,{key:z,exportName:J.$export,src:J.$src})}if(Array.isArray(Z.children))Z.children.forEach((z)=>a0(z,X))}function e(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var W6=/^win/.test(globalThis.process?globalThis.process.platform:""),T1=()=>W6;var Y6=/\//g,U6=/^(\w{2,}):\/\//i,M6=/~1/g,V6=/~0/g,K6=/^[a-zA-Z]:[\\/]/,F6=[[/\?/g,"%3F"],[/#/g,"%23"]],M0=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],B1=(Z)=>new URL(Z);function _(Z,X){let z=new URL(e(Z),"https://aaa.nonexistanturl.com"),G=new URL(e(X),z),J=X.match(/(\s*)$/)?.[1]||"";if(G.hostname==="aaa.nonexistanturl.com"){let{pathname:Q,search:W,hash:Y}=G;return Q+W+decodeURIComponent(Y)+J}let q=G.toString()+J;if(q.includes("#")){let[Q,W]=q.split("#",2);return Q+"#"+decodeURIComponent(W||"")}return q}function Q1(){if(typeof window<"u"&&window.location&&window.location.href){let Z=window.location.href;if(!Z||!Z.startsWith("http"))try{return new URL(Z),Z}catch{return"/"}return Z}if(typeof process<"u"&&process.cwd){let Z=process.cwd(),X=Z.slice(-1);if(X==="/"||X==="\\")return Z;else return Z+"/"}return"/"}function t0(Z){let X=U6.exec(Z||"");if(X)return X[1].toLowerCase();return}function e0(Z){let X=Z.lastIndexOf(".");if(X>=0)return H6(Z.substring(X).toLowerCase());return""}function H6(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function l(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function j(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function Z4(Z){let X=t0(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function V0(Z){if(!Z||typeof Z!=="string")return!0;let X=Z.trim().toLowerCase();if(!X)return!0;if(X.startsWith("javascript:")||X.startsWith("vbscript:")||X.startsWith("data:"))return!0;if(X.startsWith("file:"))return!0;if(typeof window<"u"&&window.location&&window.location.href)return!1;let z=["localhost","127.0.0.1","::1","10.","172.16.","172.17.","172.18.","172.19.","172.20.","172.21.","172.22.","172.23.","172.24.","172.25.","172.26.","172.27.","172.28.","172.29.","172.30.","172.31.","192.168.","169.254.",".local",".internal",".intranet",".corp",".home",".lan"];try{let G=new URL(X.startsWith("//")?"http:"+X:X),J=G.hostname.toLowerCase();for(let Q of z)if(J===Q||J.startsWith(Q)||J.endsWith(Q))return!0;if(B6(J))return!0;let q=G.port;if(q&&D6(parseInt(q)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;for(let G of z)if(X.includes(G))return!0}return!1}function B6(Z){let X=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,z=Z.match(X);if(!z)return!1;let[,G,J,q,Q]=z.map(Number);if(G>255||J>255||q>255||Q>255)return!1;return G===10||G===127||G===172&&J>=16&&J<=31||G===192&&J===168||G===169&&J===254}function D6(Z){return[22,23,25,53,135,139,445,993,995,1433,1521,3306,3389,5432,5900,6379,8080,8443,9200,27017].includes(Z)}function c1(Z){if(typeof window<"u"||typeof process<"u"&&!0)return!1;let X=t0(Z);return X===void 0||X==="file"}function X4(Z){if(T1()){let X=Q1(),z=Z.toUpperCase(),J=e(X).toUpperCase(),q=z.includes(J),Q=z.includes(J),W=K6.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(q||Q||W)&&!X.startsWith("http"))Z=((U,M)=>{if(U.endsWith("/")||U.endsWith("\\"))return U+M;else return U+"/"+M})(X,Z);Z=e(Z)}Z=encodeURI(Z);for(let X of F6)Z=Z.replace(X[0],X[1]);return Z}function D1(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let G=0;G<M0.length;G+=2)Z=Z.replace(M0[G],M0[G+1]);let z=Z.toLowerCase().startsWith("file://");if(z){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),T1()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else z=!1,Z=T1()?Z:"/"+Z}if(T1()&&!z){if(Z=Z.replace(Y6,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function p1(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(M6,"/").replace(V6,"~")})}var A6=["function","symbol","undefined"],$6=["constructor","prototype","__proto__"],L6=Object.getPrototypeOf({});function z4(){let Z={},X=this;for(let z of O6(X))if(typeof z==="string"){let G=X[z],J=typeof G;if(!A6.includes(J))Z[z]=G}return Z}function O6(Z,X=[]){let z=[];while(Z&&Z!==L6)z=z.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let G=new Set(z);for(let J of X.concat($6))G.delete(J);return G}class c extends Error{name;message;source;path;code;constructor(Z,X){super();this.code="EUNKNOWN",this.name="JSONParserError",this.message=Z,this.source=X,this.path=null}toJSON=z4.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}}class A1 extends Error{files;constructor(Z){super();this.files=Z,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${D1(Z.$refs._root$Ref.path)}'`}toJSON=z4.bind(this);static getParserErrors(Z){let X=[];for(let z of Object.values(Z.$refs._$refs))if(z.errors)X.push(...z.errors);return X}get errors(){return A1.getParserErrors(this.files)}}class p extends c{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}}class d1 extends c{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}}class d extends c{code="ERESOLVER";name="ResolverError";ioErrorCode;constructor(Z,X){super(Z.message||`Error reading file "${X}"`,X);if("code"in Z)this.ioErrorCode=String(Z.code)}}class l1 extends c{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}}class i1 extends c{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,z,G,J){super(`Missing $ref pointer "${l(X)}". Token "${Z}" does not exist.`,j(X));this.targetToken=Z,this.targetRef=z,this.targetFound=G,this.parentPath=J}}class K0 extends c{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}}class $1 extends c{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,j(X))}}function n(Z){return Z instanceof c||Z instanceof A1}function F0(Z){if(Z.path===null)Z.path=[];return Z}function v(Z,X){let z=C6(X);return z?_(Z,z):Z}function n1(Z){if(!Z||typeof Z!=="object"||ArrayBuffer.isView(Z))return!1;let X=Z.$schema;if(typeof X==="string"&&(X.includes("draft/2019-09/")||X.includes("draft/2020-12/")||X.includes("oas/3.1/")))return!0;let z=Z.openapi;return typeof z==="string"&&/^3\.1(?:\.|$)/.test(z)}function o1(Z,X,z,G,J=!1){if(!J)return;let q=new Set,Q=(W,Y)=>{if(!W||typeof W!=="object"||ArrayBuffer.isView(W)||q.has(W))return;q.add(W);let U=v(Y,W);if(U!==Y)Z._addAlias(U,W,G,J);for(let M of Object.keys(W))Q(W[M],U)};Q(z,X)}function C6(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var s1=Symbol("null"),w6=/\//g,I6=/~/g,T6=/~1/g,R6=/~0/g;class W1{$ref;path;originalPath;scopeBase;value;circular;indirections;constructor(Z,X,z){this.$ref=Z,this.path=X,this.originalPath=z||X,this.scopeBase=Z.path||j(X),this.value=void 0,this.circular=!1,this.indirections=0}resolve(Z,X,z){let G=W1.parse(this.path,this.originalPath),J=[];if(this.value=J4(Z),this.$ref.dynamicIdScope&&!q4(this.$ref))this.scopeBase=v(this.scopeBase,this.value);for(let Q=0;Q<G.length;Q++){let W=this.circular,Y=N.isExtended$Ref(this.value);if(r1(this,X,z))this.path=W1.join(this.path,G.slice(Q));else if(!W&&this.circular&&Y)this.circular=!1;let U=G[Q];if(this.value[U]===void 0||this.value[U]===null&&Q===G.length-1){let M=!1;for(let $=G.length-1;$>Q;$--){let H=G.slice(Q,$+1).join("/");if(this.value[H]!==void 0){this.value=this.value[H],Q=$,M=!0;break}}if(M)continue;if(U in this.value&&this.value[U]===null){this.value=s1;continue}this.value=null;let V=this.$ref.path||"",K=this.path.replace(V,""),F=W1.join("",J),D=z?.replace(V,"");throw new i1(U,decodeURI(this.originalPath),K,F,D)}else this.value=this.value[U];if(J.push(U),this.$ref.dynamicIdScope)this.scopeBase=v(this.scopeBase,this.value)}let q=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(!this.value||this.value.$ref&&_(q,this.value.$ref)!==z)r1(this,X,z);return this}set(Z,X,z){let G=W1.parse(this.path),J;if(G.length===0)return this.value=X,X;if(this.value=J4(Z),this.$ref.dynamicIdScope&&!q4(this.$ref))this.scopeBase=v(this.scopeBase,this.value);for(let q=0;q<G.length-1;q++){if(r1(this,z),J=G[q],this.value&&this.value[J]!==void 0)this.value=this.value[J];else this.value=G4(this,J,{});if(this.$ref.dynamicIdScope)this.scopeBase=v(this.scopeBase,this.value)}return r1(this,z),J=G[G.length-1],G4(this,J,X),Z}static parse(Z,X){let z=l(Z).substring(1);if(!z)return[];let G=z.split("/");for(let J=0;J<G.length;J++)G[J]=G[J].replace(T6,"/").replace(R6,"~");if(G[0]!=="")throw new $1(z,X===void 0?Z:X);return G.slice(1)}static join(Z,X){if(Z.indexOf("#")===-1)Z+="#";X=Array.isArray(X)?X:[X];for(let z=0;z<X.length;z++){let G=X[z];Z+="/"+G.replace(I6,"~0").replace(w6,"~1")}return Z}}function r1(Z,X,z){if(N.isAllowed$Ref(Z.value,X)){let G=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,J=_(G,Z.value.$ref);if(J===Z.path&&!N6(z))Z.circular=!0;else{let q=Z.$ref.$refs._resolve(J,Z.path,X);if(q===null)return!1;if(Z.indirections+=q.indirections+1,N.isExtended$Ref(Z.value))return Z.value=N.dereference(Z.value,q.value,X),!1;else Z.$ref=q.$ref,Z.path=q.path,Z.value=q.value,Z.scopeBase=Z.$ref.path;return!0}}return}var m=W1;function G4(Z,X,z){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(z);else Z.value[X]=z;else throw new c(`Error assigning $ref pointer "${Z.path}".
7
+ Cannot set "${X}" of a non-object.`);return z}function J4(Z){if(n(Z))throw Z;return Z}function N6(Z){return typeof Z=="string"&&W1.parse(Z).length==0}function q4(Z){return Boolean(Z.path&&Z.path in Z.$refs._aliases)}class R1{path;value;$refs;pathType;dynamicIdScope=!1;errors=[];constructor(Z){this.$refs=Z}addError(Z){if(this.errors===void 0)this.errors=[];let X=this.errors.map(({footprint:z})=>z);if("errors"in Z&&Array.isArray(Z.errors))this.errors.push(...Z.errors.map(F0).filter(({footprint:z})=>!X.includes(z)));else if(!("footprint"in Z)||!X.includes(Z.footprint))this.errors.push(F0(Z))}exists(Z,X){try{return this.resolve(Z,X),!0}catch{return!1}}get(Z,X){return this.resolve(Z,X)?.value}resolve(Z,X,z,G){let J=new m(this,Z,z);try{let q=J.resolve(this.value,X,G);if(q.value===s1)q.value=null;return q}catch(q){if(!X||!X.continueOnError||!n(q))throw q;if(q.path===null)q.path=p1(l(G));if(q instanceof $1)q.source=decodeURI(j(G));return this.addError(q),null}}set(Z,X){let z=new m(this,Z);if(this.value=z.set(this.value,X),this.value===s1)this.value=null}static is$Ref(Z){return Boolean(Z)&&typeof Z==="object"&&Z!==null&&"$ref"in Z&&typeof Z.$ref==="string"&&Z.$ref.length>0}static isExternal$Ref(Z){return R1.is$Ref(Z)&&Z.$ref[0]!=="#"}static isAllowed$Ref(Z,X){if(this.is$Ref(Z)){if(Z.$ref.substring(0,2)==="#/"||Z.$ref==="#")return!0;else if(Z.$ref[0]!=="#"&&(!X||X.resolve?.external))return!0}return}static isExtended$Ref(Z){return R1.is$Ref(Z)&&Object.keys(Z).length>1}static dereference(Z,X,z){if(X&&typeof X==="object"&&R1.isExtended$Ref(Z)){let G={};for(let q of Object.keys(Z))if(q!=="$ref")G[q]=Z[q];let J=z?.dereference?.mergeKeys??!0;for(let q of Object.keys(X)){let Q=q;if(!(Q in G))G[Q]=X[Q];else if(J&&typeof G[Q]==="object"&&G[Q]!==null&&typeof X[Q]==="object"&&X[Q]!==null)G[Q]=Q4(X[Q],G[Q])}return G}else return X}}function Q4(Z,X){if(typeof Z!=="object"||Z===null)return X;if(typeof X!=="object"||X===null)return X;let z=Array.isArray(Z)?[...Z]:{...Z};for(let G of Object.keys(X))if(Array.isArray(X[G]))z[G]=[...X[G]];else if(typeof X[G]==="object"&&X[G]!==null)z[G]=Q4(Z[G],X[G]);else z[G]=X[G];return z}var N=R1;class N1{circular;paths(...Z){return W4(this._$refs,Z.flat()).map((z)=>{return e(z.decoded)})}values(...Z){let X=this._$refs;return W4(X,Z.flat()).reduce((G,J)=>{return G[e(J.decoded)]=X[J.encoded].value,G},{})}exists(Z,X){try{return this._resolve(Z,"",X),!0}catch{return!1}}get(Z,X){return this._resolve(Z,"",X).value}set(Z,X){let z=_(this._root$Ref.path,Z),G=this._getRef(z);if(!G)throw Error(`Error resolving $ref pointer "${Z}".
8
+ "${j(z)}" not found.`);G.set(z,X)}_get$Ref(Z){return Z=_(this._root$Ref.path,Z),this._getRef(Z)}_add(Z){let X=j(Z),z=new N(this);return z.path=X,this._$refs[X]=z,this._root$Ref=this._root$Ref||z,z}_addAlias(Z,X,z,G=!1){let J=j(Z);if(!J||this._$refs[J]||this._aliases[J])return this._$refs[J]||this._aliases[J];let q=new N(this);return q.path=J,q.pathType=z,q.value=X,q.dynamicIdScope=G,this._aliases[J]=q,q}_resolve(Z,X,z){let G=_(this._root$Ref.path,Z),J=this._getRef(G);if(!J)throw Error(`Error resolving $ref pointer "${Z}".
9
+ "${j(G)}" not found.`);return J.resolve(G,z,Z,X)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=j(Z);return this._$refs[X]||this._aliases[X]}}function W4(Z,X){let z=Object.keys(Z);if(X=Array.isArray(X[0])?X[0]:Array.prototype.slice.call(X),X.length>0&&X[0])z=z.filter((G)=>{return X.includes(Z[G].pathType)});return z.map((G)=>{return{encoded:G,decoded:Z[G].pathType==="file"?D1(G,!0):G}})}function H0(Z){return Object.keys(Z||{}).filter((X)=>{return typeof Z[X]==="object"}).map((X)=>{return Z[X].name=X,Z[X]})}function B0(Z,X,z,G,J){return Z.filter((q)=>{return!!Y4(q,X,z,G,J)})}function D0(Z){for(let X of Z)X.order=X.order||Number.MAX_SAFE_INTEGER;return Z.sort((X,z)=>{return X.order-z.order})}async function A0(Z,X,z,G){let J,q,Q=0;return new Promise((W,Y)=>{U();function U(){if(J=Z[Q++],!J)return Y(q);try{let F=Y4(J,X,z,M,G);if(F&&typeof F.then==="function")F.then(V,K);else if(F!==void 0)V(F);else if(Q===Z.length)throw Error("No promise has been returned or callback has been called.")}catch(F){K(F)}}function M(F,D){if(F)K(F);else V(D)}function V(F){W({plugin:J,result:F})}function K(F){q={plugin:J,error:F},U()}})}function Y4(Z,X,z,G,J){let q=Z[X];if(typeof q==="function")return q.apply(Z,[z,G,J]);if(!G){if(q instanceof RegExp)return q.test(z.url);else if(typeof q==="string")return q===z.extension;else if(Array.isArray(q))return q.indexOf(z.extension)!==-1}return q}async function j6(Z,X,z){let G=typeof Z==="string"?Z:Z.url,J=typeof Z==="string"?void 0:Z.baseUrl,q=typeof Z==="string"?void 0:Z.reference,Q=G.indexOf("#"),W="";if(Q>=0)W=G.substring(Q),G=G.substring(0,Q);if(q){let M=q.indexOf("#");if(M>=0)q=q.substring(0,M)}let Y=X._add(G),U={url:G,hash:W,extension:e0(G),...q!==void 0?{reference:q}:{},...J!==void 0?{baseUrl:J}:{}};try{let M=await P6(U,z,X);Y.pathType=M.plugin.name,U.data=M.result;let V=await _6(U,z,X);return Y.value=V.result,Y.dynamicIdScope=n1(Y.value),o1(X,Y.path,Y.value,Y.pathType,Y.dynamicIdScope),V.result}catch(M){if(n(M))Y.value=M;throw M}}async function P6(Z,X,z){let G=H0(X.resolve);G=B0(G,"canRead",Z,void 0,z),D0(G);try{return await A0(G,"read",Z,z)}catch(J){if(!J&&X.continueOnError)throw new l1(Z.url);else if(!J||!("error"in J))throw SyntaxError(`Unable to resolve $ref pointer "${Z.url}"`,{cause:J});else if(J.error instanceof d)throw J.error;else throw new d(J,Z.url)}}async function _6(Z,X,z){let G=H0(X.parse),J=B0(G,"canParse",Z),q=J.length>0?J:G;D0(q);try{let Q=await A0(q,"parse",Z,z);if(!Q.plugin.allowEmpty&&x6(Q.result))throw SyntaxError(`Error parsing "${Z.url}" as ${Q.plugin.name}.
10
+ Parsed value is empty`);else return Q}catch(Q){if(!Q&&X.continueOnError)throw new d1(Z.url);else if(Q&&Q.message&&Q.message.startsWith("Error parsing"))throw Q;else if(!Q||!("error"in Q))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:Q});else if(Q.error instanceof p)throw Q.error;else throw new p(Q.error.message,Z.url)}}function x6(Z){return Z===void 0||typeof Z==="object"&&Object.keys(Z).length===0||typeof Z==="string"&&Z.trim().length===0||Buffer.isBuffer(Z)&&Z.length===0}var a1=j6;var U4={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")if(X.trim().length===0)return;else try{return JSON.parse(X)}catch(z){if(this.allowBOM)try{let G=X.indexOf("{");return X=X.slice(G),JSON.parse(X)}catch(G){throw new p(G.message,Z.url)}throw new p(z.message,Z.url)}else return X}};/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function R4(Z){return typeof Z>"u"||Z===null}function E6(Z){return typeof Z==="object"&&Z!==null}function S6(Z){if(Array.isArray(Z))return Z;else if(R4(Z))return[];return[Z]}function k6(Z,X){var z,G,J,q;if(X){q=Object.keys(X);for(z=0,G=q.length;z<G;z+=1)J=q[z],Z[J]=X[J]}return Z}function b6(Z,X){var z="",G;for(G=0;G<X;G+=1)z+=Z;return z}function g6(Z){return Z===0&&Number.NEGATIVE_INFINITY===1/Z}var v6=R4,y6=E6,m6=S6,u6=b6,h6=g6,f6=k6,x={isNothing:v6,isObject:y6,toArray:m6,repeat:u6,isNegativeZero:h6,extend:f6};function N4(Z,X){var z="",G=Z.reason||"(unknown reason)";if(!Z.mark)return G;if(Z.mark.name)z+='in "'+Z.mark.name+'" ';if(z+="("+(Z.mark.line+1)+":"+(Z.mark.column+1)+")",!X&&Z.mark.snippet)z+=`
11
+
12
+ `+Z.mark.snippet;return G+" "+z}function P1(Z,X){if(Error.call(this),this.name="YAMLException",this.reason=Z,this.mark=X,this.message=N4(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}P1.prototype=Object.create(Error.prototype);P1.prototype.constructor=P1;P1.prototype.toString=function(X){return this.name+": "+N4(this,X)};var y=P1;function $0(Z,X,z,G,J){var q="",Q="",W=Math.floor(J/2)-1;if(G-X>W)q=" ... ",X=G-W+q.length;if(z-G>W)Q=" ...",z=G+W-Q.length;return{str:q+Z.slice(X,z).replace(/\t/g,"→")+Q,pos:G-X+q.length}}function L0(Z,X){return x.repeat(" ",X-Z.length)+Z}function c6(Z,X){if(X=Object.create(X||null),!Z.buffer)return null;if(!X.maxLength)X.maxLength=79;if(typeof X.indent!=="number")X.indent=1;if(typeof X.linesBefore!=="number")X.linesBefore=3;if(typeof X.linesAfter!=="number")X.linesAfter=2;var z=/\r?\n|\r|\0/g,G=[0],J=[],q,Q=-1;while(q=z.exec(Z.buffer))if(J.push(q.index),G.push(q.index+q[0].length),Z.position<=q.index&&Q<0)Q=G.length-2;if(Q<0)Q=G.length-1;var W="",Y,U,M=Math.min(Z.line+X.linesAfter,J.length).toString().length,V=X.maxLength-(X.indent+M+3);for(Y=1;Y<=X.linesBefore;Y++){if(Q-Y<0)break;U=$0(Z.buffer,G[Q-Y],J[Q-Y],Z.position-(G[Q]-G[Q-Y]),V),W=x.repeat(" ",X.indent)+L0((Z.line-Y+1).toString(),M)+" | "+U.str+`
13
+ `+W}U=$0(Z.buffer,G[Q],J[Q],Z.position,V),W+=x.repeat(" ",X.indent)+L0((Z.line+1).toString(),M)+" | "+U.str+`
14
+ `,W+=x.repeat("-",X.indent+M+3+U.pos)+`^
15
+ `;for(Y=1;Y<=X.linesAfter;Y++){if(Q+Y>=J.length)break;U=$0(Z.buffer,G[Q+Y],J[Q+Y],Z.position-(G[Q]-G[Q+Y]),V),W+=x.repeat(" ",X.indent)+L0((Z.line+Y+1).toString(),M)+" | "+U.str+`
16
+ `}return W.replace(/\n$/,"")}var p6=c6,d6=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],l6=["scalar","sequence","mapping"];function i6(Z){var X={};if(Z!==null)Object.keys(Z).forEach(function(z){Z[z].forEach(function(G){X[String(G)]=z})});return X}function n6(Z,X){if(X=X||{},Object.keys(X).forEach(function(z){if(d6.indexOf(z)===-1)throw new y('Unknown option "'+z+'" is met in definition of "'+Z+'" YAML type.')}),this.options=X,this.tag=Z,this.kind=X.kind||null,this.resolve=X.resolve||function(){return!0},this.construct=X.construct||function(z){return z},this.instanceOf=X.instanceOf||null,this.predicate=X.predicate||null,this.represent=X.represent||null,this.representName=X.representName||null,this.defaultStyle=X.defaultStyle||null,this.multi=X.multi||!1,this.styleAliases=i6(X.styleAliases||null),l6.indexOf(this.kind)===-1)throw new y('Unknown kind "'+this.kind+'" is specified for "'+Z+'" YAML type.')}var S=n6;function M4(Z,X){var z=[];return Z[X].forEach(function(G){var J=z.length;z.forEach(function(q,Q){if(q.tag===G.tag&&q.kind===G.kind&&q.multi===G.multi)J=Q}),z[J]=G}),z}function o6(){var Z={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},X,z;function G(J){if(J.multi)Z.multi[J.kind].push(J),Z.multi.fallback.push(J);else Z[J.kind][J.tag]=Z.fallback[J.tag]=J}for(X=0,z=arguments.length;X<z;X+=1)arguments[X].forEach(G);return Z}function C0(Z){return this.extend(Z)}C0.prototype.extend=function(X){var z=[],G=[];if(X instanceof S)G.push(X);else if(Array.isArray(X))G=G.concat(X);else if(X&&(Array.isArray(X.implicit)||Array.isArray(X.explicit))){if(X.implicit)z=z.concat(X.implicit);if(X.explicit)G=G.concat(X.explicit)}else throw new y("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");z.forEach(function(q){if(!(q instanceof S))throw new y("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(q.loadKind&&q.loadKind!=="scalar")throw new y("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(q.multi)throw new y("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),G.forEach(function(q){if(!(q instanceof S))throw new y("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var J=Object.create(C0.prototype);return J.implicit=(this.implicit||[]).concat(z),J.explicit=(this.explicit||[]).concat(G),J.compiledImplicit=M4(J,"implicit"),J.compiledExplicit=M4(J,"explicit"),J.compiledTypeMap=o6(J.compiledImplicit,J.compiledExplicit),J};var j4=C0,P4=new S("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Z){return Z!==null?Z:""}}),_4=new S("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Z){return Z!==null?Z:[]}}),x4=new S("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Z){return Z!==null?Z:{}}}),E4=new j4({explicit:[P4,_4,x4]});function r6(Z){if(Z===null)return!0;var X=Z.length;return X===1&&Z==="~"||X===4&&(Z==="null"||Z==="Null"||Z==="NULL")}function s6(){return null}function a6(Z){return Z===null}var S4=new S("tag:yaml.org,2002:null",{kind:"scalar",resolve:r6,construct:s6,predicate:a6,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function t6(Z){if(Z===null)return!1;var X=Z.length;return X===4&&(Z==="true"||Z==="True"||Z==="TRUE")||X===5&&(Z==="false"||Z==="False"||Z==="FALSE")}function e6(Z){return Z==="true"||Z==="True"||Z==="TRUE"}function Z8(Z){return Object.prototype.toString.call(Z)==="[object Boolean]"}var k4=new S("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t6,construct:e6,predicate:Z8,represent:{lowercase:function(Z){return Z?"true":"false"},uppercase:function(Z){return Z?"TRUE":"FALSE"},camelcase:function(Z){return Z?"True":"False"}},defaultStyle:"lowercase"});function X8(Z){return 48<=Z&&Z<=57||65<=Z&&Z<=70||97<=Z&&Z<=102}function z8(Z){return 48<=Z&&Z<=55}function G8(Z){return 48<=Z&&Z<=57}function J8(Z){if(Z===null)return!1;var X=Z.length,z=0,G=!1,J;if(!X)return!1;if(J=Z[z],J==="-"||J==="+")J=Z[++z];if(J==="0"){if(z+1===X)return!0;if(J=Z[++z],J==="b"){z++;for(;z<X;z++){if(J=Z[z],J==="_")continue;if(J!=="0"&&J!=="1")return!1;G=!0}return G&&J!=="_"}if(J==="x"){z++;for(;z<X;z++){if(J=Z[z],J==="_")continue;if(!X8(Z.charCodeAt(z)))return!1;G=!0}return G&&J!=="_"}if(J==="o"){z++;for(;z<X;z++){if(J=Z[z],J==="_")continue;if(!z8(Z.charCodeAt(z)))return!1;G=!0}return G&&J!=="_"}}if(J==="_")return!1;for(;z<X;z++){if(J=Z[z],J==="_")continue;if(!G8(Z.charCodeAt(z)))return!1;G=!0}if(!G||J==="_")return!1;return!0}function q8(Z){var X=Z,z=1,G;if(X.indexOf("_")!==-1)X=X.replace(/_/g,"");if(G=X[0],G==="-"||G==="+"){if(G==="-")z=-1;X=X.slice(1),G=X[0]}if(X==="0")return 0;if(G==="0"){if(X[1]==="b")return z*parseInt(X.slice(2),2);if(X[1]==="x")return z*parseInt(X.slice(2),16);if(X[1]==="o")return z*parseInt(X.slice(2),8)}return z*parseInt(X,10)}function Q8(Z){return Object.prototype.toString.call(Z)==="[object Number]"&&(Z%1===0&&!x.isNegativeZero(Z))}var b4=new S("tag:yaml.org,2002:int",{kind:"scalar",resolve:J8,construct:q8,predicate:Q8,represent:{binary:function(Z){return Z>=0?"0b"+Z.toString(2):"-0b"+Z.toString(2).slice(1)},octal:function(Z){return Z>=0?"0o"+Z.toString(8):"-0o"+Z.toString(8).slice(1)},decimal:function(Z){return Z.toString(10)},hexadecimal:function(Z){return Z>=0?"0x"+Z.toString(16).toUpperCase():"-0x"+Z.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),W8=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Y8(Z){if(Z===null)return!1;if(!W8.test(Z)||Z[Z.length-1]==="_")return!1;return!0}function U8(Z){var X,z;if(X=Z.replace(/_/g,"").toLowerCase(),z=X[0]==="-"?-1:1,"+-".indexOf(X[0])>=0)X=X.slice(1);if(X===".inf")return z===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(X===".nan")return NaN;return z*parseFloat(X,10)}var M8=/^[-+]?[0-9]+e/;function V8(Z,X){var z;if(isNaN(Z))switch(X){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===Z)switch(X){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===Z)switch(X){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(x.isNegativeZero(Z))return"-0.0";return z=Z.toString(10),M8.test(z)?z.replace("e",".e"):z}function K8(Z){return Object.prototype.toString.call(Z)==="[object Number]"&&(Z%1!==0||x.isNegativeZero(Z))}var g4=new S("tag:yaml.org,2002:float",{kind:"scalar",resolve:Y8,construct:U8,predicate:K8,represent:V8,defaultStyle:"lowercase"}),v4=E4.extend({implicit:[S4,k4,b4,g4]}),y4=v4,m4=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u4=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function F8(Z){if(Z===null)return!1;if(m4.exec(Z)!==null)return!0;if(u4.exec(Z)!==null)return!0;return!1}function H8(Z){var X,z,G,J,q,Q,W,Y=0,U=null,M,V,K;if(X=m4.exec(Z),X===null)X=u4.exec(Z);if(X===null)throw Error("Date resolve error");if(z=+X[1],G=+X[2]-1,J=+X[3],!X[4])return new Date(Date.UTC(z,G,J));if(q=+X[4],Q=+X[5],W=+X[6],X[7]){Y=X[7].slice(0,3);while(Y.length<3)Y+="0";Y=+Y}if(X[9]){if(M=+X[10],V=+(X[11]||0),U=(M*60+V)*60000,X[9]==="-")U=-U}if(K=new Date(Date.UTC(z,G,J,q,Q,W,Y)),U)K.setTime(K.getTime()-U);return K}function B8(Z){return Z.toISOString()}var h4=new S("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:F8,construct:H8,instanceOf:Date,represent:B8});function D8(Z){return Z==="<<"||Z===null}var f4=new S("tag:yaml.org,2002:merge",{kind:"scalar",resolve:D8}),N0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
17
+ \r`;function A8(Z){if(Z===null)return!1;var X,z,G=0,J=Z.length,q=N0;for(z=0;z<J;z++){if(X=q.indexOf(Z.charAt(z)),X>64)continue;if(X<0)return!1;G+=6}return G%8===0}function $8(Z){var X,z,G=Z.replace(/[\r\n=]/g,""),J=G.length,q=N0,Q=0,W=[];for(X=0;X<J;X++){if(X%4===0&&X)W.push(Q>>16&255),W.push(Q>>8&255),W.push(Q&255);Q=Q<<6|q.indexOf(G.charAt(X))}if(z=J%4*6,z===0)W.push(Q>>16&255),W.push(Q>>8&255),W.push(Q&255);else if(z===18)W.push(Q>>10&255),W.push(Q>>2&255);else if(z===12)W.push(Q>>4&255);return new Uint8Array(W)}function L8(Z){var X="",z=0,G,J,q=Z.length,Q=N0;for(G=0;G<q;G++){if(G%3===0&&G)X+=Q[z>>18&63],X+=Q[z>>12&63],X+=Q[z>>6&63],X+=Q[z&63];z=(z<<8)+Z[G]}if(J=q%3,J===0)X+=Q[z>>18&63],X+=Q[z>>12&63],X+=Q[z>>6&63],X+=Q[z&63];else if(J===2)X+=Q[z>>10&63],X+=Q[z>>4&63],X+=Q[z<<2&63],X+=Q[64];else if(J===1)X+=Q[z>>2&63],X+=Q[z<<4&63],X+=Q[64],X+=Q[64];return X}function O8(Z){return Object.prototype.toString.call(Z)==="[object Uint8Array]"}var c4=new S("tag:yaml.org,2002:binary",{kind:"scalar",resolve:A8,construct:$8,predicate:O8,represent:L8}),C8=Object.prototype.hasOwnProperty,w8=Object.prototype.toString;function I8(Z){if(Z===null)return!0;var X=[],z,G,J,q,Q,W=Z;for(z=0,G=W.length;z<G;z+=1){if(J=W[z],Q=!1,w8.call(J)!=="[object Object]")return!1;for(q in J)if(C8.call(J,q))if(!Q)Q=!0;else return!1;if(!Q)return!1;if(X.indexOf(q)===-1)X.push(q);else return!1}return!0}function T8(Z){return Z!==null?Z:[]}var p4=new S("tag:yaml.org,2002:omap",{kind:"sequence",resolve:I8,construct:T8}),R8=Object.prototype.toString;function N8(Z){if(Z===null)return!0;var X,z,G,J,q,Q=Z;q=Array(Q.length);for(X=0,z=Q.length;X<z;X+=1){if(G=Q[X],R8.call(G)!=="[object Object]")return!1;if(J=Object.keys(G),J.length!==1)return!1;q[X]=[J[0],G[J[0]]]}return!0}function j8(Z){if(Z===null)return[];var X,z,G,J,q,Q=Z;q=Array(Q.length);for(X=0,z=Q.length;X<z;X+=1)G=Q[X],J=Object.keys(G),q[X]=[J[0],G[J[0]]];return q}var d4=new S("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:N8,construct:j8}),P8=Object.prototype.hasOwnProperty;function _8(Z){if(Z===null)return!0;var X,z=Z;for(X in z)if(P8.call(z,X)){if(z[X]!==null)return!1}return!0}function x8(Z){return Z!==null?Z:{}}var l4=new S("tag:yaml.org,2002:set",{kind:"mapping",resolve:_8,construct:x8}),j0=y4.extend({implicit:[h4,f4],explicit:[c4,p4,d4,l4]}),G1=Object.prototype.hasOwnProperty,t1=1,i4=2,n4=3,e1=4,O0=1,E8=2,V4=3,S8=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,k8=/[\x85\u2028\u2029]/,b8=/[,\[\]\{\}]/,o4=/^(?:!|!!|![a-z\-]+!)$/i,r4=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function K4(Z){return Object.prototype.toString.call(Z)}function o(Z){return Z===10||Z===13}function Y1(Z){return Z===9||Z===32}function u(Z){return Z===9||Z===32||Z===10||Z===13}function O1(Z){return Z===44||Z===91||Z===93||Z===123||Z===125}function g8(Z){var X;if(48<=Z&&Z<=57)return Z-48;if(X=Z|32,97<=X&&X<=102)return X-97+10;return-1}function v8(Z){if(Z===120)return 2;if(Z===117)return 4;if(Z===85)return 8;return 0}function y8(Z){if(48<=Z&&Z<=57)return Z-48;return-1}function F4(Z){return Z===48?"\x00":Z===97?"\x07":Z===98?"\b":Z===116?"\t":Z===9?"\t":Z===110?`
18
+ `:Z===118?"\v":Z===102?"\f":Z===114?"\r":Z===101?"\x1B":Z===32?" ":Z===34?'"':Z===47?"/":Z===92?"\\":Z===78?"…":Z===95?" ":Z===76?"\u2028":Z===80?"\u2029":""}function m8(Z){if(Z<=65535)return String.fromCharCode(Z);return String.fromCharCode((Z-65536>>10)+55296,(Z-65536&1023)+56320)}function s4(Z,X,z){if(X==="__proto__")Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,writable:!0,value:z});else Z[X]=z}var a4=Array(256),t4=Array(256);for(X1=0;X1<256;X1++)a4[X1]=F4(X1)?1:0,t4[X1]=F4(X1);var X1;function u8(Z,X){this.input=Z,this.filename=X.filename||null,this.schema=X.schema||j0,this.onWarning=X.onWarning||null,this.legacy=X.legacy||!1,this.json=X.json||!1,this.listener=X.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Z.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function e4(Z,X){var z={name:Z.filename,buffer:Z.input.slice(0,-1),position:Z.position,line:Z.line,column:Z.position-Z.lineStart};return z.snippet=p6(z),new y(X,z)}function L(Z,X){throw e4(Z,X)}function Z0(Z,X){if(Z.onWarning)Z.onWarning.call(null,e4(Z,X))}var H4={YAML:function(X,z,G){var J,q,Q;if(X.version!==null)L(X,"duplication of %YAML directive");if(G.length!==1)L(X,"YAML directive accepts exactly one argument");if(J=/^([0-9]+)\.([0-9]+)$/.exec(G[0]),J===null)L(X,"ill-formed argument of the YAML directive");if(q=parseInt(J[1],10),Q=parseInt(J[2],10),q!==1)L(X,"unacceptable YAML version of the document");if(X.version=G[0],X.checkLineBreaks=Q<2,Q!==1&&Q!==2)Z0(X,"unsupported YAML version of the document")},TAG:function(X,z,G){var J,q;if(G.length!==2)L(X,"TAG directive accepts exactly two arguments");if(J=G[0],q=G[1],!o4.test(J))L(X,"ill-formed tag handle (first argument) of the TAG directive");if(G1.call(X.tagMap,J))L(X,'there is a previously declared suffix for "'+J+'" tag handle');if(!r4.test(q))L(X,"ill-formed tag prefix (second argument) of the TAG directive");try{q=decodeURIComponent(q)}catch(Q){L(X,"tag prefix is malformed: "+q)}X.tagMap[J]=q}};function z1(Z,X,z,G){var J,q,Q,W;if(X<z){if(W=Z.input.slice(X,z),G){for(J=0,q=W.length;J<q;J+=1)if(Q=W.charCodeAt(J),!(Q===9||32<=Q&&Q<=1114111))L(Z,"expected valid JSON character")}else if(S8.test(W))L(Z,"the stream contains non-printable characters");Z.result+=W}}function B4(Z,X,z,G){var J,q,Q,W;if(!x.isObject(z))L(Z,"cannot merge mappings; the provided source object is unacceptable");J=Object.keys(z);for(Q=0,W=J.length;Q<W;Q+=1)if(q=J[Q],!G1.call(X,q))s4(X,q,z[q]),G[q]=!0}function C1(Z,X,z,G,J,q,Q,W,Y){var U,M;if(Array.isArray(J)){J=Array.prototype.slice.call(J);for(U=0,M=J.length;U<M;U+=1){if(Array.isArray(J[U]))L(Z,"nested arrays are not supported inside keys");if(typeof J==="object"&&K4(J[U])==="[object Object]")J[U]="[object Object]"}}if(typeof J==="object"&&K4(J)==="[object Object]")J="[object Object]";if(J=String(J),X===null)X={};if(G==="tag:yaml.org,2002:merge")if(Array.isArray(q))for(U=0,M=q.length;U<M;U+=1)B4(Z,X,q[U],z);else B4(Z,X,q,z);else{if(!Z.json&&!G1.call(z,J)&&G1.call(X,J))Z.line=Q||Z.line,Z.lineStart=W||Z.lineStart,Z.position=Y||Z.position,L(Z,"duplicated mapping key");s4(X,J,q),delete z[J]}return X}function P0(Z){var X=Z.input.charCodeAt(Z.position);if(X===10)Z.position++;else if(X===13){if(Z.position++,Z.input.charCodeAt(Z.position)===10)Z.position++}else L(Z,"a line break is expected");Z.line+=1,Z.lineStart=Z.position,Z.firstTabInLine=-1}function P(Z,X,z){var G=0,J=Z.input.charCodeAt(Z.position);while(J!==0){while(Y1(J)){if(J===9&&Z.firstTabInLine===-1)Z.firstTabInLine=Z.position;J=Z.input.charCodeAt(++Z.position)}if(X&&J===35)do J=Z.input.charCodeAt(++Z.position);while(J!==10&&J!==13&&J!==0);if(o(J)){P0(Z),J=Z.input.charCodeAt(Z.position),G++,Z.lineIndent=0;while(J===32)Z.lineIndent++,J=Z.input.charCodeAt(++Z.position)}else break}if(z!==-1&&G!==0&&Z.lineIndent<z)Z0(Z,"deficient indentation");return G}function G0(Z){var X=Z.position,z;if(z=Z.input.charCodeAt(X),(z===45||z===46)&&z===Z.input.charCodeAt(X+1)&&z===Z.input.charCodeAt(X+2)){if(X+=3,z=Z.input.charCodeAt(X),z===0||u(z))return!0}return!1}function _0(Z,X){if(X===1)Z.result+=" ";else if(X>1)Z.result+=x.repeat(`
19
+ `,X-1)}function h8(Z,X,z){var G,J,q,Q,W,Y,U,M,V=Z.kind,K=Z.result,F;if(F=Z.input.charCodeAt(Z.position),u(F)||O1(F)||F===35||F===38||F===42||F===33||F===124||F===62||F===39||F===34||F===37||F===64||F===96)return!1;if(F===63||F===45){if(J=Z.input.charCodeAt(Z.position+1),u(J)||z&&O1(J))return!1}Z.kind="scalar",Z.result="",q=Q=Z.position,W=!1;while(F!==0){if(F===58){if(J=Z.input.charCodeAt(Z.position+1),u(J)||z&&O1(J))break}else if(F===35){if(G=Z.input.charCodeAt(Z.position-1),u(G))break}else if(Z.position===Z.lineStart&&G0(Z)||z&&O1(F))break;else if(o(F))if(Y=Z.line,U=Z.lineStart,M=Z.lineIndent,P(Z,!1,-1),Z.lineIndent>=X){W=!0,F=Z.input.charCodeAt(Z.position);continue}else{Z.position=Q,Z.line=Y,Z.lineStart=U,Z.lineIndent=M;break}if(W)z1(Z,q,Q,!1),_0(Z,Z.line-Y),q=Q=Z.position,W=!1;if(!Y1(F))Q=Z.position+1;F=Z.input.charCodeAt(++Z.position)}if(z1(Z,q,Q,!1),Z.result)return!0;return Z.kind=V,Z.result=K,!1}function f8(Z,X){var z,G,J;if(z=Z.input.charCodeAt(Z.position),z!==39)return!1;Z.kind="scalar",Z.result="",Z.position++,G=J=Z.position;while((z=Z.input.charCodeAt(Z.position))!==0)if(z===39)if(z1(Z,G,Z.position,!0),z=Z.input.charCodeAt(++Z.position),z===39)G=Z.position,Z.position++,J=Z.position;else return!0;else if(o(z))z1(Z,G,J,!0),_0(Z,P(Z,!1,X)),G=J=Z.position;else if(Z.position===Z.lineStart&&G0(Z))L(Z,"unexpected end of the document within a single quoted scalar");else Z.position++,J=Z.position;L(Z,"unexpected end of the stream within a single quoted scalar")}function c8(Z,X){var z,G,J,q,Q,W;if(W=Z.input.charCodeAt(Z.position),W!==34)return!1;Z.kind="scalar",Z.result="",Z.position++,z=G=Z.position;while((W=Z.input.charCodeAt(Z.position))!==0)if(W===34)return z1(Z,z,Z.position,!0),Z.position++,!0;else if(W===92){if(z1(Z,z,Z.position,!0),W=Z.input.charCodeAt(++Z.position),o(W))P(Z,!1,X);else if(W<256&&a4[W])Z.result+=t4[W],Z.position++;else if((Q=v8(W))>0){J=Q,q=0;for(;J>0;J--)if(W=Z.input.charCodeAt(++Z.position),(Q=g8(W))>=0)q=(q<<4)+Q;else L(Z,"expected hexadecimal character");Z.result+=m8(q),Z.position++}else L(Z,"unknown escape sequence");z=G=Z.position}else if(o(W))z1(Z,z,G,!0),_0(Z,P(Z,!1,X)),z=G=Z.position;else if(Z.position===Z.lineStart&&G0(Z))L(Z,"unexpected end of the document within a double quoted scalar");else Z.position++,G=Z.position;L(Z,"unexpected end of the stream within a double quoted scalar")}function p8(Z,X){var z=!0,G,J,q,Q=Z.tag,W,Y=Z.anchor,U,M,V,K,F,D=Object.create(null),$,H,A,B;if(B=Z.input.charCodeAt(Z.position),B===91)M=93,F=!1,W=[];else if(B===123)M=125,F=!0,W={};else return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=W;B=Z.input.charCodeAt(++Z.position);while(B!==0){if(P(Z,!0,X),B=Z.input.charCodeAt(Z.position),B===M)return Z.position++,Z.tag=Q,Z.anchor=Y,Z.kind=F?"mapping":"sequence",Z.result=W,!0;else if(!z)L(Z,"missed comma between flow collection entries");else if(B===44)L(Z,"expected the node content, but found ','");if(H=$=A=null,V=K=!1,B===63){if(U=Z.input.charCodeAt(Z.position+1),u(U))V=K=!0,Z.position++,P(Z,!0,X)}if(G=Z.line,J=Z.lineStart,q=Z.position,w1(Z,X,t1,!1,!0),H=Z.tag,$=Z.result,P(Z,!0,X),B=Z.input.charCodeAt(Z.position),(K||Z.line===G)&&B===58)V=!0,B=Z.input.charCodeAt(++Z.position),P(Z,!0,X),w1(Z,X,t1,!1,!0),A=Z.result;if(F)C1(Z,W,D,H,$,A,G,J,q);else if(V)W.push(C1(Z,null,D,H,$,A,G,J,q));else W.push($);if(P(Z,!0,X),B=Z.input.charCodeAt(Z.position),B===44)z=!0,B=Z.input.charCodeAt(++Z.position);else z=!1}L(Z,"unexpected end of the stream within a flow collection")}function d8(Z,X){var z,G,J=O0,q=!1,Q=!1,W=X,Y=0,U=!1,M,V;if(V=Z.input.charCodeAt(Z.position),V===124)G=!1;else if(V===62)G=!0;else return!1;Z.kind="scalar",Z.result="";while(V!==0)if(V=Z.input.charCodeAt(++Z.position),V===43||V===45)if(O0===J)J=V===43?V4:E8;else L(Z,"repeat of a chomping mode identifier");else if((M=y8(V))>=0)if(M===0)L(Z,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!Q)W=X+M-1,Q=!0;else L(Z,"repeat of an indentation width identifier");else break;if(Y1(V)){do V=Z.input.charCodeAt(++Z.position);while(Y1(V));if(V===35)do V=Z.input.charCodeAt(++Z.position);while(!o(V)&&V!==0)}while(V!==0){P0(Z),Z.lineIndent=0,V=Z.input.charCodeAt(Z.position);while((!Q||Z.lineIndent<W)&&V===32)Z.lineIndent++,V=Z.input.charCodeAt(++Z.position);if(!Q&&Z.lineIndent>W)W=Z.lineIndent;if(o(V)){Y++;continue}if(Z.lineIndent<W){if(J===V4)Z.result+=x.repeat(`
20
+ `,q?1+Y:Y);else if(J===O0){if(q)Z.result+=`
21
+ `}break}if(G)if(Y1(V))U=!0,Z.result+=x.repeat(`
22
+ `,q?1+Y:Y);else if(U)U=!1,Z.result+=x.repeat(`
23
+ `,Y+1);else if(Y===0){if(q)Z.result+=" "}else Z.result+=x.repeat(`
24
+ `,Y);else Z.result+=x.repeat(`
25
+ `,q?1+Y:Y);q=!0,Q=!0,Y=0,z=Z.position;while(!o(V)&&V!==0)V=Z.input.charCodeAt(++Z.position);z1(Z,z,Z.position,!1)}return!0}function D4(Z,X){var z,G=Z.tag,J=Z.anchor,q=[],Q,W=!1,Y;if(Z.firstTabInLine!==-1)return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=q;Y=Z.input.charCodeAt(Z.position);while(Y!==0){if(Z.firstTabInLine!==-1)Z.position=Z.firstTabInLine,L(Z,"tab characters must not be used in indentation");if(Y!==45)break;if(Q=Z.input.charCodeAt(Z.position+1),!u(Q))break;if(W=!0,Z.position++,P(Z,!0,-1)){if(Z.lineIndent<=X){q.push(null),Y=Z.input.charCodeAt(Z.position);continue}}if(z=Z.line,w1(Z,X,n4,!1,!0),q.push(Z.result),P(Z,!0,-1),Y=Z.input.charCodeAt(Z.position),(Z.line===z||Z.lineIndent>X)&&Y!==0)L(Z,"bad indentation of a sequence entry");else if(Z.lineIndent<X)break}if(W)return Z.tag=G,Z.anchor=J,Z.kind="sequence",Z.result=q,!0;return!1}function l8(Z,X,z){var G,J,q,Q,W,Y,U=Z.tag,M=Z.anchor,V={},K=Object.create(null),F=null,D=null,$=null,H=!1,A=!1,B;if(Z.firstTabInLine!==-1)return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=V;B=Z.input.charCodeAt(Z.position);while(B!==0){if(!H&&Z.firstTabInLine!==-1)Z.position=Z.firstTabInLine,L(Z,"tab characters must not be used in indentation");if(G=Z.input.charCodeAt(Z.position+1),q=Z.line,(B===63||B===58)&&u(G)){if(B===63){if(H)C1(Z,V,K,F,D,null,Q,W,Y),F=D=$=null;A=!0,H=!0,J=!0}else if(H)H=!1,J=!0;else L(Z,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");Z.position+=1,B=G}else{if(Q=Z.line,W=Z.lineStart,Y=Z.position,!w1(Z,z,i4,!1,!0))break;if(Z.line===q){B=Z.input.charCodeAt(Z.position);while(Y1(B))B=Z.input.charCodeAt(++Z.position);if(B===58){if(B=Z.input.charCodeAt(++Z.position),!u(B))L(Z,"a whitespace character is expected after the key-value separator within a block mapping");if(H)C1(Z,V,K,F,D,null,Q,W,Y),F=D=$=null;A=!0,H=!1,J=!1,F=Z.tag,D=Z.result}else if(A)L(Z,"can not read an implicit mapping pair; a colon is missed");else return Z.tag=U,Z.anchor=M,!0}else if(A)L(Z,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Z.tag=U,Z.anchor=M,!0}if(Z.line===q||Z.lineIndent>X){if(H)Q=Z.line,W=Z.lineStart,Y=Z.position;if(w1(Z,X,e1,!0,J))if(H)D=Z.result;else $=Z.result;if(!H)C1(Z,V,K,F,D,$,Q,W,Y),F=D=$=null;P(Z,!0,-1),B=Z.input.charCodeAt(Z.position)}if((Z.line===q||Z.lineIndent>X)&&B!==0)L(Z,"bad indentation of a mapping entry");else if(Z.lineIndent<X)break}if(H)C1(Z,V,K,F,D,null,Q,W,Y);if(A)Z.tag=U,Z.anchor=M,Z.kind="mapping",Z.result=V;return A}function i8(Z){var X,z=!1,G=!1,J,q,Q;if(Q=Z.input.charCodeAt(Z.position),Q!==33)return!1;if(Z.tag!==null)L(Z,"duplication of a tag property");if(Q=Z.input.charCodeAt(++Z.position),Q===60)z=!0,Q=Z.input.charCodeAt(++Z.position);else if(Q===33)G=!0,J="!!",Q=Z.input.charCodeAt(++Z.position);else J="!";if(X=Z.position,z){do Q=Z.input.charCodeAt(++Z.position);while(Q!==0&&Q!==62);if(Z.position<Z.length)q=Z.input.slice(X,Z.position),Q=Z.input.charCodeAt(++Z.position);else L(Z,"unexpected end of the stream within a verbatim tag")}else{while(Q!==0&&!u(Q)){if(Q===33)if(!G){if(J=Z.input.slice(X-1,Z.position+1),!o4.test(J))L(Z,"named tag handle cannot contain such characters");G=!0,X=Z.position+1}else L(Z,"tag suffix cannot contain exclamation marks");Q=Z.input.charCodeAt(++Z.position)}if(q=Z.input.slice(X,Z.position),b8.test(q))L(Z,"tag suffix cannot contain flow indicator characters")}if(q&&!r4.test(q))L(Z,"tag name cannot contain such characters: "+q);try{q=decodeURIComponent(q)}catch(W){L(Z,"tag name is malformed: "+q)}if(z)Z.tag=q;else if(G1.call(Z.tagMap,J))Z.tag=Z.tagMap[J]+q;else if(J==="!")Z.tag="!"+q;else if(J==="!!")Z.tag="tag:yaml.org,2002:"+q;else L(Z,'undeclared tag handle "'+J+'"');return!0}function n8(Z){var X,z;if(z=Z.input.charCodeAt(Z.position),z!==38)return!1;if(Z.anchor!==null)L(Z,"duplication of an anchor property");z=Z.input.charCodeAt(++Z.position),X=Z.position;while(z!==0&&!u(z)&&!O1(z))z=Z.input.charCodeAt(++Z.position);if(Z.position===X)L(Z,"name of an anchor node must contain at least one character");return Z.anchor=Z.input.slice(X,Z.position),!0}function o8(Z){var X,z,G;if(G=Z.input.charCodeAt(Z.position),G!==42)return!1;G=Z.input.charCodeAt(++Z.position),X=Z.position;while(G!==0&&!u(G)&&!O1(G))G=Z.input.charCodeAt(++Z.position);if(Z.position===X)L(Z,"name of an alias node must contain at least one character");if(z=Z.input.slice(X,Z.position),!G1.call(Z.anchorMap,z))L(Z,'unidentified alias "'+z+'"');return Z.result=Z.anchorMap[z],P(Z,!0,-1),!0}function w1(Z,X,z,G,J){var q,Q,W,Y=1,U=!1,M=!1,V,K,F,D,$,H;if(Z.listener!==null)Z.listener("open",Z);if(Z.tag=null,Z.anchor=null,Z.kind=null,Z.result=null,q=Q=W=e1===z||n4===z,G){if(P(Z,!0,-1)){if(U=!0,Z.lineIndent>X)Y=1;else if(Z.lineIndent===X)Y=0;else if(Z.lineIndent<X)Y=-1}}if(Y===1)while(i8(Z)||n8(Z))if(P(Z,!0,-1)){if(U=!0,W=q,Z.lineIndent>X)Y=1;else if(Z.lineIndent===X)Y=0;else if(Z.lineIndent<X)Y=-1}else W=!1;if(W)W=U||J;if(Y===1||e1===z){if(t1===z||i4===z)$=X;else $=X+1;if(H=Z.position-Z.lineStart,Y===1)if(W&&(D4(Z,H)||l8(Z,H,$))||p8(Z,$))M=!0;else{if(Q&&d8(Z,$)||f8(Z,$)||c8(Z,$))M=!0;else if(o8(Z)){if(M=!0,Z.tag!==null||Z.anchor!==null)L(Z,"alias node should not have any properties")}else if(h8(Z,$,t1===z)){if(M=!0,Z.tag===null)Z.tag="?"}if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}else if(Y===0)M=W&&D4(Z,H)}if(Z.tag===null){if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}else if(Z.tag==="?"){if(Z.result!==null&&Z.kind!=="scalar")L(Z,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+Z.kind+'"');for(V=0,K=Z.implicitTypes.length;V<K;V+=1)if(D=Z.implicitTypes[V],D.resolve(Z.result)){if(Z.result=D.construct(Z.result),Z.tag=D.tag,Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result;break}}else if(Z.tag!=="!"){if(G1.call(Z.typeMap[Z.kind||"fallback"],Z.tag))D=Z.typeMap[Z.kind||"fallback"][Z.tag];else{D=null,F=Z.typeMap.multi[Z.kind||"fallback"];for(V=0,K=F.length;V<K;V+=1)if(Z.tag.slice(0,F[V].tag.length)===F[V].tag){D=F[V];break}}if(!D)L(Z,"unknown tag !<"+Z.tag+">");if(Z.result!==null&&D.kind!==Z.kind)L(Z,"unacceptable node kind for !<"+Z.tag+'> tag; it should be "'+D.kind+'", not "'+Z.kind+'"');if(!D.resolve(Z.result,Z.tag))L(Z,"cannot resolve a node with !<"+Z.tag+"> explicit tag");else if(Z.result=D.construct(Z.result,Z.tag),Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}if(Z.listener!==null)Z.listener("close",Z);return Z.tag!==null||Z.anchor!==null||M}function r8(Z){var X=Z.position,z,G,J,q=!1,Q;Z.version=null,Z.checkLineBreaks=Z.legacy,Z.tagMap=Object.create(null),Z.anchorMap=Object.create(null);while((Q=Z.input.charCodeAt(Z.position))!==0){if(P(Z,!0,-1),Q=Z.input.charCodeAt(Z.position),Z.lineIndent>0||Q!==37)break;q=!0,Q=Z.input.charCodeAt(++Z.position),z=Z.position;while(Q!==0&&!u(Q))Q=Z.input.charCodeAt(++Z.position);if(G=Z.input.slice(z,Z.position),J=[],G.length<1)L(Z,"directive name must not be less than one character in length");while(Q!==0){while(Y1(Q))Q=Z.input.charCodeAt(++Z.position);if(Q===35){do Q=Z.input.charCodeAt(++Z.position);while(Q!==0&&!o(Q));break}if(o(Q))break;z=Z.position;while(Q!==0&&!u(Q))Q=Z.input.charCodeAt(++Z.position);J.push(Z.input.slice(z,Z.position))}if(Q!==0)P0(Z);if(G1.call(H4,G))H4[G](Z,G,J);else Z0(Z,'unknown document directive "'+G+'"')}if(P(Z,!0,-1),Z.lineIndent===0&&Z.input.charCodeAt(Z.position)===45&&Z.input.charCodeAt(Z.position+1)===45&&Z.input.charCodeAt(Z.position+2)===45)Z.position+=3,P(Z,!0,-1);else if(q)L(Z,"directives end mark is expected");if(w1(Z,Z.lineIndent-1,e1,!1,!0),P(Z,!0,-1),Z.checkLineBreaks&&k8.test(Z.input.slice(X,Z.position)))Z0(Z,"non-ASCII line breaks are interpreted as content");if(Z.documents.push(Z.result),Z.position===Z.lineStart&&G0(Z)){if(Z.input.charCodeAt(Z.position)===46)Z.position+=3,P(Z,!0,-1);return}if(Z.position<Z.length-1)L(Z,"end of the stream or a document separator is expected");else return}function Z7(Z,X){if(Z=String(Z),X=X||{},Z.length!==0){if(Z.charCodeAt(Z.length-1)!==10&&Z.charCodeAt(Z.length-1)!==13)Z+=`
26
+ `;if(Z.charCodeAt(0)===65279)Z=Z.slice(1)}var z=new u8(Z,X),G=Z.indexOf("\x00");if(G!==-1)z.position=G,L(z,"null byte is not allowed in input");z.input+="\x00";while(z.input.charCodeAt(z.position)===32)z.lineIndent+=1,z.position+=1;while(z.position<z.length-1)r8(z);return z.documents}function s8(Z,X,z){if(X!==null&&typeof X==="object"&&typeof z>"u")z=X,X=null;var G=Z7(Z,z);if(typeof X!=="function")return G;for(var J=0,q=G.length;J<q;J+=1)X(G[J])}function a8(Z,X){var z=Z7(Z,X);if(z.length===0)return;else if(z.length===1)return z[0];throw new y("expected a single document in the stream, but found more")}var t8=s8,e8=a8,X7={loadAll:t8,load:e8},z7=Object.prototype.toString,G7=Object.prototype.hasOwnProperty,x0=65279,Z9=9,_1=10,X9=13,z9=32,G9=33,J9=34,w0=35,q9=37,Q9=38,W9=39,Y9=42,J7=44,U9=45,X0=58,M9=61,V9=62,K9=63,F9=64,q7=91,Q7=93,H9=96,W7=123,B9=124,Y7=125,g={};g[0]="\\0";g[7]="\\a";g[8]="\\b";g[9]="\\t";g[10]="\\n";g[11]="\\v";g[12]="\\f";g[13]="\\r";g[27]="\\e";g[34]="\\\"";g[92]="\\\\";g[133]="\\N";g[160]="\\_";g[8232]="\\L";g[8233]="\\P";var D9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],A9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function $9(Z,X){var z,G,J,q,Q,W,Y;if(X===null)return{};z={},G=Object.keys(X);for(J=0,q=G.length;J<q;J+=1){if(Q=G[J],W=String(X[Q]),Q.slice(0,2)==="!!")Q="tag:yaml.org,2002:"+Q.slice(2);if(Y=Z.compiledTypeMap.fallback[Q],Y&&G7.call(Y.styleAliases,W))W=Y.styleAliases[W];z[Q]=W}return z}function L9(Z){var X,z,G;if(X=Z.toString(16).toUpperCase(),Z<=255)z="x",G=2;else if(Z<=65535)z="u",G=4;else if(Z<=4294967295)z="U",G=8;else throw new y("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+z+x.repeat("0",G-X.length)+X}var O9=1,x1=2;function C9(Z){this.schema=Z.schema||j0,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=x.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=$9(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?x1:O9,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function A4(Z,X){var z=x.repeat(" ",X),G=0,J=-1,q="",Q,W=Z.length;while(G<W){if(J=Z.indexOf(`
27
+ `,G),J===-1)Q=Z.slice(G),G=W;else Q=Z.slice(G,J+1),G=J+1;if(Q.length&&Q!==`
28
+ `)q+=z;q+=Q}return q}function I0(Z,X){return`
29
+ `+x.repeat(" ",Z.indent*X)}function w9(Z,X){var z,G,J;for(z=0,G=Z.implicitTypes.length;z<G;z+=1)if(J=Z.implicitTypes[z],J.resolve(X))return!0;return!1}function z0(Z){return Z===z9||Z===Z9}function E1(Z){return 32<=Z&&Z<=126||161<=Z&&Z<=55295&&Z!==8232&&Z!==8233||57344<=Z&&Z<=65533&&Z!==x0||65536<=Z&&Z<=1114111}function $4(Z){return E1(Z)&&Z!==x0&&Z!==X9&&Z!==_1}function L4(Z,X,z){var G=$4(Z),J=G&&!z0(Z);return(z?G:G&&Z!==J7&&Z!==q7&&Z!==Q7&&Z!==W7&&Z!==Y7)&&Z!==w0&&!(X===X0&&!J)||$4(X)&&!z0(X)&&Z===w0||X===X0&&J}function I9(Z){return E1(Z)&&Z!==x0&&!z0(Z)&&Z!==U9&&Z!==K9&&Z!==X0&&Z!==J7&&Z!==q7&&Z!==Q7&&Z!==W7&&Z!==Y7&&Z!==w0&&Z!==Q9&&Z!==Y9&&Z!==G9&&Z!==B9&&Z!==M9&&Z!==V9&&Z!==W9&&Z!==J9&&Z!==q9&&Z!==F9&&Z!==H9}function T9(Z){return!z0(Z)&&Z!==X0}function j1(Z,X){var z=Z.charCodeAt(X),G;if(z>=55296&&z<=56319&&X+1<Z.length){if(G=Z.charCodeAt(X+1),G>=56320&&G<=57343)return(z-55296)*1024+G-56320+65536}return z}function U7(Z){var X=/^\n* /;return X.test(Z)}var M7=1,T0=2,V7=3,K7=4,L1=5;function R9(Z,X,z,G,J,q,Q,W){var Y,U=0,M=null,V=!1,K=!1,F=G!==-1,D=-1,$=I9(j1(Z,0))&&T9(j1(Z,Z.length-1));if(X||Q)for(Y=0;Y<Z.length;U>=65536?Y+=2:Y++){if(U=j1(Z,Y),!E1(U))return L1;$=$&&L4(U,M,W),M=U}else{for(Y=0;Y<Z.length;U>=65536?Y+=2:Y++){if(U=j1(Z,Y),U===_1){if(V=!0,F)K=K||Y-D-1>G&&Z[D+1]!==" ",D=Y}else if(!E1(U))return L1;$=$&&L4(U,M,W),M=U}K=K||F&&(Y-D-1>G&&Z[D+1]!==" ")}if(!V&&!K){if($&&!Q&&!J(Z))return M7;return q===x1?L1:T0}if(z>9&&U7(Z))return L1;if(!Q)return K?K7:V7;return q===x1?L1:T0}function N9(Z,X,z,G,J){Z.dump=function(){if(X.length===0)return Z.quotingType===x1?'""':"''";if(!Z.noCompatMode){if(D9.indexOf(X)!==-1||A9.test(X))return Z.quotingType===x1?'"'+X+'"':"'"+X+"'"}var q=Z.indent*Math.max(1,z),Q=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-q),W=G||Z.flowLevel>-1&&z>=Z.flowLevel;function Y(U){return w9(Z,U)}switch(R9(X,W,Z.indent,Q,Y,Z.quotingType,Z.forceQuotes&&!G,J)){case M7:return X;case T0:return"'"+X.replace(/'/g,"''")+"'";case V7:return"|"+O4(X,Z.indent)+C4(A4(X,q));case K7:return">"+O4(X,Z.indent)+C4(A4(j9(X,Q),q));case L1:return'"'+P9(X)+'"';default:throw new y("impossible error: invalid scalar style")}}()}function O4(Z,X){var z=U7(Z)?String(X):"",G=Z[Z.length-1]===`
30
+ `,J=G&&(Z[Z.length-2]===`
31
+ `||Z===`
32
+ `),q=J?"+":G?"":"-";return z+q+`
33
+ `}function C4(Z){return Z[Z.length-1]===`
34
+ `?Z.slice(0,-1):Z}function j9(Z,X){var z=/(\n+)([^\n]*)/g,G=function(){var U=Z.indexOf(`
35
+ `);return U=U!==-1?U:Z.length,z.lastIndex=U,w4(Z.slice(0,U),X)}(),J=Z[0]===`
36
+ `||Z[0]===" ",q,Q;while(Q=z.exec(Z)){var W=Q[1],Y=Q[2];q=Y[0]===" ",G+=W+(!J&&!q&&Y!==""?`
37
+ `:"")+w4(Y,X),J=q}return G}function w4(Z,X){if(Z===""||Z[0]===" ")return Z;var z=/ [^ ]/g,G,J=0,q,Q=0,W=0,Y="";while(G=z.exec(Z)){if(W=G.index,W-J>X)q=Q>J?Q:W,Y+=`
38
+ `+Z.slice(J,q),J=q+1;Q=W}if(Y+=`
39
+ `,Z.length-J>X&&Q>J)Y+=Z.slice(J,Q)+`
40
+ `+Z.slice(Q+1);else Y+=Z.slice(J);return Y.slice(1)}function P9(Z){var X="",z=0,G;for(var J=0;J<Z.length;z>=65536?J+=2:J++)if(z=j1(Z,J),G=g[z],!G&&E1(z)){if(X+=Z[J],z>=65536)X+=Z[J+1]}else X+=G||L9(z);return X}function _9(Z,X,z){var G="",J=Z.tag,q,Q,W;for(q=0,Q=z.length;q<Q;q+=1){if(W=z[q],Z.replacer)W=Z.replacer.call(z,String(q),W);if(Z1(Z,X,W,!1,!1)||typeof W>"u"&&Z1(Z,X,null,!1,!1)){if(G!=="")G+=","+(!Z.condenseFlow?" ":"");G+=Z.dump}}Z.tag=J,Z.dump="["+G+"]"}function I4(Z,X,z,G){var J="",q=Z.tag,Q,W,Y;for(Q=0,W=z.length;Q<W;Q+=1){if(Y=z[Q],Z.replacer)Y=Z.replacer.call(z,String(Q),Y);if(Z1(Z,X+1,Y,!0,!0,!1,!0)||typeof Y>"u"&&Z1(Z,X+1,null,!0,!0,!1,!0)){if(!G||J!=="")J+=I0(Z,X);if(Z.dump&&_1===Z.dump.charCodeAt(0))J+="-";else J+="- ";J+=Z.dump}}Z.tag=q,Z.dump=J||"[]"}function x9(Z,X,z){var G="",J=Z.tag,q=Object.keys(z),Q,W,Y,U,M;for(Q=0,W=q.length;Q<W;Q+=1){if(M="",G!=="")M+=", ";if(Z.condenseFlow)M+='"';if(Y=q[Q],U=z[Y],Z.replacer)U=Z.replacer.call(z,Y,U);if(!Z1(Z,X,Y,!1,!1))continue;if(Z.dump.length>1024)M+="? ";if(M+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!Z1(Z,X,U,!1,!1))continue;M+=Z.dump,G+=M}Z.tag=J,Z.dump="{"+G+"}"}function E9(Z,X,z,G){var J="",q=Z.tag,Q=Object.keys(z),W,Y,U,M,V,K;if(Z.sortKeys===!0)Q.sort();else if(typeof Z.sortKeys==="function")Q.sort(Z.sortKeys);else if(Z.sortKeys)throw new y("sortKeys must be a boolean or a function");for(W=0,Y=Q.length;W<Y;W+=1){if(K="",!G||J!=="")K+=I0(Z,X);if(U=Q[W],M=z[U],Z.replacer)M=Z.replacer.call(z,U,M);if(!Z1(Z,X+1,U,!0,!0,!0))continue;if(V=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024,V)if(Z.dump&&_1===Z.dump.charCodeAt(0))K+="?";else K+="? ";if(K+=Z.dump,V)K+=I0(Z,X);if(!Z1(Z,X+1,M,!0,V))continue;if(Z.dump&&_1===Z.dump.charCodeAt(0))K+=":";else K+=": ";K+=Z.dump,J+=K}Z.tag=q,Z.dump=J||"{}"}function T4(Z,X,z){var G,J,q,Q,W,Y;J=z?Z.explicitTypes:Z.implicitTypes;for(q=0,Q=J.length;q<Q;q+=1)if(W=J[q],(W.instanceOf||W.predicate)&&(!W.instanceOf||typeof X==="object"&&X instanceof W.instanceOf)&&(!W.predicate||W.predicate(X))){if(z)if(W.multi&&W.representName)Z.tag=W.representName(X);else Z.tag=W.tag;else Z.tag="?";if(W.represent){if(Y=Z.styleMap[W.tag]||W.defaultStyle,z7.call(W.represent)==="[object Function]")G=W.represent(X,Y);else if(G7.call(W.represent,Y))G=W.represent[Y](X,Y);else throw new y("!<"+W.tag+'> tag resolver accepts not "'+Y+'" style');Z.dump=G}return!0}return!1}function Z1(Z,X,z,G,J,q,Q){if(Z.tag=null,Z.dump=z,!T4(Z,z,!1))T4(Z,z,!0);var W=z7.call(Z.dump),Y=G,U;if(G)G=Z.flowLevel<0||Z.flowLevel>X;var M=W==="[object Object]"||W==="[object Array]",V,K;if(M)V=Z.duplicates.indexOf(z),K=V!==-1;if(Z.tag!==null&&Z.tag!=="?"||K||Z.indent!==2&&X>0)J=!1;if(K&&Z.usedDuplicates[V])Z.dump="*ref_"+V;else{if(M&&K&&!Z.usedDuplicates[V])Z.usedDuplicates[V]=!0;if(W==="[object Object]"){if(G&&Object.keys(Z.dump).length!==0){if(E9(Z,X,Z.dump,J),K)Z.dump="&ref_"+V+Z.dump}else if(x9(Z,X,Z.dump),K)Z.dump="&ref_"+V+" "+Z.dump}else if(W==="[object Array]"){if(G&&Z.dump.length!==0){if(Z.noArrayIndent&&!Q&&X>0)I4(Z,X-1,Z.dump,J);else I4(Z,X,Z.dump,J);if(K)Z.dump="&ref_"+V+Z.dump}else if(_9(Z,X,Z.dump),K)Z.dump="&ref_"+V+" "+Z.dump}else if(W==="[object String]"){if(Z.tag!=="?")N9(Z,Z.dump,X,q,Y)}else if(W==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new y("unacceptable kind of an object to dump "+W)}if(Z.tag!==null&&Z.tag!=="?"){if(U=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21"),Z.tag[0]==="!")U="!"+U;else if(U.slice(0,18)==="tag:yaml.org,2002:")U="!!"+U.slice(18);else U="!<"+U+">";Z.dump=U+" "+Z.dump}}return!0}function S9(Z,X){var z=[],G=[],J,q;R0(Z,z,G);for(J=0,q=G.length;J<q;J+=1)X.duplicates.push(z[G[J]]);X.usedDuplicates=Array(q)}function R0(Z,X,z){var G,J,q;if(Z!==null&&typeof Z==="object")if(J=X.indexOf(Z),J!==-1){if(z.indexOf(J)===-1)z.push(J)}else if(X.push(Z),Array.isArray(Z))for(J=0,q=Z.length;J<q;J+=1)R0(Z[J],X,z);else{G=Object.keys(Z);for(J=0,q=G.length;J<q;J+=1)R0(Z[G[J]],X,z)}}function k9(Z,X){X=X||{};var z=new C9(X);if(!z.noRefs)S9(Z,z);var G=Z;if(z.replacer)G=z.replacer.call({"":G},"",G);if(Z1(z,0,G,!0,!0))return z.dump+`
41
+ `;return""}var b9=k9,g9={dump:b9};function E0(Z,X){return function(){throw Error("Function yaml."+Z+" is removed in js-yaml 4. Use yaml."+X+" instead, which is now safe by default.")}}var v9=S,y9=j4,m9=E4,S0=v4,u9=y4,h9=j0,f9=X7.load,c9=X7.loadAll,p9=g9.dump,d9=y,l9={binary:c4,float:g4,map:x4,null:S4,pairs:d4,set:l4,timestamp:h4,bool:k4,int:b4,merge:f4,omap:p4,seq:_4,str:P4},i9=E0("safeLoad","load"),n9=E0("safeLoadAll","loadAll"),o9=E0("safeDump","dump"),k0={Type:v9,Schema:y9,FAILSAFE_SCHEMA:m9,JSON_SCHEMA:S0,CORE_SCHEMA:u9,DEFAULT_SCHEMA:h9,load:f9,loadAll:c9,dump:p9,YAMLException:d9,types:l9,safeLoad:i9,safeLoadAll:n9,safeDump:o9};var F7={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")try{return k0.load(X,{schema:S0})}catch{try{return k0.load(X)}catch(z){throw new p(z?.message||"Parser Error",Z.url)}}else return X}};var r9=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i,H7={order:300,allowEmpty:!0,encoding:"utf8",canParse(Z){return(typeof Z.data==="string"||Buffer.isBuffer(Z.data))&&r9.test(Z.url)},parse(Z){if(typeof Z.data==="string")return Z.data;else if(Buffer.isBuffer(Z.data))return Z.data.toString(this.encoding);else throw new p("data is not text",Z.url)}};var s9=/\.(jpeg|jpg|gif|png|bmp|ico)$/i,B7={order:400,allowEmpty:!0,canParse(Z){return Buffer.isBuffer(Z.data)&&s9.test(Z.url)},parse(Z){if(Buffer.isBuffer(Z.data))return Z.data;else return Buffer.from(Z.data)}};var b0={order:100,canRead(Z){return c1(Z.url)},async read(Z){let X,z=await import("fs");try{X=D1(Z.url)}catch(G){let J=G;throw J.message=`Malformed URI: ${Z.url}: ${J.message}`,new d(J,Z.url)}if(X.endsWith("/")||X.endsWith("\\"))X=X.slice(0,-1);try{return await z.promises.readFile(X)}catch(G){let J=G;throw J.message=`Error opening file ${X}: ${J.message}`,new d(J,X)}}};var g0={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return Z4(Z.url)&&(!this.safeUrlResolver||!V0(Z.url))},read(Z){let X=B1(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=B1(location.href).protocol;return D7(X,this)}};async function D7(Z,X,z){Z=B1(Z);let G=z||[];G.push(Z.href);try{let J=await a9(Z,X);if(J.status>=400){let q=Error(`HTTP ERROR ${J.status}`);throw q.status=J.status,q}else if(J.status>=300)if(!Number.isNaN(X.redirects)&&G.length>X.redirects){let q=Error(`Error downloading ${G[0]}.
42
+ Too many redirects:
43
+ ${G.join(`
44
+ `)}`);throw q.status=J.status,new d(q)}else if(!("location"in J.headers)||!J.headers.location){let q=Error(`HTTP ${J.status} redirect with no location header`);throw q.status=J.status,q}else{let q=_(Z.href,J.headers.location);return D7(q,X,G)}else{if(J.body){let q=await J.arrayBuffer();return Buffer.from(q)}return Buffer.alloc(0)}}catch(J){let q=J;throw q.message=`Error downloading ${Z.href}: ${q.message}`,new d(q,Z.href)}}async function a9(Z,X){let z,G;if(X.timeout&&typeof AbortController<"u")z=new AbortController,G=setTimeout(()=>z.abort(),X.timeout);let J=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",signal:z?z.signal:null});if(G)clearTimeout(G);return J}var $7=()=>{return{parse:{json:{...U4},yaml:{...F7},text:{...H7},binary:{...B7}},resolve:{file:{...b0},http:{...g0},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},L7=(Z)=>{let X=$7();if(Z)O7(X,Z);return X};function O7(Z,X){if(A7(X)){let z=Object.keys(X).filter((G)=>!["__proto__","constructor","prototype"].includes(G));for(let G=0;G<z.length;G++){let J=z[G],q=X[J],Q=Z[J];if(A7(q))Z[J]=O7(Q||{},q);else if(q!==void 0)Z[J]=q}}return Z}function A7(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}function t9(Z){let X,z,G,J,q=Array.prototype.slice.call(Z);if(typeof q[q.length-1]==="function")J=q.pop();if(typeof q[0]==="string")if(X=q[0],typeof q[2]==="object")z=q[1],G=q[2];else z=void 0,G=q[1];else X="",z=q[0],G=q[1];try{G=L7(G)}catch(Q){console.error(`JSON Schema Ref Parser: Error normalizing options: ${Q}`)}if(!G.mutateInputSchema&&typeof z==="object")z=JSON.parse(JSON.stringify(z));return{path:X,schema:z,options:G,callback:J}}var S1=t9;function e9(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let z=Z.$refs._root$Ref.dynamicIdScope?v(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=v0(Z.schema,Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(G)}catch(z){return Promise.reject(z)}}function v0(Z,X,z,G,J,q,Q,W){Q||=new Set;let Y=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!Q.has(Z)){Q.add(Z);let U=z;if(N.isExternal$Ref(Z))Y.push(ZZ(Z,X,U,G,J,q));let M=Object.keys(Z);for(let V of M){let K=m.join(X,V),F=Z[V],D=G&&F&&typeof F==="object"&&!ArrayBuffer.isView(F)?v(U,F):U;Y=Y.concat(v0(F,K,D,G,J,q,Q,W))}}return Y}async function ZZ(Z,X,z,G,J,q){let W=q.dereference?.externalReferenceResolution==="root"?Q1():G?z:X,Y=_(W,Z.$ref),U=j(Y),M=J._get$Ref(U);if(M)return Promise.resolve(M.value);try{let V=Z.$ref,K={url:Y,baseUrl:W};if(typeof V==="string")K.reference=V;let F=await a1(K,J,q),D=J._get$Ref(U),$=v0(F,U+"#",U,D?.dynamicIdScope??!1,J,q,new Set,!0);return Promise.all($)}catch(V){if(!q?.continueOnError||!n(V))throw V;if(J._$refs[U])V.source=decodeURI(j(X)),V.path=p1(l(X));return[]}}var C7=e9;function XZ(Z,X){let z=Z.$refs._root$Ref.dynamicIdScope?v(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=[];y0(Z,"schema",Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,"#",0,G,Z.$refs,X);let J=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(zZ(G,X,J),(X.bundle||{}).optimizeInternalRefs!==!1)qZ(G,Z.schema)}function y0(Z,X,z,G,J,q,Q,W,Y,U){let M=X===null?Z:Z[X],V=U.bundle||{},K=V.excludedPathMatcher||(()=>!1);if(M&&typeof M==="object"&&!ArrayBuffer.isView(M)&&!K(q)){let F=G;if(N.isAllowed$Ref(M))w7(Z,X,z,F,J,q,Q,W,Y,U);else{let D=Object.keys(M).sort(($,H)=>{if($==="definitions"||$==="$defs")return-1;else if(H==="definitions"||H==="$defs")return 1;else return $.length-H.length});for(let $ of D){let H=m.join(z,$),A=m.join(q,$),B=M[$],C=J&&B&&typeof B==="object"&&!ArrayBuffer.isView(B)?v(F,B):F;if(N.isAllowed$Ref(B))w7(M,$,H,C,J,A,Q,W,Y,U);else y0(M,$,H,C,J,A,Q,W,Y,U);if(B&&typeof B==="object"&&!Array.isArray(B)){if("$ref"in B)V?.onBundle?.(B.$ref,M[$],M,$)}}}}}function w7(Z,X,z,G,J,q,Q,W,Y,U){let M=X===null?Z:Z[X],V=_(J?G:z,M.$ref),K=Y._resolve(V,q,U);if(K===null)return;let D=m.parse(q).length,$=j(K.path),H=l(K.path),A=$!==Y._root$Ref.path&&!Y._aliases[$],B=N.isExtended$Ref(M);Q+=K.indirections;let C=GZ(W,Z,X);if(C)if(D<C.depth||Q<C.indirections)JZ(W,C);else return;if(W.push({$ref:M,parent:Z,key:X,pathFromRoot:q,depth:D,file:$,hash:H,value:K.value,circular:K.circular,extended:B,external:A,indirections:Q}),!C||A)y0(K.value,null,K.path,K.$ref.path,K.$ref.dynamicIdScope,q,Q+1,W,Y,U)}function zZ(Z,X,z){Z.sort((Q,W)=>{if(Q.file!==W.file)return Q.file<W.file?-1:1;else if(Q.hash!==W.hash)return Q.hash<W.hash?-1:1;else if(Q.circular!==W.circular)return Q.circular?-1:1;else if(Q.extended!==W.extended)return Q.extended?1:-1;else if(Q.indirections!==W.indirections)return Q.indirections-W.indirections;else if(Q.depth!==W.depth)return Q.depth-W.depth;else{let Y=Math.max(Q.pathFromRoot.lastIndexOf("/definitions"),Q.pathFromRoot.lastIndexOf("/$defs")),U=Math.max(W.pathFromRoot.lastIndexOf("/definitions"),W.pathFromRoot.lastIndexOf("/$defs"));if(Y!==U)return U-Y;else return Q.pathFromRoot.length-W.pathFromRoot.length}});let G,J,q;for(let Q of Z){let W=X.bundle||{};if(!Q.external){if(W.optimizeInternalRefs!==!1)Q.$ref.$ref=Q.hash}else if(Q.file===G&&Q.hash===J)if(z&&I7(Z,Q))Q.$ref.$ref=z+q;else Q.$ref.$ref=q;else if(Q.file===G&&Q.hash.indexOf(J+"/")===0){let Y=m.join(q,m.parse(Q.hash.replace(J,"#")));if(z&&I7(Z,Q))Q.$ref.$ref=z+Y;else Q.$ref.$ref=Y}else if(G=Q.file,J=Q.hash,q=Q.pathFromRoot,Q.$ref=Q.parent[Q.key]=N.dereference(Q.$ref,Q.value,X),Q.circular)Q.$ref.$ref=Q.pathFromRoot}}function GZ(Z,X,z){for(let G of Z)if(G&&G.parent===X&&G.key===z)return G;return}function JZ(Z,X){let z=Z.indexOf(X);Z.splice(z,1)}function qZ(Z,X){for(let z of Z){if(!z.$ref||typeof z.$ref!=="object"||!("$ref"in z.$ref))continue;let G=z.$ref.$ref;if(typeof G!=="string"||!G.startsWith("#/"))continue;let J=QZ(X,G);if(J!==G)z.$ref.$ref=J}}function QZ(Z,X){if(!X.startsWith("#/"))return X;let z=X.slice(2).split("/"),G=Z,J=[];for(let Q of z){if(G===null||G===void 0||typeof G!=="object")return X;if("$ref"in G&&typeof G.$ref==="string"&&G.$ref.startsWith("#/")){let U=G.$ref.slice(2).split("/");if(J.length=0,J.push(...U),G=WZ(Z,G.$ref),G===null||G===void 0||typeof G!=="object")return X}let W=Q.replace(/~1/g,"/").replace(/~0/g,"~"),Y=Array.isArray(G)?parseInt(W):W;G=G[Y],J.push(Q)}return"#/"+J.join("/")}function WZ(Z,X){if(!X.startsWith("#/"))return;let z=X.slice(2).split("/"),G=Z;for(let J of z){if(G===null||G===void 0||typeof G!=="object")return;let q=J.replace(/~1/g,"/").replace(/~0/g,"~"),Q=Array.isArray(G)?parseInt(q):q;G=G[Q]}return G}function I7(Z,X){for(let z of Z){if(z.pathFromRoot==="#"||z.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(z.pathFromRoot+"/")){if(z.value&&typeof z.value==="object"&&"$id"in z.value)return!0}}return!1}var T7=XZ;var j7=YZ;function YZ(Z,X){let z=Date.now(),G=Z.$refs._root$Ref.dynamicIdScope?v(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,J=m0(Z.schema,Z.$refs._root$Ref.path,G,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,z,0);Z.$refs.circular=J.circular,Z.schema=J.value}function m0(Z,X,z,G,J,q,Q,W,Y,U,M,V){let K,F={value:Z,circular:!1};N7(M,U);let D=U.dereference||{},$=D.maxDepth??500;if(V>$)throw RangeError(`Maximum dereference depth (${$}) exceeded at ${J}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let H=D.excludedPathMatcher||(()=>!1);if(D?.circular==="ignore"||!Q.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!H(J)){q.add(Z),Q.add(Z);let A=z;if(N.isAllowed$Ref(Z,U))K=R7(Z,X,A,G,J,q,Q,W,Y,U,M,V),F.circular=K.circular,F.value=K.value;else for(let B of Object.keys(Z)){N7(M,U);let C=m.join(X,B),T=m.join(J,B);if(H(T))continue;let k=Z[B],w=G&&k&&typeof k==="object"&&!ArrayBuffer.isView(k)?v(A,k):A,R;if(N.isAllowed$Ref(k,U)){if(K=R7(k,C,w,G,T,q,Q,W,Y,U,M,V),R=K.circular,Z[B]!==K.value){let O=new Map;if(D?.preservedProperties){if(typeof Z[B]==="object"&&!Array.isArray(Z[B]))D?.preservedProperties.forEach((J1)=>{if(J1 in Z[B])O.set(J1,Z[B][J1])})}let a=K.value;if(D?.cloneReferences&&!R&&a&&typeof a==="object")a=structuredClone(a);if(Z[B]=a,D?.preservedProperties){if(O.size&&typeof Z[B]==="object"&&!Array.isArray(Z[B]))O.forEach((J1,W0)=>{Z[B][W0]=J1})}D?.onDereference?.(k.$ref,Z[B],Z,B)}}else if(!q.has(k)){if(K=m0(k,C,w,G,T,q,Q,W,Y,U,M,V+1),R=K.circular,Z[B]!==K.value)Z[B]=K.value}else R=J0(C,Y,U);F.circular=F.circular||R}q.delete(Z)}}return F}function R7(Z,X,z,G,J,q,Q,W,Y,U,M,V){let D=N.isExternal$Ref(Z)&&U?.dereference?.externalReferenceResolution==="root"?Q1():G?z:X,$=_(D,Z.$ref),H=W.get($);if(H){if(!H.circular){let w=Object.keys(Z);if(w.length>1){let R={};for(let O of w)if(O!=="$ref"&&!(O in H.value))R[O]=Z[O];return{circular:H.circular,value:Object.assign({},H.value,R)}}return H}if(typeof H.value==="object"&&"$ref"in H.value&&"$ref"in Z){if(H.value.$ref===Z.$ref)return J0(X,Y,U),H}else return J0(X,Y,U),H}let A=Y._resolve($,X,U);if(A===null)return{circular:!1,value:null};let B=A.circular,C=B||q.has(A.value);if(C)J0(X,Y,U);let T=N.dereference(Z,A.value,U);if(!C){let w=m0(T,A.path,A.$ref.path,A.$ref.dynamicIdScope,J,q,Q,W,Y,U,M,V+1);C=w.circular,T=w.value}if(C&&!B&&U.dereference?.circular==="ignore")T=Z;if(B)T.$ref=J;let k={circular:C,value:T};if(Object.keys(Z).length===1)W.set($,k);return k}function N7(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new K0(X.timeoutMs)}}function J0(Z,X,z){if(X.circular=!0,z?.dereference?.onCircular?.(Z),!z.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}function UZ(){if(typeof process==="object"&&typeof process.nextTick==="function")return process.nextTick;else if(typeof setImmediate==="function")return setImmediate;else return function(X){setTimeout(X,0)}}var u0=UZ();function h(Z,X){if(Z){X.then(function(z){u0(function(){Z(null,z)})},function(z){u0(function(){Z(z)})});return}else return X}class r{schema=null;$refs=new N1;async parse(){let Z=S1(arguments),X;if(!Z.path&&!Z.schema){let G=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return h(Z.callback,Promise.reject(G))}this.schema=null,this.$refs=new N1;let z="http";if(c1(Z.path))Z.path=X4(Z.path),z="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let G=B1(Z.schema.$id),J=G.port??(G.protocol==="https:"?443:80);Z.path=`${G.protocol}//${G.hostname}:${J}`}if(Z.path=_(Q1(),Z.path),Z.schema&&typeof Z.schema==="object"){let G=this.$refs._add(Z.path);G.value=Z.schema,G.pathType=z,G.dynamicIdScope=n1(G.value),o1(this.$refs,G.path,G.value,G.pathType,G.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=a1(Z.path,this.$refs,Z.options);try{let G=await X;if(G!==null&&typeof G==="object"&&!Buffer.isBuffer(G))return this.schema=G,h(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,h(Z.callback,Promise.resolve(this.schema));else throw SyntaxError(`"${this.$refs._root$Ref.path||G}" is not a valid JSON Schema`)}catch(G){if(!Z.options.continueOnError||!n(G))return h(Z.callback,Promise.reject(G));if(this.$refs._$refs[j(Z.path)])this.$refs._$refs[j(Z.path)].addError(G);return h(Z.callback,Promise.resolve(null))}}static parse(){let Z=new r;return Z.parse.apply(Z,arguments)}async resolve(){let Z=S1(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await C7(this,Z.options),h0(this),h(Z.callback,Promise.resolve(this.$refs))}catch(X){return h(Z.callback,Promise.reject(X))}}static resolve(){let Z=new r;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new r;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=S1(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),T7(this,Z.options),h0(this),h(Z.callback,Promise.resolve(this.schema))}catch(X){return h(Z.callback,Promise.reject(X))}}static dereference(){let Z=new r;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=S1(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),j7(this,Z.options),h0(this),h(Z.callback,Promise.resolve(this.schema))}catch(X){return h(Z.callback,Promise.reject(X))}}}var P7=r;function h0(Z){if(A1.getParserErrors(Z).length>0)throw new A1(Z)}var{parse:J3,resolve:q3,bundle:Q3,dereference:W3}=r;async function _7(Z,X={}){let{baseUrl:z="/_jx/server"}=X,G=await P7.dereference(Z),J=s0(G);if(J.length===0)return null;let q=J.map(({exportName:W,src:Y})=>`import { ${W} } from '${Y}'`).join(`
45
+ `),Q=J.map(({exportName:W})=>`
46
+ app.post('${z}/${W}', async (c) => {
47
+ const args = await c.req.json().catch(() => ({}))
48
+ return c.json(await ${W}(args))
49
+ })`).join(`
50
+ `);return`// Generated by @jxsuite/compiler — do not edit manually
51
+ // Deploy as a Cloudflare Worker, Node server, or Bun process.
52
+ // Requires: npm install hono
53
+
54
+ import { Hono } from 'hono'
55
+ ${q}
56
+
57
+ const app = new Hono()
58
+ ${Q}
59
+
60
+ export default app
61
+ `}async function p7(Z,X={}){let{resolveElementPath:z}=X,G=[],J=new Set;async function q(Q,W){let Y,U;if(typeof Q==="string"){let{readFileSync:A}=await import("node:fs"),{resolve:B}=await Promise.resolve().then(() => (b1(),k1));if(U=W?B(W,Q):B(Q),J.has(U))return;J.add(U),Y=JSON.parse(A(U,"utf8"))}else{if(Y=Q,U=null,J.has(Y.tagName))return;J.add(Y.tagName)}let M=Y.tagName;if(!M||!M.includes("-"))throw Error(`compileElement: tagName "${M}" must contain a hyphen`);let{dirname:V}=await Promise.resolve().then(() => (b1(),k1)),K=U?V(U):null,F=[];if(Array.isArray(Y.$elements))for(let A of Y.$elements){let B=A.$ref??A;if(typeof B!=="string")continue;if(K)await q(B,K);let C;if(z)C=z(B,K);else C=B.replace(/\.json$/,".js");F.push(C)}let D=f1(M),$=g1(Y,D,F),H=U?U.replace(/\.json$/,".js"):`${M}.js`;G.push({path:H,content:$,tagName:M})}return await q(Z,X.basePath??null),{files:G}}async function KZ(Z,X={}){let{title:z="Jx App",reactivitySrc:G="https://esm.sh/@vue/reactivity@3.5.13",litHtmlSrc:J="https://esm.sh/lit-html@3.3.0"}=X,q=await p7(Z,X),Q=q.files[q.files.length-1],{basename:W}=await Promise.resolve().then(() => (b1(),k1)),Y=W(Q.path);return{html:`<!DOCTYPE html>
62
+ <html lang="en">
63
+ <head>
64
+ <meta charset="utf-8">
65
+ <meta name="viewport" content="width=device-width, initial-scale=1">
66
+ <title>${I(z)}</title>
67
+ <script type="importmap">
68
+ {
69
+ "imports": {
70
+ "@vue/reactivity": "${G}",
71
+ "lit-html": "${J}"
72
+ }
73
+ }
74
+ </script>
75
+ </head>
76
+ <body>
77
+ <${Q.tagName}></${Q.tagName}>
78
+ <script type="module" src="./${Y}"></script>
79
+ </body>
80
+ </html>`,files:q.files}}function FZ(Z){if(Z===null||typeof Z!=="object"||Array.isArray(Z))return JSON.stringify(Z);if("default"in Z)return JSON.stringify(Z.default);if(K1(Z))return;if(Z.$prototype==="LocalStorage"||Z.$prototype==="SessionStorage")return JSON.stringify(Z.default??null);if(Z.$prototype==="Request")return"null";return JSON.stringify(Z)}function g1(Z,X,z){let G=[];if(G.push("// Generated by @jxsuite/compiler — do not edit manually"),Z.$id)G.push(`// Source: ${Z.$id}`);for(let U of z)G.push(`import '${U}';`);let J=new Map,q=Z.state??{};for(let[U,M]of Object.entries(q)){let V=M;if(V&&typeof V==="object"&&!Array.isArray(V)&&V.$prototype==="Function"&&V.$src){let K=V.$src;if(!J.has(K))J.set(K,[]);J.get(K).push(U)}}for(let[U,M]of J)G.push(`import { ${M.join(", ")} } from '${U}';`);G.push("import { reactive, computed, effect } from '@vue/reactivity';"),G.push("import { render, html } from 'lit-html';"),G.push(""),G.push(`class ${X} extends HTMLElement {`),G.push(" #dispose = null;"),G.push(""),G.push(" constructor() {"),G.push(" super();");let Q=[],W=[],Y=[];for(let[U,M]of Object.entries(q)){let V=M;if(V&&typeof V==="object"&&!Array.isArray(V)&&V.$prototype==="Function")if(typeof V.body==="string"&&V.body.includes("return"))W.push([U,V]);else Y.push([U,V]);else{let K=FZ(V);if(K!==void 0)Q.push([U,K])}}G.push(" this.state = reactive({");for(let[U,M]of Q)G.push(` ${U}: ${M},`);G.push(" });");for(let[U,M]of Y)if(G.push(""),M.$src){let K=(M.parameters??M.arguments??["state"]).join(", ");G.push(` this.state.${U} = (${K}) => ${U}(${K});`)}else{let K=(M.parameters??M.arguments??["state"]).join(", ");G.push(` this.state.${U} = (${K}) => {`),G.push(` ${M.body}`),G.push(" };")}for(let[U,M]of W)if(G.push(""),M.$src)G.push(` this.state.${U} = computed(() => ${U}(this.state));`);else{G.push(` this.state.${U} = computed(() => {`);let V=M.body.replace(/state\./g,"this.state.");G.push(` ${V}`),G.push(" });")}if(G.push(" }"),G.push(""),G.push(" template() {"),G.push(" const s = this.state;"),G.push(" return html`"),G.push(c0(Z.children,Z.style," ")),G.push(" `;"),G.push(" }"),G.push(""),G.push(" connectedCallback() {"),G.push(" for (const key of Object.keys(this.state)) {"),G.push(" if (key in this && this[key] !== undefined) {"),G.push(" this.state[key] = this[key];"),G.push(" }"),G.push(" }"),Z.style&&typeof Z.style==="object"){let U=[],M=[];for(let[V,K]of Object.entries(Z.style)){if(V.startsWith(":")||V.startsWith(".")||V.startsWith("&")||V.startsWith("[")||V.startsWith("@"))continue;if(K===null||typeof K==="object")continue;let F=f(V);if(typeof K==="string"&&K.includes("${"))M.push([F,K]);else U.push([F,K])}if(U.length>0)for(let[V,K]of U)G.push(` this.style['${V}'] = ${JSON.stringify(K)};`);if(M.length>0){G.push(" effect(() => {");for(let[V,K]of M){let F=K.replace(/\$\{([^}]+)\}/g,(D,$)=>"${"+$.replace(/state\./g,"this.state.")+"}");G.push(` this.style['${V}'] = \`${F}\`;`)}G.push(" });")}}return G.push(" this.#dispose = effect(() => render(this.template(), this));"),G.push(" }"),G.push(""),G.push(" disconnectedCallback() {"),G.push(" if (this.#dispose) { this.#dispose(); this.#dispose = null; }"),G.push(" }"),G.push("}"),G.push(""),G.push(`customElements.define('${Z.tagName}', ${X});`),G.push(""),G.join(`
81
+ `)}function c0(Z,X,z){if(!Z)return"";if(Z.$prototype==="Array")return BZ(Z,z);if(!Array.isArray(Z))return"";return Z.map((G)=>HZ(G,z)).join(`
82
+ `)}function HZ(Z,X){if(typeof Z==="string")return`${X}${I(Z)}`;if(typeof Z==="number"||typeof Z==="boolean")return`${X}${I(String(Z))}`;if(!Z||typeof Z!=="object")return"";let z=Z.tagName??"div",G=[];if(Z.attributes)for(let[Y,U]of Object.entries(Z.attributes))if(typeof U==="string"&&U.includes("${"))G.push(`${Y}="${Q0(U)}"`);else G.push(`${Y}="${U}"`);if(Z.id)G.push(`id="${Z.id}"`);if(Z.className)G.push(`class="${Z.className}"`);for(let[Y,U]of Object.entries(Z)){if(q1.has(Y)||Y.startsWith("$")||Y.startsWith("on")||Y==="tagName"||Y==="id"||Y==="className"||Y==="style"||Y==="children"||Y==="textContent"||Y==="innerHTML"||Y==="attributes")continue;if(U&&typeof U==="object"&&U.$ref)G.push(`.${Y}="\${${U1(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))G.push(`.${Y}="${Q0(U)}"`)}if(Z.$props)for(let[Y,U]of Object.entries(Z.$props))if(U&&typeof U==="object"&&U.$ref)G.push(`.${Y}="\${${U1(U.$ref)}}"`);else G.push(`.${Y}="\${${JSON.stringify(U)}}"`);for(let[Y,U]of Object.entries(Z)){if(!Y.startsWith("on")||Y==="observedAttributes")continue;let M=Y.slice(2).toLowerCase();if(U&&typeof U==="object"&&U.$ref)G.push(`@${M}="\${(e) => ${U1(U.$ref)}(s, e)}"`);else if(U&&typeof U==="object"&&U.$prototype==="Function")G.push(`@${M}="\${(e) => { ${AZ(U)} }}"`)}let J=l7(Z.style);if(J)G.push(`style="${J}"`);let q=G.length>0?`
83
+ `+X+" "+G.join(`
84
+ `+X+" "):"";if(new Set(["input","br","hr","img","meta","link"]).has(z))return`${X}<${z}${q}
85
+ ${X}>`;let W="";if(Z.textContent!==void 0)W=d7(Z.textContent);else if(Z.innerHTML!==void 0)W=Z.innerHTML;else if(Z.children)W=`
86
+ `+c0(Z.children,Z.style,X+" ")+`
87
+ `+X;return`${X}<${z}${q}
88
+ ${X}>${W}</${z}>`}function BZ(Z,X){let z=Z.items?.$ref?U1(Z.items.$ref):"ITEMS",G=Z.map;if(!G)return"";let J=G.tagName??"div",q=[];if(G.$props)for(let[U,M]of Object.entries(G.$props))if(M&&typeof M==="object"&&M.$ref)q.push(`.${U}="\${${DZ(M.$ref)}}"`);else q.push(`.${U}="\${${JSON.stringify(M)}}"`);let Q=l7(G.style);if(Q)q.push(`style="${Q}"`);for(let[U,M]of Object.entries(G)){if(!U.startsWith("on"))continue;let V=U.slice(2).toLowerCase();if(M&&typeof M==="object"&&M.$ref)q.push(`@${V}="\${(e) => ${U1(M.$ref)}(s, e)}"`)}let W=q.length>0?`
89
+ `+X+" "+q.join(`
90
+ `+X+" "):"",Y="";if(G.textContent!==void 0)Y=d7(G.textContent);else if(G.children)Y=`
91
+ `+c0(G.children,null,X+" ")+`
92
+ `+X+" ";return`${X}\${${z}.map((item, index) => html\`
93
+ ${X} <${J}${W}
94
+ ${X} >${Y}</${J}>
95
+ ${X}\`)}`}function U1(Z){if(Z.startsWith("#/state/"))return"s."+Z.slice(8).replace(/\//g,".");if(Z.startsWith("$map/"))return Z.slice(5).replace(/\//g,".");return"s."+Z}function DZ(Z){if(Z.startsWith("$map/"))return Z.slice(5).replace(/\//g,".");return U1(Z)}function Q0(Z){return Z.replace(/state\./g,"s.")}function d7(Z){if(Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string")return`\${${U1(Z.$ref)}}`;if(typeof Z==="string"&&Z.includes("${"))return Q0(Z);return String(Z)}function AZ(Z){return(Z.body??"").replace(/(?<!this\.)state\./g,"s.").replace(/(?<!this\.)state(?!\.)/g,"s")}function l7(Z){if(!Z||typeof Z!=="object")return"";let X=[];for(let[z,G]of Object.entries(Z)){if(z.startsWith(":")||z.startsWith(".")||z.startsWith("&")||z.startsWith("[")||z.startsWith("@"))continue;if(G===null||typeof G==="object")continue;let J=f(z);if(typeof G==="string"&&G.includes("${"))X.push(`${J}: ${Q0(G)}`);else X.push(`${J}: ${G}`)}return X.join("; ")}function i7(Z,X){let{title:z,reactivitySrc:G,litHtmlSrc:J}=X,q=F1(Z,null,Z.state??{},Z.$media??{}),Q=H1(Z,Z.$media??{}),W=[],Y=n7(Z,!1,Z,q,W),U=[],M="",V="";if(W.length>0){for(let F of W){let D=g1(F.def,F.className,[]);U.push({path:`_islands/${F.tagName}.js`,content:D,tagName:F.tagName})}M=`<script type="importmap">
96
+ {
97
+ "imports": {
98
+ "@vue/reactivity": "${G}",
99
+ "lit-html": "${J}"
100
+ }
101
+ }
102
+ </script>`,V=U.map((F)=>`<script type="module" src="./${F.path}"></script>`).join(`
103
+ `)}return{html:`<!DOCTYPE html>
104
+ <html lang="en">
105
+ <head>
106
+ <meta charset="utf-8">
107
+ <meta name="viewport" content="width=device-width, initial-scale=1">
108
+ <title>${I(z)}</title>
109
+ ${M}
110
+ ${Q}
111
+ </head>
112
+ <body>
113
+ ${Y}
114
+ ${V}
115
+ </body>
116
+ </html>`,files:U}}function n7(Z,X,z,G,J){if(typeof Z==="string")return I(Z);if(typeof Z==="number"||typeof Z==="boolean")return I(String(Z));if(!Z||typeof Z!=="object")return"";let q=F1(z,G.scope,z?.state??G.scopeDefs,z?.$media??G.media);if(X){let U=J.length,M=`jx-island-${U}`,V=`JxIsland${U}`,K={...z??Z,tagName:M};return J.push({def:K,tagName:M,className:V}),`<${M}></${M}>`}let Q=Z.tagName??"div",W=h1(Z,q.scope),Y=$Z(Z,z,q,J);return`<${Q}${W}>${Y}</${Q}>`}function $Z(Z,X,z,G){let J=X??Z;if(J.textContent!==void 0){let q=b(J.textContent,z.scope);return q==null?"":I(String(q))}if(J.innerHTML)return b(J.innerHTML,z.scope)??"";if(Array.isArray(J.children)){let q=X?.children;return J.children.map((Q,W)=>{let Y=n0(Q),U=q?.[W]??Q;return n7(Q,Y,U,z,G)}).join(`
117
+ `)}return""}function o7(Z,X){let{title:z,reactivitySrc:G=m1,litHtmlSrc:J=u1,modulePath:q="app.js"}=X,Q=F1(Z,null,Z.state??{},Z.$media??{}),W=H1(Z,Z.$media??{}),Y={t:0,s:0,h:0,m:0,sw:0,l:0,needsLit:!1},U=new Map,M=new Map,V=[],K=[],F=[],D=[],$=[],H=new Map,A=Z.state??{};for(let[w,R]of Object.entries(A)){if(R===null||typeof R!=="object"||Array.isArray(R)){if(typeof R==="string"&&E(R))K.push([w,"() => `"+R+"`"]);else V.push([w,R]);continue}let O=R;if(O.$prototype==="Function"){let a=O.parameters??O.arguments;if(O.$src){if(!H.has(O.$src))H.set(O.$src,new Set);H.get(O.$src).add(w),K.push([w,"() => { return "+w+"(state); }"])}else if(O.body&&O.body.includes("return"))K.push([w,"() => { "+O.body+" }"]);else D.push([w,{args:a??["state"],body:O.body}]);continue}if(K1(O))continue;if("default"in O&&!O.$prototype){V.push([w,O.default]);continue}if(O.$prototype==="LocalStorage"||O.$prototype==="SessionStorage"){let a=O.$prototype==="LocalStorage"?"localStorage":"sessionStorage",J1=O.key??w,W0=O.default??null;V.push([w,null]),$.push(CZ(w,a,J1,W0));continue}if(O.$prototype==="Request"){V.push([w,null]),$.push(OZ(w,O));continue}if(O.$prototype==="Cookie"){V.push([w,null]),$.push(wZ(w,O.name??w,O.default??null));continue}V.push([w,O])}let B=r7(Z,Z,Q,U,M,Y);for(let[w,R]of U)if(!F.some(([O])=>O===w))F.push([w,R]);for(let[w,R]of M)if(!D.some(([O])=>O===w))D.push([w,R]);let C=LZ(V,K,F,D,$,H,Y,G),T=[` "@vue/reactivity": "${G}"`];if(Y.needsLit)T.push(` "lit-html": "${J}"`);return{html:`<!DOCTYPE html>
118
+ <html lang="en">
119
+ <head>
120
+ <meta charset="utf-8">
121
+ <meta name="viewport" content="width=device-width, initial-scale=1">
122
+ <title>${I(z)}</title>
123
+ <script type="importmap">
124
+ {
125
+ "imports": {
126
+ ${T.join(`,
127
+ `)}
128
+ }
129
+ }
130
+ </script>
131
+ ${W}
132
+ <script type="module" src="./${q}"></script>
133
+ </head>
134
+ <body>
135
+ ${B}
136
+ </body>
137
+ </html>`,files:[{path:q,content:C}]}}function r7(Z,X,z,G,J,q){if(typeof Z==="string")return I(Z);if(typeof Z==="number"||typeof Z==="boolean")return I(String(Z));if(!Z||typeof Z!=="object")return"";let Q=F1(X,z.scope,X?.state??z.scopeDefs,X?.$media??z.media),W=Z.tagName??"div",Y=[],U=!1;if(Z.textContent!==void 0){let H=X?.textContent??Z.textContent;if(t(H)){let A=M1(H.$ref);Y.push(`:text-content="${A}"`),p0(G,A,H.$ref),U=!0}else if(E(H)){let A=`_t${q.t++}`;Y.push(`:text-content="${A}"`),G.set(A,"() => `"+H+"`"),U=!0}}for(let[H,A]of Object.entries(Z)){if(!H.startsWith("on")||H==="observedAttributes")continue;let B=H.slice(2).toLowerCase();if(t(A)){let C=M1(A.$ref);Y.push(`@${B}="${C}"`),U=!0}else if(A&&typeof A==="object"&&A.$prototype==="Function"){let C=A,T=`_h${q.h++}`;Y.push(`@${B}="${T}"`),J.set(T,{args:C.parameters??C.arguments??["state","event"],body:C.body}),U=!0}}if(Z.style&&typeof Z.style==="object")for(let[H,A]of Object.entries(Z.style)){if(H.startsWith(":")||H.startsWith(".")||H.startsWith("&")||H.startsWith("[")||H.startsWith("@"))continue;if(A===null||typeof A==="object")continue;if(E(A)){let B=`_s${q.s++}`;Y.push(`:style.${f(H)}="${B}"`),G.set(B,"() => `"+A+"`"),U=!0}}if(Z.attributes&&typeof Z.attributes==="object"){for(let[H,A]of Object.entries(Z.attributes))if(t(A)){let B=M1(A.$ref);Y.push(`:attr.${H}="${B}"`),p0(G,B,A.$ref),U=!0}else if(E(A)){let B=`_t${q.t++}`;Y.push(`:attr.${H}="${B}"`),G.set(B,"() => `"+A+"`"),U=!0}}for(let[H,A]of Object.entries(Z)){if(q1.has(H)||H.startsWith("on")||H.startsWith("$")||H==="tagName"||H==="id"||H==="className"||H==="style"||H==="children"||H==="textContent"||H==="innerHTML"||H==="attributes")continue;if(t(A)){let B=M1(A.$ref);Y.push(`:${f(H)}="${B}"`),p0(G,B,A.$ref),U=!0}else if(E(A)){let B=`_t${q.t++}`;Y.push(`:${f(H)}="${B}"`),G.set(B,"() => `"+A+"`"),U=!0}}let M=h1(Z,Q.scope),V=U?" data-bind":"",K=Y.length>0?" "+Y.join(" "):"",F="",D=X??Z;if(D.textContent!==void 0&&!U){let H=b(D.textContent,Q.scope);F=H==null?"":I(String(H))}else if(D.textContent!==void 0&&U)try{let H=b(D.textContent,Q.scope);F=H==null?"":I(String(H))}catch{F=""}else if(D.innerHTML)F=b(D.innerHTML,Q.scope)??"";else if(D.children&&typeof D.children==="object"&&!Array.isArray(D.children)&&D.children.$prototype==="Array"){q.needsLit=!0;let H=`_list${q.l++}`,A=D.children,B;if(t(A.items))B="state."+M1(A.items.$ref);else B=JSON.stringify(A.items);let C=s7(A.map);G.set(H,"() => ("+B+" ?? []).map((item, index) => html`"+C+"`)"),Y.push(`:render="${H}"`),U=!0;let T=" data-bind",k=" "+Y.join(" ");if(new Set(["input","br","hr","img","meta","link"]).has(W))return`<${W}${M}${T}${k}>`;return`<${W}${M}${T}${k}></${W}>`}else if(Array.isArray(D.children)){let H=X?.children;F=D.children.map((A,B)=>{let C=H?.[B]??A;return r7(A,C,Q,G,J,q)}).join(`
138
+ `)}if(new Set(["input","br","hr","img","meta","link"]).has(W))return`<${W}${M}${V}${K}>`;return`<${W}${M}${V}${K}>${F}</${W}>`}function s7(Z){if(!Z)return"";let X=Z.tagName??"div",z="";if(Z.id)z+=' id="'+Z.id+'"';if(Z.className)z+=' class="'+I1(Z.className)+'"';if(Z.attributes&&typeof Z.attributes==="object")for(let[q,Q]of Object.entries(Z.attributes))if(typeof Q==="string"&&E(Q))z+=" "+q+'="'+I1(Q)+'"';else z+=" "+q+'="'+I(String(Q))+'"';if(Z.style&&typeof Z.style==="object"){let q=[];for(let[Q,W]of Object.entries(Z.style)){if(Q.startsWith(":")||Q.startsWith(".")||Q.startsWith("&")||Q.startsWith("[")||Q.startsWith("@"))continue;if(W===null||typeof W==="object")continue;let Y=f(Q);if(E(String(W)))q.push(Y+": "+I1(String(W)));else q.push(Y+": "+W)}if(q.length>0)z+=' style="'+q.join("; ")+'"'}for(let[q,Q]of Object.entries(Z)){if(!q.startsWith("on")||q==="observedAttributes")continue;let W=q.slice(2).toLowerCase();if(t(Q)){let Y=M1(Q.$ref);z+=" @"+W+"=${(e) => { state.$map = { item, index }; on."+Y+"(e); }}"}else if(Q&&typeof Q==="object"&&Q.$prototype==="Function"){let Y=I1(Q.body);z+=" @"+W+"=${(e) => { "+Y+" }}"}}if(Z.contentEditable)z+=' contenteditable="'+Z.contentEditable+'"';let G="";if(Z.textContent!==void 0){let q=String(Z.textContent);if(E(q))G=I1(q);else if(t(Z.textContent))G="${state."+M1(Z.textContent.$ref)+"}";else G=I(q)}else if(Z.innerHTML)G=I1(String(Z.innerHTML));else if(Array.isArray(Z.children))G=`
139
+ `+Z.children.map((q)=>s7(q)).join(`
140
+ `)+`
141
+ `;if(new Set(["input","br","hr","img","meta","link"]).has(X))return"<"+X+z+">";return"<"+X+z+">"+G+"</"+X+">"}function I1(Z){return Z.replace(/\$map\./g,"")}function LZ(Z,X,z,G,J,q,Q,W){let Y=[],U=Q.needsLit,M=X.length>0;Y.push("// Generated by @jxsuite/compiler — do not edit manually");let V=["reactive","effect"];if(M)V.push("computed");if(Y.push("import { "+V.join(", ")+" } from '@vue/reactivity';"),U)Y.push("import { html, render } from 'lit-html';");for(let[K,F]of q)Y.push("import { "+[...F].join(", ")+" } from '"+K+"';");Y.push(""),Y.push("const state = reactive({");for(let[K,F]of Z)Y.push(" "+K+": "+JSON.stringify(F)+",");if(Y.push("});"),Y.push(""),J.length>0){for(let K of J)Y.push(K);Y.push("")}if(X.length>0){for(let[K,F]of X)Y.push("state."+K+" = computed("+F+");");Y.push("")}if(z.length>0){Y.push("const bind = {");for(let[K,F]of z)Y.push(" "+K+": "+F+",");Y.push("};")}else Y.push("const bind = {};");if(Y.push(""),G.length>0){Y.push("const on = {");for(let[K,F]of G)if(F.imported){let $=(F.args??["state"]).map((H)=>H==="state"?"state":"e").join(", ");Y.push(" "+K+": (e) => { "+K+"("+$+"); },")}else{let D=F.args??["state"],$=D.map((H)=>H==="state"?"state":"e").join(", ");Y.push(" "+K+": (e) => { const fn = ("+D.join(", ")+") => { "+F.body+" }; fn("+$+"); },")}Y.push("};")}else Y.push("const on = {};");if(Y.push(""),Y.push("function hydrate(root) {"),Y.push(" root.querySelectorAll('[data-bind]').forEach(el => {"),Y.push(" [...el.attributes].forEach(a => {"),Y.push(" if (a.name.startsWith(':')) {"),Y.push(" const parts = a.name.slice(1).split('.');"),Y.push(" const key = a.value;"),U)Y.push(" if (parts[0] === 'render') {"),Y.push(" effect(() => { render(bind[key](), el); });"),Y.push(" } else if (parts[0] === 'style' && parts.length > 1) {");else Y.push(" if (parts[0] === 'style' && parts.length > 1) {");return Y.push(" effect(() => { el.style[parts[1]] = bind[key](); });"),Y.push(" } else if (parts[0] === 'attr' && parts.length > 1) {"),Y.push(" effect(() => { el.setAttribute(parts[1], bind[key]()); });"),Y.push(" } else {"),Y.push(" const prop = parts[0].replace(/-([a-z])/g, (_, c) => c.toUpperCase());"),Y.push(" effect(() => { el[prop] = bind[key](); });"),Y.push(" }"),Y.push(" } else if (a.name.startsWith('@')) {"),Y.push(" el.addEventListener(a.name.slice(1), on[a.value]);"),Y.push(" }"),Y.push(" });"),Y.push(" });"),Y.push("}"),Y.push(""),Y.push("hydrate(document);"),Y.push(""),Y.join(`
142
+ `)}function OZ(Z,X){let z=X.url,G=X.method??"GET",J=E(z);if(X.manual)return"// "+Z+": manual Request — fetch triggered by user action";let q=[];if(q.push("// "+Z+": auto-fetch from "+(J?"(dynamic URL)":z)),q.push("effect(() => {"),J)q.push(" const url = `"+z+"`;"),q.push(' if (!url || url === "undefined" || url.includes("undefined")) return;');else q.push(" const url = "+JSON.stringify(z)+";");let Q=[];if(G!=="GET")Q.push("method: "+JSON.stringify(G));if(X.headers)Q.push("headers: "+JSON.stringify(X.headers));if(X.body){let Y=typeof X.body==="object"?JSON.stringify(JSON.stringify(X.body)):JSON.stringify(X.body);Q.push("body: "+Y)}let W=Q.length>0?", { "+Q.join(", ")+" }":"";return q.push(" fetch(url"+W+")"),q.push(" .then(r => r.ok ? r.json() : Promise.reject(r.statusText))"),q.push(" .then(d => { state."+Z+" = d; })"),q.push(" .catch(e => { state."+Z+" = { error: String(e) }; });"),q.push("});"),q.join(`
143
+ `)}function CZ(Z,X,z,G){let J=[];return J.push("// "+Z+": "+X+' (key: "'+z+'")'),J.push("try {"),J.push(" const _s = "+X+".getItem("+JSON.stringify(z)+");"),J.push(" state."+Z+" = _s !== null ? JSON.parse(_s) : "+JSON.stringify(G)+";"),J.push("} catch { state."+Z+" = "+JSON.stringify(G)+"; }"),J.push("effect(() => {"),J.push(" const v = state."+Z+";"),J.push(" try {"),J.push(" if (v === null) "+X+".removeItem("+JSON.stringify(z)+");"),J.push(" else "+X+".setItem("+JSON.stringify(z)+", JSON.stringify(v));"),J.push(" } catch {}"),J.push("});"),J.join(`
144
+ `)}function wZ(Z,X,z){let G=[];return G.push("// "+Z+': Cookie (name: "'+X+'")'),G.push("{"),G.push(' const _m = document.cookie.match(new RegExp("(?:^|; )'+X+'=([^;]*)"));'),G.push(" try { state."+Z+" = _m ? JSON.parse(decodeURIComponent(_m[1])) : "+JSON.stringify(z)+"; }"),G.push(" catch { state."+Z+" = _m ? _m[1] : "+JSON.stringify(z)+"; }"),G.push("}"),G.join(`
145
+ `)}function M1(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replace(/\//g,"_");return Z.replace(/\//g,"_")}function p0(Z,X,z){if(Z.has(X))return;if(z.startsWith("#/state/")){let J=z.slice(8).split("/");Z.set(X,"() => state."+J.join("."))}else Z.set(X,"() => state."+z)}async function _Z(Z,X={}){let{title:z="Jx App",reactivitySrc:G=m1,litHtmlSrc:J=u1}=X,q=typeof Z==="string"?JSON.parse(PZ(Z,"utf8")):Z;if(q.$prototype==="Class"){let{compileClassJson:Q}=await Promise.resolve().then(() => t7),W=Q(q,X);return{html:"",files:[{path:typeof Z==="string"?Z.replace(/\.class\.json$/,".js"):`${q.title}.js`,content:W}]}}if(!U0(q))return i7(q,{title:z,reactivitySrc:G,litHtmlSrc:J});if(q.tagName&&q.tagName.includes("-")){let Q=q.tagName,W=f1(Q),Y=g1(q,W,[]),U={path:`${Q}.js`,content:Y,tagName:Q},M=H1(q,q.$media??{});return{html:`<!DOCTYPE html>
146
+ <html lang="en">
147
+ <head>
148
+ <meta charset="utf-8">
149
+ <meta name="viewport" content="width=device-width, initial-scale=1">
150
+ <title>${I(z)}</title>
151
+ <script type="importmap">
152
+ {
153
+ "imports": {
154
+ "@vue/reactivity": "${G}",
155
+ "lit-html": "${J}"
156
+ }
157
+ }
158
+ </script>
159
+ ${M}
160
+ </head>
161
+ <body>
162
+ <${Q}></${Q}>
163
+ <script type="module" src="./${Q}.js"></script>
164
+ </body>
165
+ </html>`,files:[U]}}return o7(q,{title:z,reactivitySrc:G,litHtmlSrc:J})}var xZ=process.argv[1]?.endsWith("compiler.js");if(xZ&&process.argv[2]){let[,,Z,X]=process.argv;Promise.all([_Z(Z),_7(Z)]).then(async([z,G])=>{let{writeFileSync:J,mkdirSync:q}=await import("node:fs"),{dirname:Q,join:W}=await Promise.resolve().then(() => (b1(),k1));if(X){J(X,z.html,"utf8"),console.error(`Written to ${X}`);let Y=Q(X);for(let U of z.files){let M=W(Y,U.path);q(Q(M),{recursive:!0}),J(M,U.content,"utf8"),console.error(`Written to ${M}`)}}else process.stdout.write(z.html);if(G&&X){let Y=X.replace(/(\.[^.]+)?$/,"-server.js");J(Y,G,"utf8"),console.error(`Server handler written to ${Y}`)}}).catch((z)=>{console.error(z),process.exit(1)})}export{U0 as isDynamic,_7 as compileServer,KZ as compileElementPage,p7 as compileElement,o7 as compileClient,_Z as compile};
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@jxsuite/compiler",
3
+ "version": "0.0.1",
4
+ "description": "Jx static HTML compiler, island detector, and site builder",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "jx": "./src/cli.js"
8
+ },
9
+ "files": [
10
+ "src/",
11
+ "dist"
12
+ ],
13
+ "type": "module",
14
+ "exports": {
15
+ ".": "./src/compiler.js",
16
+ "./site": "./src/site/site-build.js",
17
+ "./site-loader": "./src/site/site-loader.js",
18
+ "./pages-discovery": "./src/site/pages-discovery.js",
19
+ "./layout-resolver": "./src/site/layout-resolver.js",
20
+ "./head-merger": "./src/site/head-merger.js",
21
+ "./context-injection": "./src/site/context-injection.js",
22
+ "./content-loader": "./src/site/content-loader.js"
23
+ },
24
+ "scripts": {
25
+ "test": "bun test",
26
+ "build": "bun build src/compiler.js --outdir=dist --format=esm --minify",
27
+ "build:site": "bun src/cli.js build",
28
+ "upgrade": "bunx npm-check-updates -u && bun install"
29
+ },
30
+ "dependencies": {
31
+ "@apidevtools/json-schema-ref-parser": "^15.3.5",
32
+ "@jxsuite/parser": "workspace:*",
33
+ "@jxsuite/runtime": "workspace:*"
34
+ },
35
+ "devDependencies": {
36
+ "@happy-dom/global-registrator": "^20.9.0"
37
+ }
38
+ }
package/src/cli.js ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Jx — Unified CLI for the Jx platform
4
+ *
5
+ * Commands: jx build [project-root] [--verbose] [--no-clean]
6
+ *
7
+ * @module jx-cli
8
+ */
9
+
10
+ import { resolve } from "node:path";
11
+
12
+ const args = process.argv.slice(2);
13
+ const command = args[0];
14
+
15
+ if (!command || command === "--help" || command === "-h") {
16
+ console.log(`Usage: jx <command> [options]
17
+
18
+ Commands:
19
+ build [root] Build a Jx site to dist/
20
+
21
+ Options:
22
+ --verbose Print detailed build progress
23
+ --no-clean Don't clean outDir before building`);
24
+ process.exit(0);
25
+ }
26
+
27
+ if (command === "build") {
28
+ const rest = args.slice(1);
29
+ const flags = new Set(rest.filter((a) => a.startsWith("--")));
30
+ const positional = rest.filter((a) => !a.startsWith("--"));
31
+
32
+ const projectRoot = resolve(positional[0] ?? ".");
33
+ const verbose = flags.has("--verbose");
34
+ const clean = !flags.has("--no-clean");
35
+
36
+ console.log(`Building site from ${projectRoot}...`);
37
+
38
+ try {
39
+ const { buildSite } = await import("./site/site-build.js");
40
+ const result = await buildSite(projectRoot, { verbose, clean });
41
+
42
+ if (result.errors.length > 0) {
43
+ console.error(`\nBuild completed with ${result.errors.length} error(s):`);
44
+ for (const err of result.errors) {
45
+ console.error(` - ${err}`);
46
+ }
47
+ process.exit(1);
48
+ }
49
+
50
+ console.log(`\nDone: ${result.routes} routes → ${result.files} files`);
51
+ } catch (e) {
52
+ const err = /** @type {any} */ (e);
53
+ console.error(`Build failed: ${err.message}`);
54
+ process.exit(1);
55
+ }
56
+ } else {
57
+ console.error(`Unknown command: ${command}\nRun "jx --help" for usage.`);
58
+ process.exit(1);
59
+ }