@jxsuite/compiler 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cli.js +219 -210
- package/dist/compiler.js +54 -54
- package/package.json +8 -7
- package/src/cli.ts +9 -12
- package/src/shared.ts +3 -2
- package/src/site/asset-mounts.ts +140 -0
- package/src/site/image-transform.ts +25 -7
- package/src/site/schema-command.ts +22 -9
- package/src/site/site-build.ts +43 -1
- package/src/site/validate-command.ts +264 -0
package/dist/compiler.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import{createRequire as k6}from"node:module";var _6=Object.create;var{getPrototypeOf:N6,defineProperty:b1,getOwnPropertyNames:j6}=Object;var C6=Object.prototype.hasOwnProperty;function R6(Z){return this[Z]}var P6,x6,w7=(Z,X,W)=>{var G=Z!=null&&typeof Z==="object";if(G){var Q=X?P6??=new WeakMap:x6??=new WeakMap,J=Q.get(Z);if(J)return J}W=Z!=null?_6(N6(Z)):{};let U=X||!Z||!Z.__esModule?b1(W,"default",{value:Z,enumerable:!0}):W;for(let K of j6(Z))if(!C6.call(U,K))b1(U,K,{get:R6.bind(Z,K),enumerable:!0});if(G)Q.set(Z,U);return U};var O7=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var E6=(Z)=>Z;function S6(Z,X){this[Z]=E6.bind(null,X)}var Z9=(Z,X)=>{for(var W in X)b1(Z,W,{get:X[W],enumerable:!0,configurable:!0,set:S6.bind(X,W)})};var c=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var y2=k6(import.meta.url);function g1(Z){let X=Z.$map;return X&&typeof X==="object"?X:void 0}function J9(Z){return Z.startsWith("window#/")&&g6.has(Z.slice(8))}function l2(Z){return W9.has(Z)}function r(Z,X){if(!Z)return;let W=(Z.depth??0)+1;if(W>y6)return;return{depth:W,path:[...Z.path??[],...Array.isArray(X)?X:[X]],report:Z.report}}function l(Z,X,W,G,Q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return M2(Z,X,W,G,Q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z){let J=U9(Z.$ref,X,W,G);return Q?.report(Q.path??[],J),J}if(Array.isArray(Z))return Z.map((J,U)=>l(J,X,W,G,r(Q,U)));return Q?.report(Q.path??[],Z),Z}function U9(Z,X,W,G){if(Z==="$reduce/acc")return G?.acc;if(Z.startsWith("$reduce/"))return G?.acc;if(Z.startsWith("$args/")){let Q=Z.slice(6).split("/"),J=G?.args?.[Q[0]];return Q.length>1?m2(J,Q.slice(1).join("/")):J}if(Z.startsWith("event#/")){let Q=Z.slice(7);return m2(W,Q)}if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q,U,K=g1(X);if(J==="item")U=G?.item??K?.item??X["$map/item"];else if(J==="index")U=G?.index??K?.index??X["$map/index"];else U=K?.[J]??X[`$map/${J}`];return Q.length>2?m2(U,Q.slice(2).join("/")):U}if(Z.startsWith("#/state/")){let Q=Z.slice(8),J=Q.indexOf("/");if(J===-1)return X[Q];return m2(X[Q.slice(0,J)],Q.slice(J+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return m2(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return m2(globalThis.document,Z.slice(10));return X[Z]??null}function m6(Z,X,W,G){if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q,U,K=g1(X);if(J==="item")U=G?.item??K?.item??X["$map/item"];else if(J==="index")U=G?.index??K?.index??X["$map/index"];else U=K?.[J]??X[`$map/${J}`];if(Q.length>2){let H=Q.slice(2),Y=H.pop(),q=H.length>0?m2(U,H.join("/")):U;return{key:Y,obj:q}}return{key:J==="item"?"$map/item":"$map/index",obj:g1(X)??X}}if(Z.startsWith("#/state/")){let Q=Z.slice(8);if(Q.indexOf("/")===-1)return{key:Q,obj:X};let U=Q.split("/"),K=U.pop(),H=X;for(let Y of U)H=H[Y];return{key:K,obj:H}}return{key:Z,obj:X}}function M2(Z,X,W,G,Q){let J=h6(Z,X,W,G,Q);return Q?.report(Q.path??[],J),J}function h6(Z,X,W,G,Q){let{operator:J,target:U,value:K,initial:H}=Z;if(!b6.has(J))throw Error(`$expression: unknown operator "${J}"`);if(v1.has(J)&&!("value"in Z)){let Y=l(U,X,W,G,r(Q,"target"));if(J==="!")return!Y;if(J==="-")return-Y}if(J==="call"){let Y=U?.$ref;if(typeof Y!=="string")throw TypeError("$expression: call target must be a $ref pointer");let q=(G?.callDepth??0)+1;if(q>X9)throw Error(`$expression: call depth exceeded (${X9})`);let B=Array.isArray(K)?K.map((F,D)=>l(F,X,W,G,r(Q,["value",D]))):[];if(Y.startsWith("window#/")){if(!J9(Y))throw Error(`$expression: "${Y}" is not a blessed pure global`);let F=Y.slice(8),D=v6[F];if(D)return D(...B);let w=m2(globalThis.window,F),A=F.lastIndexOf("/"),C=A===-1?globalThis.window:m2(globalThis.window,F.slice(0,A));return w.apply(C,B)}let M=U9(Y,X,W,G);if(typeof M==="function")return M(...B);if(M&&typeof M==="object"&&"$expression"in M){let F=M,D={};for(let[w,A]of(F.parameters??[]).entries()){let C=typeof A==="string"?A:A?.name??"";if(!C)continue;D[C]=B[w]===void 0&&typeof A==="object"&&A!==null&&"default"in A?A.default:B[w]}return M2(F.$expression,X,W,{args:D,callDepth:q})}throw TypeError(`$expression: call target "${Y}" is not callable`)}if(h1.has(J)){if(J==="?:"){let F=l(U,X,W,G,r(Q,"target"));if(Q){let D=l(K,X,W,G,r(Q,"value")),w=l(H,X,W,G,r(Q,"initial"));return F?D:w}return F?l(K,X,W,G):l(H,X,W,G)}let Y=l(U,X,W,G,r(Q,"target")),q=String(Y),B=Z.cases??{},M=Object.hasOwn(B,q);if(Q){let F;for(let[w,A]of Object.entries(B)){let C=l(A,X,W,G,r(Q,["cases",w]));if(w===q)F=C}let D=l(Z.default,X,W,G,r(Q,"default"));return M?F:D}return M?l(B[q],X,W,G):l(Z.default,X,W,G)}if(y1.has(J)){let Y=l(U,X,W,G,r(Q,"target")),q=l(K,X,W,G,r(Q,"value"));switch(J){case"+":return Y+q;case"-":return Y-q;case"*":return Y*q;case"/":return Y/q;case"%":return Y%q;case"===":return Y===q;case"!==":return Y!==q;case"<":return Y<q;case"<=":return Y<=q;case">":return Y>q;case">=":return Y>=q;case"&&":return Y&&q;case"||":return Y||q;case"??":return Y??q;default:break}}if(G9.has(J)){let Y=l(K,X,W,G,r(Q,"value")),{obj:q,key:B}=m6(U.$ref,X,W,G);switch(J){case"=":{q[B]=Y;break}case"+=":{let M=q[B];q[B]=M+Y;break}case"-=":{let M=q[B];q[B]=M-Y;break}case"*=":{let M=q[B];q[B]=M*Y;break}case"/=":{let M=q[B];q[B]=M/Y;break}default:break}return}if(Q9.has(J)){let Y=l(U,X,W,G,r(Q,"target"));switch(J){case"push":return Y.push(l(K,X,W,G,r(Q,"value")));case"unshift":return Y.unshift(l(K,X,W,G,r(Q,"value")));case"pop":return Y.pop();case"shift":return Y.shift();case"splice":{let q=l(K,X,W,G,r(Q,"value"));return Y.splice(...q)}default:break}}if(u1.has(J)){let Y=l(U,X,W,G,r(Q,"target")),q=K===void 0?[]:Array.isArray(K)?l(K,X,W,G,r(Q,"value")):[l(K,X,W,G,r(Q,"value"))],B=Y?.[J];if(typeof B!=="function")return;return B.apply(Y,q)}if(m1.has(J)){let Y=l(U,X,W,G,r(Q,"target"));if(J==="reduce"){let q=l(H,X,W,G,r(Q,"initial"));for(let[B,M]of Y.entries())q=M2(K,X,W,{acc:q,index:B,item:M},B===0?r(Q,"value"):void 0);return q}if(J==="map")return Y.map((q,B)=>M2(K,X,W,{...G,index:B,item:q},B===0?r(Q,"value"):void 0));if(J==="filter")return Y.filter((q,B)=>M2(K,X,W,{...G,index:B,item:q},B===0?r(Q,"value"):void 0))}return}function s(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return J2(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return f1(Z.$ref,X);if(Array.isArray(Z))return Z.map((W)=>s(W,X)).join(", ");return JSON.stringify(Z)}function u6(Z){return`_fx_${Z.replaceAll(/[^A-Za-z0-9_$]/g,"_")}`}function f1(Z,X){let W=X.statePrefix??"state",G=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("$args/"))return`_args${Z.slice(6).split("/").map((J)=>`[${JSON.stringify(J)}]`).join("")}`;if(Z.startsWith("event#/")){let Q=Z.slice(7);return`${G}.${Q.replaceAll("/",".")}`}if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q;if(J==="item")return Q.length>2?`_item.${Q.slice(2).join(".")}`:"_item";if(J==="index")return"_index";return`_${J}`}if(Z.startsWith("#/state/")){let Q=Z.slice(8);return`${W}.${Q.replaceAll("/",".")}`}if(Z.startsWith("parent#/"))return`${W}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replaceAll("/",".")}`;return`${W}.${Z}`}function z9(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return f1(Z.$ref,X);return s(Z,X)}function f6(Z,X){let W=(G)=>X[G]??"undefined";switch(Z){case"Intl/formatNumber":return`new Intl.NumberFormat(${W(1)}, ${W(2)}).format(${W(0)})`;case"Intl/formatDate":return`new Intl.DateTimeFormat(${W(1)}, ${W(2)}).format(new Date(${W(0)}))`;case"Intl/formatRelativeTime":return`new Intl.RelativeTimeFormat(${W(2)}, ${W(3)}).format(${W(0)}, ${W(1)})`;default:return null}}function J2(Z,X={}){let{operator:W,target:G,value:Q,initial:J}=Z;if(v1.has(W)&&!("value"in Z)){let U=s(G,X);if(W==="!")return`!(${U})`;if(W==="-")return`-(${U})`}if(W==="call"){let U=G?.$ref??"",K=Array.isArray(Q)?Q.map((H)=>s(H,X)):[];if(U.startsWith("window#/")){if(!J9(U))throw Error(`$expression: "${U}" is not a blessed pure global`);let H=f6(U.slice(8),K);if(H)return H;return`window.${U.slice(8).replaceAll("/",".")}(${K.join(", ")})`}if(U.startsWith("#/state/")){let H=U.slice(8),Y=X.formulaParams?.[H];if(Y){let q=Y.map((B,M)=>`${JSON.stringify(B)}: ${K[M]??"undefined"}`).join(", ");return`${u6(H)}(${X.statePrefix??"state"}, { ${q} })`}}return`${f1(U,X)}(${K.join(", ")})`}if(h1.has(W)){if(W==="?:"){let Y=s(G,X),q=s(Q,X),B=s(J,X);return`(${Y} ? ${q} : ${B})`}let U=s(G,X),K=Object.entries(Z.cases??{}).map(([Y,q])=>`_d === ${JSON.stringify(Y)} ? ${s(q,X)} : `).join(""),H="default"in Z?s(Z.default,X):"undefined";return`((_d) => ${K}${H})(String(${U}))`}if(y1.has(W)){let U=s(G,X),K=s(Q,X);return`(${U} ${W} ${K})`}if(G9.has(W)){let U=z9(G,X),K=s(Q,X);return`${U} ${W} ${K}`}if(Q9.has(W)){let U=z9(G,X);switch(W){case"push":return`${U}.push(${s(Q,X)})`;case"unshift":return`${U}.unshift(${s(Q,X)})`;case"pop":return`${U}.pop()`;case"shift":return`${U}.shift()`;case"splice":{let K=Array.isArray(Q)?Q.map((H)=>s(H,X)).join(", "):s(Q,X);return`${U}.splice(${K})`}default:break}}if(u1.has(W)){let U=s(G,X),K=Q===void 0?"":Array.isArray(Q)?Q.map((H)=>s(H,X)).join(", "):s(Q,X);return`(${U})?.${W}?.(${K})`}if(m1.has(W)){let U=s(G,X),K=J2(Q,X);if(W==="reduce"){let H=s(J,X);return`${U}.reduce((_acc, _item, _index) => ${K}, ${H})`}if(W==="map")return`${U}.map((_item, _index) => ${K})`;if(W==="filter")return`${U}.filter((_item, _index) => ${K})`}return"undefined"}function m2(Z,X){let W=Z;for(let G of X.split(/[./]/))W=W?.[G];return W}function s0(Z,X,W,G){return l(Z,X,W,G)}function a0(Z,X={}){return s(Z,X)}var W9,v1,y1,G9,Q9,m1,h1,u1,b6,g6,v6,X9=64,y6=64;var N0=c(()=>{W9=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),v1=new Set(["!","-"]),y1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||","??"]),G9=new Set(["=","+=","-=","*=","/="]),Q9=new Set(["push","pop","shift","unshift","splice"]),m1=new Set(["reduce","map","filter"]),h1=new Set(["?:","switch"]),u1=new Set(["includes","indexOf","lastIndexOf","join","slice","concat","at","flat","toSorted","toReversed","toSpliced","with","toUpperCase","toLowerCase","trim","trimStart","trimEnd","split","startsWith","endsWith","padStart","padEnd","replaceAll","repeat","charAt","normalize","toLocaleUpperCase","toLocaleLowerCase","toFixed","toPrecision","toLocaleString"]),b6=new Set([...W9,...v1,...y1,...m1,...h1,...u1,"call"]),g6=new Set(["isNaN","isFinite","parseFloat","parseInt","encodeURIComponent","decodeURIComponent","structuredClone","Math/abs","Math/ceil","Math/floor","Math/round","Math/trunc","Math/sign","Math/sqrt","Math/cbrt","Math/pow","Math/exp","Math/log","Math/log2","Math/log10","Math/min","Math/max","Math/hypot","Number/isInteger","Number/isFinite","Number/isNaN","Number/parseFloat","Number/parseInt","JSON/parse","JSON/stringify","Object/keys","Object/values","Object/entries","Object/fromEntries","Array/from","Array/isArray","Array/of","String/fromCharCode","String/fromCodePoint","Intl/formatNumber","Intl/formatDate","Intl/formatRelativeTime"]),v6={"Intl/formatDate":(Z,X,W)=>new Intl.DateTimeFormat(X,W).format(new Date(Z)),"Intl/formatNumber":(Z,X,W)=>new Intl.NumberFormat(X,W).format(Z),"Intl/formatRelativeTime":(Z,X,W,G)=>new Intl.RelativeTimeFormat(W,G).format(Z,X)}});function F2(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function T2(Z){return F2(Z)&&typeof Z.$ref==="string"}function j2(Z){return F2(Z)&&Z.$prototype==="Function"}function L2(Z){return F2(Z)&&F2(Z.$expression)}function Z0(Z){return L2(Z)&&Array.isArray(Z.parameters)&&Z.parameters.length>0}function C2(Z){return j2(Z)&&Array.isArray(Z.body)}function j0(Z){return F2(Z)&&typeof Z.$prototype==="string"&&Z.$prototype!=="Function"}function c1(Z){return F2(Z)&&Z.timing==="server"&&typeof Z.$src==="string"&&typeof Z.$export==="string"&&!Z.$prototype}function Y9(Z){return F2(Z)&&!Z.$prototype&&!Z.$expression&&"default"in Z}function i2(Z){if(!F2(Z))return!1;for(let X of Object.keys(Z))if(!K9.has(X))return!1;return!0}function K2(Z){return F2(Z)&&Z.$prototype==="Array"}function d1(Z){if(K2(Z))return!0;return Array.isArray(Z)&&Z.some((X)=>K2(X))}function V9(Z){return F2(Z)&&Z.$prototype==="Class"}function n(Z){return typeof Z==="string"&&Z.includes("${")}function n2(Z){if(!Z)return[];return Z.map((X)=>typeof X==="string"?X:X.name)}var K9;var o2=c(()=>{K9=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"])});function q9(Z){if("operator"in Z)return"expression";if("if"in Z)return"if";if("$switch"in Z)return"switch";return"dispatch"}async function V0(Z,X,W,G={}){let Q=G.args?{args:G.args}:void 0;for(let J of Z)switch(q9(J)){case"expression":{let U=M2(J,X,W,Q);if(U&&typeof U.then==="function")await U;break}case"if":{let U=J,K=s0(U.if,X,W,Q)?U.then:U.else;if(Array.isArray(K))await V0(K,X,W,G);break}case"switch":{let U=J,K=String(s0(U.$switch,X,W,Q)),H=U.cases??{},Y=Object.hasOwn(H,K)?H[K]:U.default;if(Array.isArray(Y))await V0(Y,X,W,G);break}case"dispatch":{let U=J,K=G.target??W?.currentTarget;if(!K)break;let H={};if("detail"in U)H.detail=s0(U.detail,X,W,Q);if(U.bubbles!==void 0)H.bubbles=U.bubbles;if(U.composed!==void 0)H.composed=U.composed;K.dispatchEvent(new CustomEvent(U.dispatchEvent,H));break}default:break}}function A2(Z,X={}){let W=X.indent??"",G=[];for(let Q of Z)switch(q9(Q)){case"expression":{G.push(`${W}${J2(Q,X)};`);break}case"if":{let J=Q,U=a0(J.if,X),K={...X,indent:`${W} `};if(G.push(`${W}if (${U}) {`,A2(J.then??[],K)),J.else)G.push(`${W}} else {`,A2(J.else,K));G.push(`${W}}`);break}case"switch":{let J=Q,U=a0(J.$switch,X),K={...X,indent:`${W} `};G.push(`${W}switch (String(${U})) {`);for(let[H,Y]of Object.entries(J.cases??{}))G.push(`${W} case ${JSON.stringify(H)}: {`,A2(Y,K),`${W} break;`,`${W} }`);if(J.default)G.push(`${W} default: {`,A2(J.default,K),`${W} }`);G.push(`${W}}`);break}case"dispatch":{let J=Q,U=X.eventParam??"event",K=X.dispatchTarget??`(${U} && ${U}.currentTarget)`,H=[];if("detail"in J)H.push(`detail: ${a0(J.detail,X)}`);if(J.bubbles!==void 0)H.push(`bubbles: ${JSON.stringify(J.bubbles)}`);if(J.composed!==void 0)H.push(`composed: ${JSON.stringify(J.composed)}`);let Y=H.length>0?`, { ${H.join(", ")} }`:"";G.push(`${W}${K}?.dispatchEvent(new CustomEvent(${JSON.stringify(J.dispatchEvent)}${Y}));`);break}default:break}return G.join(`
|
|
2
|
-
`)}var t0=c(()=>{N0()});function
|
|
1
|
+
import{createRequire as b6}from"node:module";var N6=Object.create;var{getPrototypeOf:j6,defineProperty:b1,getOwnPropertyNames:C6}=Object;var R6=Object.prototype.hasOwnProperty;function P6(Z){return this[Z]}var x6,E6,O7=(Z,X,W)=>{var G=Z!=null&&typeof Z==="object";if(G){var Q=X?x6??=new WeakMap:E6??=new WeakMap,J=Q.get(Z);if(J)return J}W=Z!=null?N6(j6(Z)):{};let U=X||!Z||!Z.__esModule?b1(W,"default",{value:Z,enumerable:!0}):W;for(let K of C6(Z))if(!R6.call(U,K))b1(U,K,{get:P6.bind(Z,K),enumerable:!0});if(G)Q.set(Z,U);return U};var T7=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var S6=(Z)=>Z;function k6(Z,X){this[Z]=S6.bind(null,X)}var X9=(Z,X)=>{for(var W in X)b1(Z,W,{get:X[W],enumerable:!0,configurable:!0,set:k6.bind(X,W)})};var c=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var y2=b6(import.meta.url);function g1(Z){let X=Z.$map;return X&&typeof X==="object"?X:void 0}function U9(Z){return Z.startsWith("window#/")&&v6.has(Z.slice(8))}function l2(Z){return G9.has(Z)}function r(Z,X){if(!Z)return;let W=(Z.depth??0)+1;if(W>m6)return;return{depth:W,path:[...Z.path??[],...Array.isArray(X)?X:[X]],report:Z.report}}function l(Z,X,W,G,Q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return M2(Z,X,W,G,Q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z){let J=Y9(Z.$ref,X,W,G);return Q?.report(Q.path??[],J),J}if(Array.isArray(Z))return Z.map((J,U)=>l(J,X,W,G,r(Q,U)));return Q?.report(Q.path??[],Z),Z}function Y9(Z,X,W,G){if(Z==="$reduce/acc")return G?.acc;if(Z.startsWith("$reduce/"))return G?.acc;if(Z.startsWith("$args/")){let Q=Z.slice(6).split("/"),J=G?.args?.[Q[0]];return Q.length>1?m2(J,Q.slice(1).join("/")):J}if(Z.startsWith("event#/")){let Q=Z.slice(7);return m2(W,Q)}if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q,U,K=g1(X);if(J==="item")U=G?.item??K?.item??X["$map/item"];else if(J==="index")U=G?.index??K?.index??X["$map/index"];else U=K?.[J]??X[`$map/${J}`];return Q.length>2?m2(U,Q.slice(2).join("/")):U}if(Z.startsWith("#/state/")){let Q=Z.slice(8),J=Q.indexOf("/");if(J===-1)return X[Q];return m2(X[Q.slice(0,J)],Q.slice(J+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return m2(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return m2(globalThis.document,Z.slice(10));return X[Z]??null}function h6(Z,X,W,G){if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q,U,K=g1(X);if(J==="item")U=G?.item??K?.item??X["$map/item"];else if(J==="index")U=G?.index??K?.index??X["$map/index"];else U=K?.[J]??X[`$map/${J}`];if(Q.length>2){let H=Q.slice(2),Y=H.pop(),q=H.length>0?m2(U,H.join("/")):U;return{key:Y,obj:q}}return{key:J==="item"?"$map/item":"$map/index",obj:g1(X)??X}}if(Z.startsWith("#/state/")){let Q=Z.slice(8);if(Q.indexOf("/")===-1)return{key:Q,obj:X};let U=Q.split("/"),K=U.pop(),H=X;for(let Y of U)H=H[Y];return{key:K,obj:H}}return{key:Z,obj:X}}function M2(Z,X,W,G,Q){let J=u6(Z,X,W,G,Q);return Q?.report(Q.path??[],J),J}function u6(Z,X,W,G,Q){let{operator:J,target:U,value:K,initial:H}=Z;if(!g6.has(J))throw Error(`$expression: unknown operator "${J}"`);if(v1.has(J)&&!("value"in Z)){let Y=l(U,X,W,G,r(Q,"target"));if(J==="!")return!Y;if(J==="-")return-Y}if(J==="call"){let Y=U?.$ref;if(typeof Y!=="string")throw TypeError("$expression: call target must be a $ref pointer");let q=(G?.callDepth??0)+1;if(q>z9)throw Error(`$expression: call depth exceeded (${z9})`);let B=Array.isArray(K)?K.map((F,D)=>l(F,X,W,G,r(Q,["value",D]))):[];if(Y.startsWith("window#/")){if(!U9(Y))throw Error(`$expression: "${Y}" is not a blessed pure global`);let F=Y.slice(8),D=y6[F];if(D)return D(...B);let w=m2(globalThis.window,F),A=F.lastIndexOf("/"),C=A===-1?globalThis.window:m2(globalThis.window,F.slice(0,A));return w.apply(C,B)}let M=Y9(Y,X,W,G);if(typeof M==="function")return M(...B);if(M&&typeof M==="object"&&"$expression"in M){let F=M,D={};for(let[w,A]of(F.parameters??[]).entries()){let C=typeof A==="string"?A:A?.name??"";if(!C)continue;D[C]=B[w]===void 0&&typeof A==="object"&&A!==null&&"default"in A?A.default:B[w]}return M2(F.$expression,X,W,{args:D,callDepth:q})}throw TypeError(`$expression: call target "${Y}" is not callable`)}if(h1.has(J)){if(J==="?:"){let F=l(U,X,W,G,r(Q,"target"));if(Q){let D=l(K,X,W,G,r(Q,"value")),w=l(H,X,W,G,r(Q,"initial"));return F?D:w}return F?l(K,X,W,G):l(H,X,W,G)}let Y=l(U,X,W,G,r(Q,"target")),q=String(Y),B=Z.cases??{},M=Object.hasOwn(B,q);if(Q){let F;for(let[w,A]of Object.entries(B)){let C=l(A,X,W,G,r(Q,["cases",w]));if(w===q)F=C}let D=l(Z.default,X,W,G,r(Q,"default"));return M?F:D}return M?l(B[q],X,W,G):l(Z.default,X,W,G)}if(y1.has(J)){let Y=l(U,X,W,G,r(Q,"target")),q=l(K,X,W,G,r(Q,"value"));switch(J){case"+":return Y+q;case"-":return Y-q;case"*":return Y*q;case"/":return Y/q;case"%":return Y%q;case"===":return Y===q;case"!==":return Y!==q;case"<":return Y<q;case"<=":return Y<=q;case">":return Y>q;case">=":return Y>=q;case"&&":return Y&&q;case"||":return Y||q;case"??":return Y??q;default:break}}if(Q9.has(J)){let Y=l(K,X,W,G,r(Q,"value")),{obj:q,key:B}=h6(U.$ref,X,W,G);switch(J){case"=":{q[B]=Y;break}case"+=":{let M=q[B];q[B]=M+Y;break}case"-=":{let M=q[B];q[B]=M-Y;break}case"*=":{let M=q[B];q[B]=M*Y;break}case"/=":{let M=q[B];q[B]=M/Y;break}default:break}return}if(J9.has(J)){let Y=l(U,X,W,G,r(Q,"target"));switch(J){case"push":return Y.push(l(K,X,W,G,r(Q,"value")));case"unshift":return Y.unshift(l(K,X,W,G,r(Q,"value")));case"pop":return Y.pop();case"shift":return Y.shift();case"splice":{let q=l(K,X,W,G,r(Q,"value"));return Y.splice(...q)}default:break}}if(u1.has(J)){let Y=l(U,X,W,G,r(Q,"target")),q=K===void 0?[]:Array.isArray(K)?l(K,X,W,G,r(Q,"value")):[l(K,X,W,G,r(Q,"value"))],B=Y?.[J];if(typeof B!=="function")return;return B.apply(Y,q)}if(m1.has(J)){let Y=l(U,X,W,G,r(Q,"target"));if(J==="reduce"){let q=l(H,X,W,G,r(Q,"initial"));for(let[B,M]of Y.entries())q=M2(K,X,W,{acc:q,index:B,item:M},B===0?r(Q,"value"):void 0);return q}if(J==="map")return Y.map((q,B)=>M2(K,X,W,{...G,index:B,item:q},B===0?r(Q,"value"):void 0));if(J==="filter")return Y.filter((q,B)=>M2(K,X,W,{...G,index:B,item:q},B===0?r(Q,"value"):void 0))}return}function s(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return J2(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return f1(Z.$ref,X);if(Array.isArray(Z))return Z.map((W)=>s(W,X)).join(", ");return JSON.stringify(Z)}function f6(Z){return`_fx_${Z.replaceAll(/[^A-Za-z0-9_$]/g,"_")}`}function f1(Z,X){let W=X.statePrefix??"state",G=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("$args/"))return`_args${Z.slice(6).split("/").map((J)=>`[${JSON.stringify(J)}]`).join("")}`;if(Z.startsWith("event#/")){let Q=Z.slice(7);return`${G}.${Q.replaceAll("/",".")}`}if(Z.startsWith("$map/")){let Q=Z.split("/"),[,J]=Q;if(J==="item")return Q.length>2?`_item.${Q.slice(2).join(".")}`:"_item";if(J==="index")return"_index";return`_${J}`}if(Z.startsWith("#/state/")){let Q=Z.slice(8);return`${W}.${Q.replaceAll("/",".")}`}if(Z.startsWith("parent#/"))return`${W}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replaceAll("/",".")}`;return`${W}.${Z}`}function W9(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return f1(Z.$ref,X);return s(Z,X)}function c6(Z,X){let W=(G)=>X[G]??"undefined";switch(Z){case"Intl/formatNumber":return`new Intl.NumberFormat(${W(1)}, ${W(2)}).format(${W(0)})`;case"Intl/formatDate":return`new Intl.DateTimeFormat(${W(1)}, ${W(2)}).format(new Date(${W(0)}))`;case"Intl/formatRelativeTime":return`new Intl.RelativeTimeFormat(${W(2)}, ${W(3)}).format(${W(0)}, ${W(1)})`;default:return null}}function J2(Z,X={}){let{operator:W,target:G,value:Q,initial:J}=Z;if(v1.has(W)&&!("value"in Z)){let U=s(G,X);if(W==="!")return`!(${U})`;if(W==="-")return`-(${U})`}if(W==="call"){let U=G?.$ref??"",K=Array.isArray(Q)?Q.map((H)=>s(H,X)):[];if(U.startsWith("window#/")){if(!U9(U))throw Error(`$expression: "${U}" is not a blessed pure global`);let H=c6(U.slice(8),K);if(H)return H;return`window.${U.slice(8).replaceAll("/",".")}(${K.join(", ")})`}if(U.startsWith("#/state/")){let H=U.slice(8),Y=X.formulaParams?.[H];if(Y){let q=Y.map((B,M)=>`${JSON.stringify(B)}: ${K[M]??"undefined"}`).join(", ");return`${f6(H)}(${X.statePrefix??"state"}, { ${q} })`}}return`${f1(U,X)}(${K.join(", ")})`}if(h1.has(W)){if(W==="?:"){let Y=s(G,X),q=s(Q,X),B=s(J,X);return`(${Y} ? ${q} : ${B})`}let U=s(G,X),K=Object.entries(Z.cases??{}).map(([Y,q])=>`_d === ${JSON.stringify(Y)} ? ${s(q,X)} : `).join(""),H="default"in Z?s(Z.default,X):"undefined";return`((_d) => ${K}${H})(String(${U}))`}if(y1.has(W)){let U=s(G,X),K=s(Q,X);return`(${U} ${W} ${K})`}if(Q9.has(W)){let U=W9(G,X),K=s(Q,X);return`${U} ${W} ${K}`}if(J9.has(W)){let U=W9(G,X);switch(W){case"push":return`${U}.push(${s(Q,X)})`;case"unshift":return`${U}.unshift(${s(Q,X)})`;case"pop":return`${U}.pop()`;case"shift":return`${U}.shift()`;case"splice":{let K=Array.isArray(Q)?Q.map((H)=>s(H,X)).join(", "):s(Q,X);return`${U}.splice(${K})`}default:break}}if(u1.has(W)){let U=s(G,X),K=Q===void 0?"":Array.isArray(Q)?Q.map((H)=>s(H,X)).join(", "):s(Q,X);return`(${U})?.${W}?.(${K})`}if(m1.has(W)){let U=s(G,X),K=J2(Q,X);if(W==="reduce"){let H=s(J,X);return`${U}.reduce((_acc, _item, _index) => ${K}, ${H})`}if(W==="map")return`${U}.map((_item, _index) => ${K})`;if(W==="filter")return`${U}.filter((_item, _index) => ${K})`}return"undefined"}function m2(Z,X){let W=Z;for(let G of X.split(/[./]/))W=W?.[G];return W}function s0(Z,X,W,G){return l(Z,X,W,G)}function a0(Z,X={}){return s(Z,X)}var G9,v1,y1,Q9,J9,m1,h1,u1,g6,v6,y6,z9=64,m6=64;var N0=c(()=>{G9=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),v1=new Set(["!","-"]),y1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||","??"]),Q9=new Set(["=","+=","-=","*=","/="]),J9=new Set(["push","pop","shift","unshift","splice"]),m1=new Set(["reduce","map","filter"]),h1=new Set(["?:","switch"]),u1=new Set(["includes","indexOf","lastIndexOf","join","slice","concat","at","flat","toSorted","toReversed","toSpliced","with","toUpperCase","toLowerCase","trim","trimStart","trimEnd","split","startsWith","endsWith","padStart","padEnd","replaceAll","repeat","charAt","normalize","toLocaleUpperCase","toLocaleLowerCase","toFixed","toPrecision","toLocaleString"]),g6=new Set([...G9,...v1,...y1,...m1,...h1,...u1,"call"]),v6=new Set(["isNaN","isFinite","parseFloat","parseInt","encodeURIComponent","decodeURIComponent","structuredClone","Math/abs","Math/ceil","Math/floor","Math/round","Math/trunc","Math/sign","Math/sqrt","Math/cbrt","Math/pow","Math/exp","Math/log","Math/log2","Math/log10","Math/min","Math/max","Math/hypot","Number/isInteger","Number/isFinite","Number/isNaN","Number/parseFloat","Number/parseInt","JSON/parse","JSON/stringify","Object/keys","Object/values","Object/entries","Object/fromEntries","Array/from","Array/isArray","Array/of","String/fromCharCode","String/fromCodePoint","Intl/formatNumber","Intl/formatDate","Intl/formatRelativeTime"]),y6={"Intl/formatDate":(Z,X,W)=>new Intl.DateTimeFormat(X,W).format(new Date(Z)),"Intl/formatNumber":(Z,X,W)=>new Intl.NumberFormat(X,W).format(Z),"Intl/formatRelativeTime":(Z,X,W,G)=>new Intl.RelativeTimeFormat(W,G).format(Z,X)}});function F2(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function T2(Z){return F2(Z)&&typeof Z.$ref==="string"}function j2(Z){return F2(Z)&&Z.$prototype==="Function"}function L2(Z){return F2(Z)&&F2(Z.$expression)}function Z0(Z){return L2(Z)&&Array.isArray(Z.parameters)&&Z.parameters.length>0}function C2(Z){return j2(Z)&&Array.isArray(Z.body)}function j0(Z){return F2(Z)&&typeof Z.$prototype==="string"&&Z.$prototype!=="Function"}function c1(Z){return F2(Z)&&Z.timing==="server"&&typeof Z.$src==="string"&&typeof Z.$export==="string"&&!Z.$prototype}function K9(Z){return F2(Z)&&!Z.$prototype&&!Z.$expression&&"default"in Z}function i2(Z){if(!F2(Z))return!1;for(let X of Object.keys(Z))if(!V9.has(X))return!1;return!0}function K2(Z){return F2(Z)&&Z.$prototype==="Array"}function d1(Z){if(K2(Z))return!0;return Array.isArray(Z)&&Z.some((X)=>K2(X))}function q9(Z){return F2(Z)&&Z.$prototype==="Class"}function i(Z){return typeof Z==="string"&&Z.includes("${")}function p1(Z){return/\breturn\b/.test(Z)}function n2(Z){if(!Z)return[];return Z.map((X)=>typeof X==="string"?X:X.name)}var V9;var o2=c(()=>{V9=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"])});function H9(Z){if("operator"in Z)return"expression";if("if"in Z)return"if";if("$switch"in Z)return"switch";return"dispatch"}async function V0(Z,X,W,G={}){let Q=G.args?{args:G.args}:void 0;for(let J of Z)switch(H9(J)){case"expression":{let U=M2(J,X,W,Q);if(U&&typeof U.then==="function")await U;break}case"if":{let U=J,K=s0(U.if,X,W,Q)?U.then:U.else;if(Array.isArray(K))await V0(K,X,W,G);break}case"switch":{let U=J,K=String(s0(U.$switch,X,W,Q)),H=U.cases??{},Y=Object.hasOwn(H,K)?H[K]:U.default;if(Array.isArray(Y))await V0(Y,X,W,G);break}case"dispatch":{let U=J,K=G.target??W?.currentTarget;if(!K)break;let H={};if("detail"in U)H.detail=s0(U.detail,X,W,Q);if(U.bubbles!==void 0)H.bubbles=U.bubbles;if(U.composed!==void 0)H.composed=U.composed;K.dispatchEvent(new CustomEvent(U.dispatchEvent,H));break}default:break}}function A2(Z,X={}){let W=X.indent??"",G=[];for(let Q of Z)switch(H9(Q)){case"expression":{G.push(`${W}${J2(Q,X)};`);break}case"if":{let J=Q,U=a0(J.if,X),K={...X,indent:`${W} `};if(G.push(`${W}if (${U}) {`,A2(J.then??[],K)),J.else)G.push(`${W}} else {`,A2(J.else,K));G.push(`${W}}`);break}case"switch":{let J=Q,U=a0(J.$switch,X),K={...X,indent:`${W} `};G.push(`${W}switch (String(${U})) {`);for(let[H,Y]of Object.entries(J.cases??{}))G.push(`${W} case ${JSON.stringify(H)}: {`,A2(Y,K),`${W} break;`,`${W} }`);if(J.default)G.push(`${W} default: {`,A2(J.default,K),`${W} }`);G.push(`${W}}`);break}case"dispatch":{let J=Q,U=X.eventParam??"event",K=X.dispatchTarget??`(${U} && ${U}.currentTarget)`,H=[];if("detail"in J)H.push(`detail: ${a0(J.detail,X)}`);if(J.bubbles!==void 0)H.push(`bubbles: ${JSON.stringify(J.bubbles)}`);if(J.composed!==void 0)H.push(`composed: ${JSON.stringify(J.composed)}`);let Y=H.length>0?`, { ${H.join(", ")} }`:"";G.push(`${W}${K}?.dispatchEvent(new CustomEvent(${JSON.stringify(J.dispatchEvent)}${Y}));`);break}default:break}return G.join(`
|
|
2
|
+
`)}var t0=c(()=>{N0()});function i6(Z){if(!d6||!Z.includes("v"))return Z;return Z.replace(p6,(X,W,G)=>`${W}${l6[G.toLowerCase()]??`cq${G}`}`)}function n6(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function V2(Z){return Z.replaceAll(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function I2(Z){return Object.entries(Z).filter(([X,W])=>!n6(X)&&(W===null||typeof W!=="object")).map(([X,W])=>`${V2(X)}: ${i6(String(W))}`).join("; ")}function s2(Z){return/^\(\s*prefers-color-scheme\s*:\s*(light|dark)\s*\)$/.exec(Z.trim())?.[1]??null}function i1(Z,X){if(Z===":root"||Z==="html")return{auto:`${Z}:where(:not([${h2}]))`,forced:`${Z}:where([${h2}="${X}"])`};return{auto:`:where(:root:not([${h2}])) ${Z}`,forced:`:where(:root[${h2}="${X}"]) ${Z}`}}var d6=!1,p6,l6,r2,h2="data-color-scheme",l1="jx-color-scheme";var C0=c(()=>{N0();o2();t0();p6=/(-?\d*\.?\d+)(?:s|l|d)?v(h|w|min|max|i|b)\b/gi,l6={b:"cqb",h:"cqh",i:"cqi",max:"cqmax",min:"cqmin",w:"cqw"};r2=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"])});function R0(Z,X){let W=[];for(let[G,Q]of(Z.parameters??[]).entries()){let J=typeof Q==="string"?Q:Q?.name??"";if(!J)continue;let K=typeof Q==="object"&&Q!==null&&"default"in Q?`_a[${G}] === undefined ? ${JSON.stringify(Q.default)} : _a[${G}]`:`_a[${G}]`;W.push(`${JSON.stringify(J)}: ${K}`)}return`(..._a) => { const _args = { ${W.join(", ")} }; return ${X}; }`}function W1(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,W]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(W&&typeof W==="object"&&!Array.isArray(W)&&W.timing==="compiler")continue;if(typeof W!=="object"||W===null||Array.isArray(W))return!0;if(W.$prototype)return!0;if("default"in W)return!0;if(i2(W))continue;return!0}if(Z.$switch)return!0;if(K2(Z)||d1(Z.children))return!0;if(Array.isArray(Z.children)&&Z.children.some((X)=>W1(X)))return!0;for(let[X,W]of Object.entries(Z)){if(r2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function M9(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(K2(Z)||d1(Z.children))return!0;for(let[X,W]of Object.entries(Z)){if(r2.has(X))continue;if(W!==null&&typeof W==="object"&&typeof W.$ref==="string")return!0;if(i(W))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(i(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(i(X))return!0}return!1}function B0(Z,X=null,W={},G={}){let Q=Z?.state?F9(Z.state,X):X??Object.create(null);return{media:G,scope:Q,scopeDefs:W}}function F9(Z={},X=null){let W=Object.create(X??null);for(let[G,Q]of Object.entries(Z)){if(typeof Q!=="object"||Q===null||Array.isArray(Q)){u2(W,G,e0(Q));continue}let J=Q;if("default"in J){u2(W,G,e0(J.default));continue}if(!J.$prototype&&!("$expression"in J)&&!i2(J))u2(W,G,e0(J))}for(let[G,Q]of Object.entries(Z)){if(typeof Q==="string"&&i(Q)){n1(W,G,()=>r1(Q,W));continue}if(!Q||typeof Q!=="object")continue;if(L2(Q)){let J=Q.$expression;if(Z0(Q)){let U=Q.parameters;u2(W,G,(...K)=>{let H={};for(let[Y,q]of U.entries()){let B=typeof q==="string"?q:q?.name??"";if(!B)continue;H[B]=K[Y]===void 0&&typeof q==="object"&&q!==null&&"default"in q?q.default:K[Y]}return M2(J,W,null,{args:H})})}else if(l2(J.operator))u2(W,G,(U,K)=>M2(J,U,K));else n1(W,G,()=>M2(J,W,null));continue}if(j2(Q)){if(C2(Q)){let{body:J}=Q;u2(W,G,(U,K)=>{V0(J,U??W,K??null)})}else if(typeof Q.body==="string"){let J=Q.parameters?n2(Q.parameters):Q.arguments??[],{body:U}=Q,K=Function("state",...J,U);if(p1(U))n1(W,G,()=>K(W));else u2(W,G,K)}else u2(W,G,()=>{});continue}if(j0(Q)&&(Q.$prototype==="LocalStorage"||Q.$prototype==="SessionStorage"))u2(W,G,e0(Q.default??null))}return W}function u2(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,value:W,writable:!0})}function n1(Z,X,W){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,get:W})}function z2(Z,X){if(_2(Z))return o6(Z.$ref,X);if(i(Z))return r1(Z,X);return Z}function _2(Z){return T2(Z)}function o6(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let W=Z.split("/"),G=W[1],Q=X.$map?.[G]??X[`$map/${G}`];return W.length>2?B9(Q,W.slice(2).join("/")):Q}if(Z.startsWith("#/state/")){let W=Z.slice(8),G=W.indexOf("/");if(G===-1)return X[W];return B9(X[W.slice(0,G)],W.slice(G+1))}return X[Z]??null}function r1(Z,X){try{let W=Z.match(/^\$\{(.+)\}$/s);if(W)return Function("state","$map",`return (${W[1]})`)(X,X?.$map);return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}catch{return null}}function B9(Z,X){if(!X)return Z;let W=Z;for(let G of X.split("/"))W=W==null?void 0:W[G];return W}function e0(Z){if(Z===null||typeof Z!=="object")return Z;return structuredClone(Z)}function q0(Z,X){let W="",G=z2(Z.id,X),Q=z2(Z.className,X),J=z2(Z.hidden,X),U=z2(Z.tabIndex,X),K=z2(Z.title,X),H=z2(Z.lang,X),Y=z2(Z.dir,X);if(G)W+=` id="${p(String(G))}"`;if(Q)W+=` class="${p(String(Q))}"`;if(J)W+=" hidden";if(U!==void 0&&U!==null)W+=` tabindex="${p(String(U))}"`;if(K)W+=` title="${p(String(K))}"`;if(H)W+=` lang="${p(String(H))}"`;if(Y)W+=` dir="${p(String(Y))}"`;if(Z.style&&X){let q=Object.entries(Z.style).filter(([B,M])=>!B.startsWith(":")&&!B.startsWith(".")&&!B.startsWith("&")&&!B.startsWith("[")&&!B.startsWith("@")&&M!==null&&typeof M!=="object"&&typeof M==="string"&&i(M)).map(([B,M])=>{let F=z2(M,X);return F==null?null:`${V2(B)}: ${F}`}).filter(Boolean).join("; ");if(q)W+=` style="${q}"`}if(Z.attributes)for(let[q,B]of Object.entries(Z.attributes)){let M=z2(B,X);if(M!==null&&M!==void 0&&(typeof M==="string"||typeof M==="number"||typeof M==="boolean"))W+=` ${q}="${p(String(M))}"`}if(Z.tagName==="img"){if(!Z.attributes?.loading)W+=' loading="lazy"';if(!Z.attributes?.decoding)W+=' decoding="async"'}if(Z.$static)W+=" data-jx-static";else if(Z.$prerendered)W+=" data-jx-prerendered";return W}function G1(){let Z=JSON.stringify(l1),X=JSON.stringify(h2);return`(function(){try{var s=localStorage.getItem(${Z});if(s==="light"||s==="dark"){document.documentElement.setAttribute(${X},s)}}catch(e){}})()`}function $9(Z,X,W){let G=Z.startsWith("@--")?X[Z.slice(1)]??Z.slice(1):Z.startsWith("@(")?Z.slice(1):null,Q=G===null?Z:`@media ${G}`,J=G===null?null:s2(G);return(U,K)=>{if(!K)return;if(J){let{auto:H,forced:Y}=i1(U,J);W.push(`${Q} { ${H} { ${K} } }`,`${Y} { ${K} }`)}else W.push(`${Q} { ${U} { ${K} } }`)}}function Q1(Z,X,W,G,Q){if(Q===null||typeof Q!=="object"||Array.isArray(Q))return;let J=$9(X,W,Z);J(G,I2(Q));for(let[U,K]of Object.entries(Q)){if(K===null||typeof K!=="object"||Array.isArray(K))continue;if(U.startsWith("@"))continue;let H=U.startsWith("&")?U.replace("&",G):U.startsWith(":")||U.startsWith(".")||U.startsWith("[")?`${G}${U}`:`${G} ${U}`;J(H,I2(K))}}function M0(Z,X={},W=null){let G=[];if(W&&typeof W==="object"){let J=(q,B)=>{let M=I2(B);if(M)G.push(`${q} { ${M} }`);for(let[F,D]of Object.entries(B)){if(D===null||typeof D!=="object"||Array.isArray(D))continue;if(F.startsWith("@")){Q1(G,F,X,q,D);continue}let w=F.startsWith("&")?F.replace("&",q):F.startsWith(":")||F.startsWith(".")||F.startsWith("[")?`${q}${F}`:`${q} ${F}`;J(w,D)}},U={},K={};for(let[q,B]of Object.entries(W)){if(q.startsWith(":")||q.startsWith(".")||q.startsWith("[")||q.startsWith("@"))continue;if(B!==null&&typeof B==="object"&&!Array.isArray(B))continue;if(q.startsWith("--"))U[q]=B;else K[q]=B}let H=I2(U);if(H)G.push(`:root { ${H} }`);let Y=I2(K);if(Y)G.push(`body { ${Y} }`);for(let[q,B]of Object.entries(W))if(q.startsWith(":")||q.startsWith(".")||q.startsWith("["))J(q,B);else if(B!==null&&typeof B==="object"&&!Array.isArray(B)&&!q.startsWith("@")&&!q.startsWith("--"))J(q,B);else if(q.startsWith("@")&&B!==null&&typeof B==="object"&&!Array.isArray(B)){let M=$9(q,X,G),F={},D={},w=[];for(let[A,C]of Object.entries(B)){if(C!==null&&typeof C==="object"&&!Array.isArray(C)){if(!A.startsWith("@"))w.push([A,C]);continue}if(A.startsWith("--"))F[A]=C;else D[A]=C}M(":root",I2(F)),M("body",I2(D));for(let[A,C]of w)M(A,I2(C))}}if(Object.values(X).some((J)=>s2(J)!==null)&&!(W&&typeof W==="object"&&("colorScheme"in W)))G.push(":root { color-scheme: light dark }",`:root:where([${h2}="light"]) { color-scheme: light }`,`:root:where([${h2}="dark"]) { color-scheme: dark }`);if(H0(Z,G,X,"",{n:0}),G.length===0)return"";return`<style>
|
|
3
3
|
${G.join(`
|
|
4
4
|
`)}
|
|
5
|
-
</style>`}function
|
|
5
|
+
</style>`}function D9(Z,X,W,G){let Q=I2(X);if(Q)W.push(`${Z} { ${Q} }`);for(let[J,U]of Object.entries(X)){if(U===null||typeof U!=="object"||Array.isArray(U))continue;if(J.startsWith("@")){Q1(W,J,G,Z,U);continue}let K=J.startsWith("&")?J.replace("&",Z):J.startsWith(":")||J.startsWith(".")||J.startsWith("[")?`${Z}${J}`:`${Z} ${J}`;D9(K,U,W,G)}}function H0(Z,X,W,G="",Q,J="jx"){let U=Q??{n:0};if(!Z||typeof Z!=="object")return;if(Z.style&&!Z.id&&!Z.className)Z.className=`${J}-${U.n}`,U.n+=1;let K=Z.id?`#${Z.id}`:Z.className?`.${Z.className.split(" ")[0]}`:Z.tagName??"*";if(Z.style){let H=[];for(let[Y,q]of Object.entries(Z.style)){if(Y.startsWith(":")||Y.startsWith(".")||Y.startsWith("&")||Y.startsWith("[")||Y.startsWith("@"))continue;if(q===null||typeof q==="object")continue;if(typeof q==="string"&&i(q))continue;H.push(` ${V2(Y)}: ${q};`)}if(H.length>0)X.push(`${K} {
|
|
6
6
|
${H.join(`
|
|
7
7
|
`)}
|
|
8
|
-
}`);for(let[Y,q]of Object.entries(Z.style)){if(q===null||typeof q!=="object"||Array.isArray(q))continue;if(Y.startsWith("@"))Q1(X,Y,W,K,q);else{let B=Y.startsWith("&")?Y.replace("&",K):Y.startsWith(":")||Y.startsWith(".")||Y.startsWith("[")?`${K}${Y}`:`${K} ${Y}
|
|
9
|
-
`);if(!Z||typeof Z!=="object")return"";if(Z.$prototype==="Array")return"";if(Z.$switch){let U=Z.tagName??"div",K=q0(Z,X),H=z2(Z.$switch,X),Y=H==null?void 0:Z.cases?.[String(H)],q=Y!==void 0&&!_2(Y)?Z1(Y,X,W):"";return`<${U}${K}>${q}</${U}>`}let G=Z.tagName??"div";if(G==="slot"&&W!=null)return W;let Q=q0(Z,X);if(
|
|
10
|
-
`);return`<${G}${Q}>${J}</${G}>`}function
|
|
11
|
-
`)}function
|
|
8
|
+
}`);for(let[Y,q]of Object.entries(Z.style)){if(q===null||typeof q!=="object"||Array.isArray(q))continue;if(Y.startsWith("@"))Q1(X,Y,W,K,q);else{let B=Y.startsWith("&")?Y.replace("&",K):Y.startsWith(":")||Y.startsWith(".")||Y.startsWith("[")?`${K}${Y}`:`${K} ${Y}`;D9(B,q,X,W)}}}if(Array.isArray(Z.children))for(let H of Z.children)H0(H,X,W,K,U,J);if(Z.cases&&typeof Z.cases==="object")for(let H of Object.values(Z.cases))H0(H,X,W,K,U,J)}function p(Z){return String(Z).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function J1(Z){return Z.split("-").map((X)=>X.charAt(0).toUpperCase()+X.slice(1)).join("")}function L9(Z){let X=new Map;return A9(Z,X),[...X.values()]}function A9(Z,X){if(!Z||typeof Z!=="object")return;if(Z.state){for(let[W,G]of Object.entries(Z.state))if(c1(G))X.set(G.$export,{exportName:G.$export,key:W,src:G.$src})}if(Array.isArray(Z.children))for(let W of Z.children)A9(W,X)}function Z1(Z,X,W=null){if(typeof Z==="string"){if(i(Z)&&X){let U=r1(Z,X);return U!=null?p(String(U)):p(Z)}return p(Z)}if(typeof Z==="number"||typeof Z==="boolean")return p(String(Z));if(Array.isArray(Z))return Z.map((U)=>Z1(U,X,W)).join(`
|
|
9
|
+
`);if(!Z||typeof Z!=="object")return"";if(Z.$prototype==="Array")return"";if(Z.$switch){let U=Z.tagName??"div",K=q0(Z,X),H=z2(Z.$switch,X),Y=H==null?void 0:Z.cases?.[String(H)],q=Y!==void 0&&!_2(Y)?Z1(Y,X,W):"";return`<${U}${K}>${q}</${U}>`}let G=Z.tagName??"div";if(G==="slot"&&W!=null)return W;let Q=q0(Z,X);if(s1.has(G))return`<${G}${Q}>`;let J="";if(Z.textContent!==void 0){let U=z2(Z.textContent,X);J=U!=null?p(String(U)):""}else if(Z.innerHTML){let U=z2(Z.innerHTML,X);J=U!=null?String(U):Z.innerHTML}else if(Array.isArray(Z.children))J=Z.children.map((U)=>Z1(U,X,W)).join(`
|
|
10
|
+
`);return`<${G}${Q}>${J}</${G}>`}function m7(Z,X=null,W=null){let G=Z.state??{};if(X){G={...G};for(let[J,U]of Object.entries(X))if(J in G){let K=G[J];G[J]=K&&typeof K==="object"&&!Array.isArray(K)&&"default"in K?{...K,default:U}:U}else G[J]=U}let Q=F9(G,null);if(!Array.isArray(Z.children))return"";return Z.children.map((J)=>Z1(J,Q,W)).join(`
|
|
11
|
+
`)}function h7(Z){return o1(Z)}function o1(Z){if(!Z||typeof Z!=="object")return!0;if(Array.isArray(Z))return Z.every((X)=>o1(X));if(Z.$prototype)return!1;if(Z.$ref)return!1;if(Z.state)for(let X of Object.values(Z.state)){if(!X||typeof X!=="object")continue;let W=X;if(W.$prototype)return!1;if(W.$ref)return!1}for(let X of Object.keys(Z))if(X.startsWith("on")&&X!=="observedAttributes")return!1;if(Array.isArray(Z.children))return Z.children.every((X)=>o1(X));if(Z.children&&typeof Z.children==="object"&&Z.children.$prototype)return!1;return!0}function u7(Z,X,W=null,G={}){let Q=[];if(X&&typeof X==="object"){let J=[];for(let[U,K]of Object.entries(X)){if(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")||U.startsWith("@"))continue;if(K===null||typeof K==="object")continue;if(typeof K==="string"&&i(K))continue;J.push(` ${V2(U)}: ${K};`)}if(J.length>0)Q.push(`${Z} {
|
|
12
12
|
${J.join(`
|
|
13
13
|
`)}
|
|
14
14
|
}`);for(let[U,K]of Object.entries(X))if(U.startsWith("@"))Q1(Q,U,G,Z,K);else if(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")){let H=U.startsWith("&")?U.replace("&",Z):`${Z}${U}`;Q.push(`${H} { ${I2(K)} }`)}}if(W&&Array.isArray(W.children)){let J={n:0};for(let U of W.children)H0(U,Q,G,"",J,Z)}return Q.length>0?`${Q.join(`
|
|
15
15
|
`)}
|
|
16
|
-
`:""}var X1="https://esm.sh/@vue/reactivity@3.5.32",z1="https://esm.sh/lit-html@3.3.0",r1;var X0=c(()=>{C0();N0();t0();o2();C0();N0();t0();o2();r1=new Set(["input","br","hr","img","meta","link","area","col","source"])});function f2(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var o6,x0=()=>o6;var A9=c(()=>{o6=/^win/.test(globalThis.process?globalThis.process.platform:"")});function e(Z,X){let W=new URL(f2(Z),"https://aaa.nonexistanturl.com"),G=new URL(f2(X),W),Q=X.match(/(\s*)$/)?.[1]||"";if(G.hostname==="aaa.nonexistanturl.com"){let{pathname:U,search:K,hash:H}=G;return U+K+decodeURIComponent(H)+Q}let J=G.toString()+Q;if(J.includes("#")){let[U,K]=J.split("#",2);return U+"#"+decodeURIComponent(K||"")}return J}function z0(){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 w9(Z){let X=s6.exec(Z||"");if(X)return X[1].toLowerCase();return}function O9(Z){let X=Z.lastIndexOf(".");if(X>=0)return zZ(Z.substring(X).toLowerCase());return""}function zZ(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function R2(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function Z2(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function T9(Z){let X=w9(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function U1(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;try{let W=new URL(X.startsWith("//")?"http:"+X:X);if(_9(W.hostname))return!0;let G=W.port;if(G&&YZ(parseInt(G)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;if(UZ(X))return!0}return!1}function _9(Z){let X=WZ(Z);if(!X)return!0;if(X==="localhost"||XZ.some((Q)=>X.endsWith(Q)))return!0;let W=N9(X);if(W)return j9(W);let G=GZ(X);if(G)return QZ(G);return!1}function WZ(Z){let X=Z.trim().toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);while(X.endsWith("."))X=X.slice(0,-1);return X}function N9(Z){let X=Z.split(".");if(X.length!==4)return;let W=X.map((G)=>{if(!/^\d+$/.test(G))return Number.NaN;return Number(G)});if(W.some((G)=>!Number.isInteger(G)||G<0||G>255))return;return W}function j9([Z,X,W,G]){return Z===0||Z===10||Z===127||Z===100&&X>=64&&X<=127||Z===169&&X===254||Z===172&&X>=16&&X<=31||Z===192&&X===0&&W===0||Z===192&&X===168||Z===198&&(X===18||X===19)||Z>=224||Z===255&&X===255&&W===255&&G===255}function GZ(Z){if(!Z.includes(":"))return;let X=Z,W=X.lastIndexOf(":"),G=X.slice(W+1);if(G.includes(".")){let H=N9(G);if(!H)return;let Y=H[0]*256+H[1],q=H[2]*256+H[3];X=`${X.slice(0,W+1)}${Y.toString(16)}:${q.toString(16)}`}let Q=X.split("::");if(Q.length>2)return;let J=I9(Q[0]),U=Q.length===2?I9(Q[1]):[];if(!J||!U)return;if(Q.length===1)return J.length===8?J:void 0;let K=8-J.length-U.length;if(K<1)return;return[...J,...Array(K).fill(0),...U]}function I9(Z){if(!Z)return[];let X=Z.split(":").map((W)=>{if(!/^[\da-f]{1,4}$/i.test(W))return Number.NaN;return Number.parseInt(W,16)});if(X.some((W)=>!Number.isInteger(W)||W<0||W>65535))return;return X}function QZ(Z){if(Z.length!==8)return!1;let X=Z.every((K)=>K===0),W=Z.slice(0,7).every((K)=>K===0)&&Z[7]===1,G=(Z[0]&65024)===64512,Q=(Z[0]&65472)===65152,J=(Z[0]&65280)===65280;if(X||W||G||Q||J)return!0;let U=JZ(Z);return U?j9(U):!1}function JZ(Z){let X=Z.slice(0,5).every((Q)=>Q===0),W=X&&Z[5]===0,G=X&&Z[5]===65535;if(!W&&!G)return;return[Math.floor(Z[6]/256),Z[6]%256,Math.floor(Z[7]/256),Z[7]%256]}function UZ(Z){return Z.split(/[\s/?#]+/).map((W)=>W.replace(/^[a-z][\d+.a-z-]*:\/\//i,"").replace(/:\d+$/,"")).filter(Boolean).some((W)=>_9(W))}function YZ(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 Y1(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=w9(Z);return X===void 0||X==="file"}function C9(Z){if(x0()){let X=z0(),W=Z.toUpperCase(),Q=f2(X).toUpperCase(),J=W.includes(Q),U=W.includes(Q),K=e6.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(J||U||K)&&!X.startsWith("http"))Z=((Y,q)=>{if(Y.endsWith("/")||Y.endsWith("\\"))return Y+q;else return Y+"/"+q})(X,Z);Z=f2(Z)}Z=encodeURI(Z);for(let X of ZZ)Z=Z.replace(X[0],X[1]);return Z}function $0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let G=0;G<s1.length;G+=2)Z=Z.replace(s1[G],s1[G+1]);let W=Z.toLowerCase().startsWith("file://");if(W){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),x0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else W=!1,Z=x0()?Z:"/"+Z}if(x0()&&!W){if(Z=Z.replace(r6,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function K1(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(a6,"/").replace(t6,"~")})}var r6,s6,a6,t6,e6,ZZ,s1,XZ,F0=(Z)=>new URL(Z);var q2=c(()=>{A9();r6=/\//g,s6=/^(\w{2,}):\/\//i,a6=/~1/g,t6=/~0/g,e6=/^[a-zA-Z]:[\\/]/,ZZ=[[/\?/g,"%3F"],[/#/g,"%23"]],s1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],XZ=[".localhost",".local",".internal",".intranet",".corp",".home",".lan"]});function R9(){let Z={},X=this;for(let W of HZ(X))if(typeof W==="string"){let G=X[W],Q=typeof G;if(!KZ.includes(Q))Z[W]=G}return Z}function HZ(Z,X=[]){let W=[];while(Z&&Z!==qZ)W=W.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let G=new Set(W);for(let Q of X.concat(VZ))G.delete(Q);return G}function x2(Z){return Z instanceof $2||Z instanceof D0}function t1(Z){if(Z.path===null)Z.path=[];return Z}var KZ,VZ,qZ,$2,D0,w2,V1,N2,q1,H1,a1,L0;var O2=c(()=>{q2();KZ=["function","symbol","undefined"],VZ=["constructor","prototype","__proto__"],qZ=Object.getPrototypeOf({});$2=class $2 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=R9.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};D0=class D0 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 '${$0(Z.$refs._root$Ref.path)}'`}toJSON=R9.bind(this);static getParserErrors(Z){let X=[];for(let W of Object.values(Z.$refs._$refs))if(W.errors)X.push(...W.errors);return X}get errors(){return D0.getParserErrors(this.files)}};w2=class w2 extends $2{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};V1=class V1 extends $2{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};N2=class N2 extends $2{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)}};q1=class q1 extends $2{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};H1=class H1 extends $2{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,W,G,Q){super(`Missing $ref pointer "${R2(X)}". Token "${Z}" does not exist.`,Z2(X));this.targetToken=Z,this.targetRef=W,this.targetFound=G,this.parentPath=Q}};a1=class a1 extends $2{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};L0=class L0 extends $2{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,Z2(X))}}});function U2(Z,X){let W=BZ(X);return W?e(Z,W):Z}function B1(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 W=Z.openapi;return typeof W==="string"&&/^3\.1(?:\.|$)/.test(W)}function M1(Z,X,W,G,Q=!1){if(!Q)return;let J=new Set,U=(K,H)=>{if(!K||typeof K!=="object"||ArrayBuffer.isView(K)||J.has(K))return;J.add(K);let Y=U2(H,K);if(Y!==H)Z._addAlias(Y,K,G,Q);for(let q of Object.keys(K))U(K[q],Y)};U(W,X)}function BZ(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var W0=c(()=>{q2()});class G0{$ref;path;originalPath;scopeBase;value;circular;chainCircular;indirections;constructor(Z,X,W){this.$ref=Z,this.path=X,this.originalPath=W||X,this.scopeBase=Z.path||Z2(X),this.value=void 0,this.circular=!1,this.chainCircular=!1,this.indirections=0}resolve(Z,X,W,G=new Set,Q=!0){let J=G0.parse(this.path,this.originalPath),U=[];if(this.value=x9(Z),this.$ref.dynamicIdScope&&!E9(this.$ref))this.scopeBase=U2(this.scopeBase,this.value);for(let H=0;H<J.length;H++){let Y=this.circular,q=this.chainCircular,B=a.isExtended$Ref(this.value);if(F1(this,X,W,G))this.path=G0.join(this.path,J.slice(H));else if(B)this.circular=Y,this.chainCircular=q;let M=J[H];if(this.value[M]===void 0||this.value[M]===null&&H===J.length-1){let F=!1;for(let E=J.length-1;E>H;E--){let y=J.slice(H,E+1).join("/");if(this.value[y]!==void 0){this.value=this.value[y],H=E,F=!0;break}}if(F){this.chainCircular=q;continue}if(M in this.value&&this.value[M]===null){this.value=$1,this.chainCircular=q;continue}this.value=null;let D=this.$ref.path||"",w=this.path.replace(D,""),A=G0.join("",U),C=W?.replace(D,"");throw new H1(M,decodeURI(this.originalPath),w,A,C)}else this.value=this.value[M];if(this.chainCircular=q,U.push(M),this.$ref.dynamicIdScope)this.scopeBase=U2(this.scopeBase,this.value)}let K=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(Q){let H=this.value?.$ref?e(K,this.value.$ref):void 0,Y=typeof W==="string"?e(this.$ref.$refs._root$Ref.path,W):W;if(a.isAllowed$Ref(this.value,X)&&H===Y&&H!==this.path)this.chainCircular=!0;else if(!this.value||H)F1(this,X,W,G)}return this}set(Z,X,W){let G=G0.parse(this.path),Q;if(G.length===0)return this.value=X,X;if(AZ(this.path,G),this.value=x9(Z),this.$ref.dynamicIdScope&&!E9(this.$ref))this.scopeBase=U2(this.scopeBase,this.value);for(let J=0;J<G.length-1;J++){if(F1(this,W),Q=G[J],this.value&&this.value[Q]!==void 0)this.value=this.value[Q];else this.value=P9(this,Q,{});if(this.$ref.dynamicIdScope)this.scopeBase=U2(this.scopeBase,this.value)}return F1(this,W),Q=G[G.length-1],P9(this,Q,X),Z}static parse(Z,X){let W=R2(Z).substring(1);if(!W)return[];let G=W.split("/");for(let Q=0;Q<G.length;Q++)G[Q]=G[Q].replace($Z,"/").replace(DZ,"~");if(G[0]!=="")throw new L0(W,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 W=0;W<X.length;W++){let G=X[W];Z+="/"+G.replace(FZ,"~0").replace(MZ,"~1")}return Z}}function F1(Z,X,W,G=new Set){let Q=!1,J=W,U=[];try{while(a.isAllowed$Ref(Z.value,X)){let K=a.isExtended$Ref(Z.value),H=Z.value,Y=Z.path,q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,B=e(q,Z.value.$ref);if(B===Z.path&&!IZ(J))return Z.circular=!0,Z.chainCircular=!0,Q;let M=typeof J==="string"?e(Z.$ref.$refs._root$Ref.path,J):J;if(B===M&&B!==Z.path)return Z.chainCircular=!0,Q;if(G.has(B))return Z.chainCircular=!0,Q;let F=X?.dereference?.maxDepth??500;if(G.size>=F)throw RangeError(`Maximum dereference depth (${F}) exceeded at ${Z.path}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);G.add(B),U.push(B);let D=Z.$ref.$refs._resolve(B,Y,X,G,K);if(D===null)return Q;if(Z.indirections+=D.indirections+1,Z.chainCircular||=D.circular||D.chainCircular,K){if(Z.chainCircular)return Q;return Z.value=a.dereference(H,D.value,X),Q}else Z.$ref=D.$ref,Z.path=D.path,Z.value=D.value,Z.scopeBase=D.scopeBase,J=Y,Q=!0}return Q}finally{for(let K of U)G.delete(K)}}function P9(Z,X,W){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(W);else Z.value[X]=W;else throw new $2(`Error assigning $ref pointer "${Z.path}".
|
|
17
|
-
Cannot set "${X}" of a non-object.`);return W}function
|
|
18
|
-
Unsafe JSON Pointer token "${W}" cannot be used for assignment.`)}function
|
|
16
|
+
`:""}var X1="https://esm.sh/@vue/reactivity@3.5.40",z1="https://esm.sh/lit-html@3.3.0",s1;var X0=c(()=>{C0();N0();t0();o2();C0();N0();t0();o2();s1=new Set(["input","br","hr","img","meta","link","area","col","source"])});function f2(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var r6,x0=()=>r6;var I9=c(()=>{r6=/^win/.test(globalThis.process?globalThis.process.platform:"")});function e(Z,X){let W=new URL(f2(Z),"https://aaa.nonexistanturl.com"),G=new URL(f2(X),W),Q=X.match(/(\s*)$/)?.[1]||"";if(G.hostname==="aaa.nonexistanturl.com"){let{pathname:U,search:K,hash:H}=G;return U+K+decodeURIComponent(H)+Q}let J=G.toString()+Q;if(J.includes("#")){let[U,K]=J.split("#",2);return U+"#"+decodeURIComponent(K||"")}return J}function z0(){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 O9(Z){let X=a6.exec(Z||"");if(X)return X[1].toLowerCase();return}function T9(Z){let X=Z.lastIndexOf(".");if(X>=0)return WZ(Z.substring(X).toLowerCase());return""}function WZ(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function R2(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function Z2(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function _9(Z){let X=O9(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function U1(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;try{let W=new URL(X.startsWith("//")?"http:"+X:X);if(N9(W.hostname))return!0;let G=W.port;if(G&&KZ(parseInt(G)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;if(YZ(X))return!0}return!1}function N9(Z){let X=GZ(Z);if(!X)return!0;if(X==="localhost"||zZ.some((Q)=>X.endsWith(Q)))return!0;let W=j9(X);if(W)return C9(W);let G=QZ(X);if(G)return JZ(G);return!1}function GZ(Z){let X=Z.trim().toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);while(X.endsWith("."))X=X.slice(0,-1);return X}function j9(Z){let X=Z.split(".");if(X.length!==4)return;let W=X.map((G)=>{if(!/^\d+$/.test(G))return Number.NaN;return Number(G)});if(W.some((G)=>!Number.isInteger(G)||G<0||G>255))return;return W}function C9([Z,X,W,G]){return Z===0||Z===10||Z===127||Z===100&&X>=64&&X<=127||Z===169&&X===254||Z===172&&X>=16&&X<=31||Z===192&&X===0&&W===0||Z===192&&X===168||Z===198&&(X===18||X===19)||Z>=224||Z===255&&X===255&&W===255&&G===255}function QZ(Z){if(!Z.includes(":"))return;let X=Z,W=X.lastIndexOf(":"),G=X.slice(W+1);if(G.includes(".")){let H=j9(G);if(!H)return;let Y=H[0]*256+H[1],q=H[2]*256+H[3];X=`${X.slice(0,W+1)}${Y.toString(16)}:${q.toString(16)}`}let Q=X.split("::");if(Q.length>2)return;let J=w9(Q[0]),U=Q.length===2?w9(Q[1]):[];if(!J||!U)return;if(Q.length===1)return J.length===8?J:void 0;let K=8-J.length-U.length;if(K<1)return;return[...J,...Array(K).fill(0),...U]}function w9(Z){if(!Z)return[];let X=Z.split(":").map((W)=>{if(!/^[\da-f]{1,4}$/i.test(W))return Number.NaN;return Number.parseInt(W,16)});if(X.some((W)=>!Number.isInteger(W)||W<0||W>65535))return;return X}function JZ(Z){if(Z.length!==8)return!1;let X=Z.every((K)=>K===0),W=Z.slice(0,7).every((K)=>K===0)&&Z[7]===1,G=(Z[0]&65024)===64512,Q=(Z[0]&65472)===65152,J=(Z[0]&65280)===65280;if(X||W||G||Q||J)return!0;let U=UZ(Z);return U?C9(U):!1}function UZ(Z){let X=Z.slice(0,5).every((Q)=>Q===0),W=X&&Z[5]===0,G=X&&Z[5]===65535;if(!W&&!G)return;return[Math.floor(Z[6]/256),Z[6]%256,Math.floor(Z[7]/256),Z[7]%256]}function YZ(Z){return Z.split(/[\s/?#]+/).map((W)=>W.replace(/^[a-z][\d+.a-z-]*:\/\//i,"").replace(/:\d+$/,"")).filter(Boolean).some((W)=>N9(W))}function KZ(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 Y1(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=O9(Z);return X===void 0||X==="file"}function R9(Z){if(x0()){let X=z0(),W=Z.toUpperCase(),Q=f2(X).toUpperCase(),J=W.includes(Q),U=W.includes(Q),K=ZZ.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(J||U||K)&&!X.startsWith("http"))Z=((Y,q)=>{if(Y.endsWith("/")||Y.endsWith("\\"))return Y+q;else return Y+"/"+q})(X,Z);Z=f2(Z)}Z=encodeURI(Z);for(let X of XZ)Z=Z.replace(X[0],X[1]);return Z}function $0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let G=0;G<a1.length;G+=2)Z=Z.replace(a1[G],a1[G+1]);let W=Z.toLowerCase().startsWith("file://");if(W){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),x0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else W=!1,Z=x0()?Z:"/"+Z}if(x0()&&!W){if(Z=Z.replace(s6,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function K1(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(t6,"/").replace(e6,"~")})}var s6,a6,t6,e6,ZZ,XZ,a1,zZ,F0=(Z)=>new URL(Z);var q2=c(()=>{I9();s6=/\//g,a6=/^(\w{2,}):\/\//i,t6=/~1/g,e6=/~0/g,ZZ=/^[a-zA-Z]:[\\/]/,XZ=[[/\?/g,"%3F"],[/#/g,"%23"]],a1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],zZ=[".localhost",".local",".internal",".intranet",".corp",".home",".lan"]});function P9(){let Z={},X=this;for(let W of BZ(X))if(typeof W==="string"){let G=X[W],Q=typeof G;if(!VZ.includes(Q))Z[W]=G}return Z}function BZ(Z,X=[]){let W=[];while(Z&&Z!==HZ)W=W.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let G=new Set(W);for(let Q of X.concat(qZ))G.delete(Q);return G}function x2(Z){return Z instanceof $2||Z instanceof D0}function e1(Z){if(Z.path===null)Z.path=[];return Z}var VZ,qZ,HZ,$2,D0,w2,V1,N2,q1,H1,t1,L0;var O2=c(()=>{q2();VZ=["function","symbol","undefined"],qZ=["constructor","prototype","__proto__"],HZ=Object.getPrototypeOf({});$2=class $2 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=P9.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};D0=class D0 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 '${$0(Z.$refs._root$Ref.path)}'`}toJSON=P9.bind(this);static getParserErrors(Z){let X=[];for(let W of Object.values(Z.$refs._$refs))if(W.errors)X.push(...W.errors);return X}get errors(){return D0.getParserErrors(this.files)}};w2=class w2 extends $2{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};V1=class V1 extends $2{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};N2=class N2 extends $2{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)}};q1=class q1 extends $2{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};H1=class H1 extends $2{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,W,G,Q){super(`Missing $ref pointer "${R2(X)}". Token "${Z}" does not exist.`,Z2(X));this.targetToken=Z,this.targetRef=W,this.targetFound=G,this.parentPath=Q}};t1=class t1 extends $2{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};L0=class L0 extends $2{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,Z2(X))}}});function U2(Z,X){let W=MZ(X);return W?e(Z,W):Z}function B1(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 W=Z.openapi;return typeof W==="string"&&/^3\.1(?:\.|$)/.test(W)}function M1(Z,X,W,G,Q=!1){if(!Q)return;let J=new Set,U=(K,H)=>{if(!K||typeof K!=="object"||ArrayBuffer.isView(K)||J.has(K))return;J.add(K);let Y=U2(H,K);if(Y!==H)Z._addAlias(Y,K,G,Q);for(let q of Object.keys(K))U(K[q],Y)};U(W,X)}function MZ(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var W0=c(()=>{q2()});class G0{$ref;path;originalPath;scopeBase;value;circular;chainCircular;indirections;constructor(Z,X,W){this.$ref=Z,this.path=X,this.originalPath=W||X,this.scopeBase=Z.path||Z2(X),this.value=void 0,this.circular=!1,this.chainCircular=!1,this.indirections=0}resolve(Z,X,W,G=new Set,Q=!0){let J=G0.parse(this.path,this.originalPath),U=[];if(this.value=E9(Z),this.$ref.dynamicIdScope&&!S9(this.$ref))this.scopeBase=U2(this.scopeBase,this.value);for(let H=0;H<J.length;H++){let Y=this.circular,q=this.chainCircular,B=a.isExtended$Ref(this.value);if(F1(this,X,W,G))this.path=G0.join(this.path,J.slice(H));else if(B)this.circular=Y,this.chainCircular=q;let M=J[H];if(this.value[M]===void 0||this.value[M]===null&&H===J.length-1){let F=!1;for(let E=J.length-1;E>H;E--){let y=J.slice(H,E+1).join("/");if(this.value[y]!==void 0){this.value=this.value[y],H=E,F=!0;break}}if(F){this.chainCircular=q;continue}if(M in this.value&&this.value[M]===null){this.value=$1,this.chainCircular=q;continue}this.value=null;let D=this.$ref.path||"",w=this.path.replace(D,""),A=G0.join("",U),C=W?.replace(D,"");throw new H1(M,decodeURI(this.originalPath),w,A,C)}else this.value=this.value[M];if(this.chainCircular=q,U.push(M),this.$ref.dynamicIdScope)this.scopeBase=U2(this.scopeBase,this.value)}let K=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(Q){let H=this.value?.$ref?e(K,this.value.$ref):void 0,Y=typeof W==="string"?e(this.$ref.$refs._root$Ref.path,W):W;if(a.isAllowed$Ref(this.value,X)&&H===Y&&H!==this.path)this.chainCircular=!0;else if(!this.value||H)F1(this,X,W,G)}return this}set(Z,X,W){let G=G0.parse(this.path),Q;if(G.length===0)return this.value=X,X;if(IZ(this.path,G),this.value=E9(Z),this.$ref.dynamicIdScope&&!S9(this.$ref))this.scopeBase=U2(this.scopeBase,this.value);for(let J=0;J<G.length-1;J++){if(F1(this,W),Q=G[J],this.value&&this.value[Q]!==void 0)this.value=this.value[Q];else this.value=x9(this,Q,{});if(this.$ref.dynamicIdScope)this.scopeBase=U2(this.scopeBase,this.value)}return F1(this,W),Q=G[G.length-1],x9(this,Q,X),Z}static parse(Z,X){let W=R2(Z).substring(1);if(!W)return[];let G=W.split("/");for(let Q=0;Q<G.length;Q++)G[Q]=G[Q].replace(DZ,"/").replace(LZ,"~");if(G[0]!=="")throw new L0(W,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 W=0;W<X.length;W++){let G=X[W];Z+="/"+G.replace($Z,"~0").replace(FZ,"~1")}return Z}}function F1(Z,X,W,G=new Set){let Q=!1,J=W,U=[];try{while(a.isAllowed$Ref(Z.value,X)){let K=a.isExtended$Ref(Z.value),H=Z.value,Y=Z.path,q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,B=e(q,Z.value.$ref);if(B===Z.path&&!wZ(J))return Z.circular=!0,Z.chainCircular=!0,Q;let M=typeof J==="string"?e(Z.$ref.$refs._root$Ref.path,J):J;if(B===M&&B!==Z.path)return Z.chainCircular=!0,Q;if(G.has(B))return Z.chainCircular=!0,Q;let F=X?.dereference?.maxDepth??500;if(G.size>=F)throw RangeError(`Maximum dereference depth (${F}) exceeded at ${Z.path}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);G.add(B),U.push(B);let D=Z.$ref.$refs._resolve(B,Y,X,G,K);if(D===null)return Q;if(Z.indirections+=D.indirections+1,Z.chainCircular||=D.circular||D.chainCircular,K){if(Z.chainCircular)return Q;return Z.value=a.dereference(H,D.value,X),Q}else Z.$ref=D.$ref,Z.path=D.path,Z.value=D.value,Z.scopeBase=D.scopeBase,J=Y,Q=!0}return Q}finally{for(let K of U)G.delete(K)}}function x9(Z,X,W){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(W);else Z.value[X]=W;else throw new $2(`Error assigning $ref pointer "${Z.path}".
|
|
17
|
+
Cannot set "${X}" of a non-object.`);return W}function IZ(Z,X){for(let W of X)if(AZ.has(W))throw new $2(`Error assigning $ref pointer "${Z}".
|
|
18
|
+
Unsafe JSON Pointer token "${W}" cannot be used for assignment.`)}function E9(Z){if(x2(Z))throw Z;return Z}function wZ(Z){return typeof Z=="string"&&G0.parse(Z).length==0}function S9(Z){return Boolean(Z.path&&Z.path in Z.$refs._aliases)}var $1,FZ,$Z,DZ,LZ,AZ,H2;var E0=c(()=>{A0();q2();O2();W0();$1=Symbol("null"),FZ=/\//g,$Z=/~/g,DZ=/~1/g,LZ=/~0/g,AZ=new Set(["__proto__","constructor","prototype"]);H2=G0});class S0{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:W})=>W);if("errors"in Z&&Array.isArray(Z.errors))this.errors.push(...Z.errors.map(e1).filter(({footprint:W})=>!X.includes(W)));else if(!("footprint"in Z)||!X.includes(Z.footprint))this.errors.push(e1(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,W,G,Q,J=!0){let U=new H2(this,Z,W);try{let K=U.resolve(this.value,X,G,Q,J);if(K.value===$1)K.value=null;return K}catch(K){if(!X||!X.continueOnError||!x2(K))throw K;if(K.path===null)K.path=K1(R2(G));if(K instanceof L0)K.source=decodeURI(Z2(G));return this.addError(K),null}}set(Z,X){let W=new H2(this,Z);if(this.value=W.set(this.value,X),this.value===$1)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 S0.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 S0.is$Ref(Z)&&Object.keys(Z).length>1}static dereference(Z,X,W){if(X&&typeof X==="object"&&S0.isExtended$Ref(Z)){let G={};for(let J of Object.keys(Z))if(J!=="$ref")G[J]=Z[J];let Q=W?.dereference?.mergeKeys??!0;for(let J of Object.keys(X)){let U=J;if(!(U in G))G[U]=X[U];else if(Q&&typeof G[U]==="object"&&G[U]!==null&&typeof X[U]==="object"&&X[U]!==null)G[U]=k9(X[U],G[U])}return G}else return X}}function k9(Z,X){if(typeof Z!=="object"||Z===null)return X;if(typeof X!=="object"||X===null)return X;let W=Array.isArray(Z)?[...Z]:{...Z};for(let G of Object.keys(X))if(Array.isArray(X[G]))W[G]=[...X[G]];else if(typeof X[G]==="object"&&X[G]!==null)W[G]=k9(Z[G],X[G]);else W[G]=X[G];return W}var a;var A0=c(()=>{E0();O2();q2();a=S0});class k0{circular;paths(...Z){return b9(this._$refs,Z.flat()).map((W)=>{return f2(W.decoded)})}values(...Z){let X=this._$refs;return b9(X,Z.flat()).reduce((G,Q)=>{return G[f2(Q.decoded)]=X[Q.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 W=e(this._root$Ref.path,Z),G=this._getRef(W);if(!G)throw Error(`Error resolving $ref pointer "${Z}".
|
|
19
19
|
"${Z2(W)}" not found.`);G.set(W,X)}_get$Ref(Z){return Z=e(this._root$Ref.path,Z),this._getRef(Z)}_add(Z){let X=Z2(Z),W=new a(this);return W.path=X,this._$refs[X]=W,this._root$Ref=this._root$Ref||W,W}_addAlias(Z,X,W,G=!1){let Q=Z2(Z);if(!Q||this._$refs[Q]||this._aliases[Q])return this._$refs[Q]||this._aliases[Q];let J=new a(this);return J.path=Q,J.pathType=W,J.value=X,J.dynamicIdScope=G,this._aliases[Q]=J,J}_resolve(Z,X,W,G,Q=!0){let J=e(this._root$Ref.path,Z),U=this._getRef(J);if(!U)throw Error(`Error resolving $ref pointer "${Z}".
|
|
20
|
-
"${Z2(J)}" not found.`);return U.resolve(J,W,Z,X,G,Q)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=Z2(Z);return this._$refs[X]||this._aliases[X]}}function
|
|
21
|
-
Parsed value is empty`);else return U}catch(U){if(!U&&X.continueOnError)throw new V1(Z.url);else if(U&&U.message&&U.message.startsWith("Error parsing"))throw U;else if(!U||!("error"in U))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:U});else if(U.error instanceof w2)throw U.error;else throw new w2(U.error.message,Z.url)}}function
|
|
20
|
+
"${Z2(J)}" not found.`);return U.resolve(J,W,Z,X,G,Q)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=Z2(Z);return this._$refs[X]||this._aliases[X]}}function b9(Z,X){let W=Object.keys(Z);if(X=Array.isArray(X[0])?X[0]:Array.prototype.slice.call(X),X.length>0&&X[0])W=W.filter((G)=>{return X.includes(Z[G].pathType)});return W.map((G)=>{return{encoded:G,decoded:Z[G].pathType==="file"?$0(G,!0):G}})}var g9=c(()=>{A0();q2()});function Z8(Z){return Object.keys(Z||{}).filter((X)=>{return typeof Z[X]==="object"}).map((X)=>{return Z[X].name=X,Z[X]})}function X8(Z,X,W,G,Q){return Z.filter((J)=>{return!!v9(J,X,W,G,Q)})}function z8(Z){for(let X of Z)X.order=X.order||Number.MAX_SAFE_INTEGER;return Z.sort((X,W)=>{return X.order-W.order})}async function W8(Z,X,W,G){let Q,J,U=0;return new Promise((K,H)=>{Y();function Y(){if(Q=Z[U++],!Q)return H(J);try{let F=v9(Q,X,W,q,G);if(F&&typeof F.then==="function")F.then(B,M);else if(F!==void 0)B(F);else if(U===Z.length)throw Error("No promise has been returned or callback has been called.")}catch(F){M(F)}}function q(F,D){if(F)M(F);else B(D)}function B(F){K({plugin:Q,result:F})}function M(F){J={plugin:Q,error:F},Y()}})}function v9(Z,X,W,G,Q){let J=Z[X];if(typeof J==="function")return J.apply(Z,[W,G,Q]);if(!G){if(J instanceof RegExp)return J.test(W.url);else if(typeof J==="string")return J===W.extension;else if(Array.isArray(J))return J.indexOf(W.extension)!==-1}return J}async function OZ(Z,X,W){let G=typeof Z==="string"?Z:Z.url,Q=typeof Z==="string"?void 0:Z.baseUrl,J=typeof Z==="string"?void 0:Z.reference,U=G.indexOf("#"),K="";if(U>=0)K=G.substring(U),G=G.substring(0,U);if(J){let q=J.indexOf("#");if(q>=0)J=J.substring(0,q)}let H=X._add(G),Y={url:G,hash:K,extension:T9(G),...J!==void 0?{reference:J}:{},...Q!==void 0?{baseUrl:Q}:{}};try{let q=await TZ(Y,W,X);H.pathType=q.plugin.name,Y.data=q.result;let B=await _Z(Y,W,X);return H.value=B.result,H.dynamicIdScope=B1(H.value),M1(X,H.path,H.value,H.pathType,H.dynamicIdScope),B.result}catch(q){if(x2(q))H.value=q;throw q}}async function TZ(Z,X,W){let G=Z8(X.resolve);G=X8(G,"canRead",Z,void 0,W),z8(G);try{return await W8(G,"read",Z,W)}catch(Q){if(!Q&&X.continueOnError)throw new q1(Z.url);else if(!Q||!("error"in Q))throw SyntaxError(`Unable to resolve $ref pointer "${Z.url}"`,{cause:Q});else if(Q.error instanceof N2)throw Q.error;else throw new N2(Q,Z.url)}}async function _Z(Z,X,W){let G=Z8(X.parse),Q=X8(G,"canParse",Z),J=Q.length>0?Q:G;z8(J);try{let U=await W8(J,"parse",Z,W);if(!U.plugin.allowEmpty&&NZ(U.result))throw SyntaxError(`Error parsing "${Z.url}" as ${U.plugin.name}.
|
|
21
|
+
Parsed value is empty`);else return U}catch(U){if(!U&&X.continueOnError)throw new V1(Z.url);else if(U&&U.message&&U.message.startsWith("Error parsing"))throw U;else if(!U||!("error"in U))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:U});else if(U.error instanceof w2)throw U.error;else throw new w2(U.error.message,Z.url)}}function NZ(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 D1;var G8=c(()=>{q2();W0();O2();D1=OZ});var y9;var m9=c(()=>{O2();y9={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(W){if(this.allowBOM)try{let G=X.indexOf("{");return X=X.slice(G),JSON.parse(X)}catch(G){throw new w2(G.message,Z.url)}throw new w2(W.message,Z.url)}else return X}}});function jZ(Z){return Z&&Z.__esModule&&Object.prototype.hasOwnProperty.call(Z,"default")?Z.default:Z}function b0(){if(h9)return a2;h9=1;function Z(U){return typeof U>"u"||U===null}function X(U){return typeof U==="object"&&U!==null}function W(U){if(Array.isArray(U))return U;else if(Z(U))return[];return[U]}function G(U,K){if(K){let H=Object.keys(K);for(let Y=0,q=H.length;Y<q;Y+=1){let B=H[Y];U[B]=K[B]}}return U}function Q(U,K){let H="";for(let Y=0;Y<K;Y+=1)H+=U;return H}function J(U){return U===0&&Number.NEGATIVE_INFINITY===1/U}return a2.isNothing=Z,a2.isObject=X,a2.toArray=W,a2.repeat=Q,a2.isNegativeZero=J,a2.extend=G,a2}function g0(){if(u9)return Q8;u9=1;function Z(W,G){let Q="",J=W.reason||"(unknown reason)";if(!W.mark)return J;if(W.mark.name)Q+='in "'+W.mark.name+'" ';if(Q+="("+(W.mark.line+1)+":"+(W.mark.column+1)+")",!G&&W.mark.snippet)Q+=`
|
|
22
22
|
|
|
23
|
-
`+W.mark.snippet;return J+" "+Q}function X(W,G){if(Error.call(this),this.name="YAMLException",this.reason=W,this.mark=G,this.message=Z(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return X.prototype=Object.create(Error.prototype),X.prototype.constructor=X,X.prototype.toString=function(G){return this.name+": "+Z(this,G)},
|
|
23
|
+
`+W.mark.snippet;return J+" "+Q}function X(W,G){if(Error.call(this),this.name="YAMLException",this.reason=W,this.mark=G,this.message=Z(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}return X.prototype=Object.create(Error.prototype),X.prototype.constructor=X,X.prototype.toString=function(G){return this.name+": "+Z(this,G)},Q8=X,Q8}function CZ(){if(f9)return J8;f9=1;let Z=b0();function X(Q,J,U,K,H){let Y="",q="",B=Math.floor(H/2)-1;if(K-J>B)Y=" ... ",J=K-B+Y.length;if(U-K>B)q=" ...",U=K+B-q.length;return{str:Y+Q.slice(J,U).replace(/\t/g,"→")+q,pos:K-J+Y.length}}function W(Q,J){return Z.repeat(" ",J-Q.length)+Q}function G(Q,J){if(J=Object.create(J||null),!Q.buffer)return null;if(!J.maxLength)J.maxLength=79;if(typeof J.indent!=="number")J.indent=1;if(typeof J.linesBefore!=="number")J.linesBefore=3;if(typeof J.linesAfter!=="number")J.linesAfter=2;let U=/\r?\n|\r|\0/g,K=[0],H=[],Y,q=-1;while(Y=U.exec(Q.buffer))if(H.push(Y.index),K.push(Y.index+Y[0].length),Q.position<=Y.index&&q<0)q=K.length-2;if(q<0)q=K.length-1;let B="",M=Math.min(Q.line+J.linesAfter,H.length).toString().length,F=J.maxLength-(J.indent+M+3);for(let w=1;w<=J.linesBefore;w++){if(q-w<0)break;let A=X(Q.buffer,K[q-w],H[q-w],Q.position-(K[q]-K[q-w]),F);B=Z.repeat(" ",J.indent)+W((Q.line-w+1).toString(),M)+" | "+A.str+`
|
|
24
24
|
`+B}let D=X(Q.buffer,K[q],H[q],Q.position,F);B+=Z.repeat(" ",J.indent)+W((Q.line+1).toString(),M)+" | "+D.str+`
|
|
25
25
|
`,B+=Z.repeat("-",J.indent+M+3+D.pos)+`^
|
|
26
26
|
`;for(let w=1;w<=J.linesAfter;w++){if(q+w>=H.length)break;let A=X(Q.buffer,K[q+w],H[q+w],Q.position-(K[q]-K[q+w]),F);B+=Z.repeat(" ",J.indent)+W((Q.line+w+1).toString(),M)+" | "+A.str+`
|
|
27
|
-
`}return B.replace(/\n$/,"")}return
|
|
28
|
-
\r`;function W(U){if(U===null)return!1;let K=0,H=U.length,Y=X;for(let q=0;q<H;q++){let B=Y.indexOf(U.charAt(q));if(B>64)continue;if(B<0)return!1;K+=6}return K%8===0}function G(U){let K=U.replace(/[\r\n=]/g,""),H=K.length,Y=X,q=0,B=[];for(let F=0;F<H;F++){if(F%4===0&&F)B.push(q>>16&255),B.push(q>>8&255),B.push(q&255);q=q<<6|Y.indexOf(K.charAt(F))}let M=H%4*6;if(M===0)B.push(q>>16&255),B.push(q>>8&255),B.push(q&255);else if(M===18)B.push(q>>10&255),B.push(q>>2&255);else if(M===12)B.push(q>>4&255);return new Uint8Array(B)}function Q(U){let K="",H=0,Y=U.length,q=X;for(let M=0;M<Y;M++){if(M%3===0&&M)K+=q[H>>18&63],K+=q[H>>12&63],K+=q[H>>6&63],K+=q[H&63];H=(H<<8)+U[M]}let B=Y%3;if(B===0)K+=q[H>>18&63],K+=q[H>>12&63],K+=q[H>>6&63],K+=q[H&63];else if(B===2)K+=q[H>>10&63],K+=q[H>>4&63],K+=q[H<<2&63],K+=q[64];else if(B===1)K+=q[H>>2&63],K+=q[H<<4&63],K+=q[64],K+=q[64];return K}function J(U){return Object.prototype.toString.call(U)==="[object Uint8Array]"}return
|
|
27
|
+
`}return B.replace(/\n$/,"")}return J8=G,J8}function Y2(){if(c9)return U8;c9=1;let Z=g0(),X=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],W=["scalar","sequence","mapping"];function G(J){let U={};if(J!==null)Object.keys(J).forEach(function(K){J[K].forEach(function(H){U[String(H)]=K})});return U}function Q(J,U){if(U=U||{},Object.keys(U).forEach(function(K){if(X.indexOf(K)===-1)throw new Z('Unknown option "'+K+'" is met in definition of "'+J+'" YAML type.')}),this.options=U,this.tag=J,this.kind=U.kind||null,this.resolve=U.resolve||function(){return!0},this.construct=U.construct||function(K){return K},this.instanceOf=U.instanceOf||null,this.predicate=U.predicate||null,this.represent=U.represent||null,this.representName=U.representName||null,this.defaultStyle=U.defaultStyle||null,this.multi=U.multi||!1,this.styleAliases=G(U.styleAliases||null),W.indexOf(this.kind)===-1)throw new Z('Unknown kind "'+this.kind+'" is specified for "'+J+'" YAML type.')}return U8=Q,U8}function V4(){if(d9)return Y8;d9=1;let Z=g0(),X=Y2();function W(J,U){let K=[];return J[U].forEach(function(H){let Y=K.length;K.forEach(function(q,B){if(q.tag===H.tag&&q.kind===H.kind&&q.multi===H.multi)Y=B}),K[Y]=H}),K}function G(){let J={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function U(K){if(K.multi)J.multi[K.kind].push(K),J.multi.fallback.push(K);else J[K.kind][K.tag]=J.fallback[K.tag]=K}for(let K=0,H=arguments.length;K<H;K+=1)arguments[K].forEach(U);return J}function Q(J){return this.extend(J)}return Q.prototype.extend=function(U){let K=[],H=[];if(U instanceof X)H.push(U);else if(Array.isArray(U))H=H.concat(U);else if(U&&(Array.isArray(U.implicit)||Array.isArray(U.explicit))){if(U.implicit)K=K.concat(U.implicit);if(U.explicit)H=H.concat(U.explicit)}else throw new Z("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");K.forEach(function(q){if(!(q instanceof X))throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(q.loadKind&&q.loadKind!=="scalar")throw new Z("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 Z("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),H.forEach(function(q){if(!(q instanceof X))throw new Z("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let Y=Object.create(Q.prototype);return Y.implicit=(this.implicit||[]).concat(K),Y.explicit=(this.explicit||[]).concat(H),Y.compiledImplicit=W(Y,"implicit"),Y.compiledExplicit=W(Y,"explicit"),Y.compiledTypeMap=G(Y.compiledImplicit,Y.compiledExplicit),Y},Y8=Q,Y8}function q4(){if(p9)return K8;return p9=1,K8=new(Y2())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(X){return X!==null?X:""}}),K8}function H4(){if(l9)return V8;return l9=1,V8=new(Y2())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(X){return X!==null?X:[]}}),V8}function B4(){if(i9)return q8;return i9=1,q8=new(Y2())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(X){return X!==null?X:{}}}),q8}function M4(){if(n9)return H8;return n9=1,H8=new(V4())({explicit:[q4(),H4(),B4()]}),H8}function F4(){if(o9)return B8;o9=1;let Z=Y2();function X(Q){if(Q===null)return!0;let J=Q.length;return J===1&&Q==="~"||J===4&&(Q==="null"||Q==="Null"||Q==="NULL")}function W(){return null}function G(Q){return Q===null}return B8=new Z("tag:yaml.org,2002:null",{kind:"scalar",resolve:X,construct:W,predicate:G,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),B8}function $4(){if(r9)return M8;r9=1;let Z=Y2();function X(Q){if(Q===null)return!1;let J=Q.length;return J===4&&(Q==="true"||Q==="True"||Q==="TRUE")||J===5&&(Q==="false"||Q==="False"||Q==="FALSE")}function W(Q){return Q==="true"||Q==="True"||Q==="TRUE"}function G(Q){return Object.prototype.toString.call(Q)==="[object Boolean]"}return M8=new Z("tag:yaml.org,2002:bool",{kind:"scalar",resolve:X,construct:W,predicate:G,represent:{lowercase:function(Q){return Q?"true":"false"},uppercase:function(Q){return Q?"TRUE":"FALSE"},camelcase:function(Q){return Q?"True":"False"}},defaultStyle:"lowercase"}),M8}function D4(){if(s9)return F8;s9=1;let Z=b0(),X=Y2();function W(Y){return Y>=48&&Y<=57||Y>=65&&Y<=70||Y>=97&&Y<=102}function G(Y){return Y>=48&&Y<=55}function Q(Y){return Y>=48&&Y<=57}function J(Y){if(Y===null)return!1;let q=Y.length,B=0,M=!1;if(!q)return!1;let F=Y[B];if(F==="-"||F==="+")F=Y[++B];if(F==="0"){if(B+1===q)return!0;if(F=Y[++B],F==="b"){B++;for(;B<q;B++){if(F=Y[B],F!=="0"&&F!=="1")return!1;M=!0}return M&&isFinite(U(Y))}if(F==="x"){B++;for(;B<q;B++){if(!W(Y.charCodeAt(B)))return!1;M=!0}return M&&isFinite(U(Y))}if(F==="o"){B++;for(;B<q;B++){if(!G(Y.charCodeAt(B)))return!1;M=!0}return M&&isFinite(U(Y))}}for(;B<q;B++){if(!Q(Y.charCodeAt(B)))return!1;M=!0}if(!M)return!1;return isFinite(U(Y))}function U(Y){let q=Y,B=1,M=q[0];if(M==="-"||M==="+"){if(M==="-")B=-1;q=q.slice(1),M=q[0]}if(q==="0")return 0;if(M==="0"){if(q[1]==="b")return B*parseInt(q.slice(2),2);if(q[1]==="x")return B*parseInt(q.slice(2),16);if(q[1]==="o")return B*parseInt(q.slice(2),8)}return B*parseInt(q,10)}function K(Y){return U(Y)}function H(Y){return Object.prototype.toString.call(Y)==="[object Number]"&&(Y%1===0&&!Z.isNegativeZero(Y))}return F8=new X("tag:yaml.org,2002:int",{kind:"scalar",resolve:J,construct:K,predicate:H,represent:{binary:function(Y){return Y>=0?"0b"+Y.toString(2):"-0b"+Y.toString(2).slice(1)},octal:function(Y){return Y>=0?"0o"+Y.toString(8):"-0o"+Y.toString(8).slice(1)},decimal:function(Y){return Y.toString(10)},hexadecimal:function(Y){return Y>=0?"0x"+Y.toString(16).toUpperCase():"-0x"+Y.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),F8}function L4(){if(a9)return $8;a9=1;let Z=b0(),X=Y2(),W=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),G=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Q(Y){if(Y===null)return!1;if(!W.test(Y))return!1;if(isFinite(parseFloat(Y,10)))return!0;return G.test(Y)}function J(Y){let q=Y.toLowerCase(),B=q[0]==="-"?-1:1;if("+-".indexOf(q[0])>=0)q=q.slice(1);if(q===".inf")return B===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(q===".nan")return NaN;return B*parseFloat(q,10)}let U=/^[-+]?[0-9]+e/;function K(Y,q){if(isNaN(Y))switch(q){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===Y)switch(q){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===Y)switch(q){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Z.isNegativeZero(Y))return"-0.0";let B=Y.toString(10);return U.test(B)?B.replace("e",".e"):B}function H(Y){return Object.prototype.toString.call(Y)==="[object Number]"&&(Y%1!==0||Z.isNegativeZero(Y))}return $8=new X("tag:yaml.org,2002:float",{kind:"scalar",resolve:Q,construct:J,predicate:H,represent:K,defaultStyle:"lowercase"}),$8}function A4(){if(t9)return D8;return t9=1,D8=M4().extend({implicit:[F4(),$4(),D4(),L4()]}),D8}function I4(){if(e9)return L8;return e9=1,L8=A4(),L8}function w4(){if(Z4)return A8;Z4=1;let Z=Y2(),X=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),W=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 G(U){if(U===null)return!1;if(X.exec(U)!==null)return!0;if(W.exec(U)!==null)return!0;return!1}function Q(U){let K=0,H=null,Y=X.exec(U);if(Y===null)Y=W.exec(U);if(Y===null)throw Error("Date resolve error");let q=+Y[1],B=+Y[2]-1,M=+Y[3];if(!Y[4])return new Date(Date.UTC(q,B,M));let F=+Y[4],D=+Y[5],w=+Y[6];if(Y[7]){K=Y[7].slice(0,3);while(K.length<3)K+="0";K=+K}if(Y[9]){let C=+Y[10],E=+(Y[11]||0);if(H=(C*60+E)*60000,Y[9]==="-")H=-H}let A=new Date(Date.UTC(q,B,M,F,D,w,K));if(H)A.setTime(A.getTime()-H);return A}function J(U){return U.toISOString()}return A8=new Z("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:G,construct:Q,instanceOf:Date,represent:J}),A8}function O4(){if(X4)return I8;X4=1;let Z=Y2();function X(W){return W==="<<"||W===null}return I8=new Z("tag:yaml.org,2002:merge",{kind:"scalar",resolve:X}),I8}function T4(){if(z4)return w8;z4=1;let Z=Y2(),X=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
28
|
+
\r`;function W(U){if(U===null)return!1;let K=0,H=U.length,Y=X;for(let q=0;q<H;q++){let B=Y.indexOf(U.charAt(q));if(B>64)continue;if(B<0)return!1;K+=6}return K%8===0}function G(U){let K=U.replace(/[\r\n=]/g,""),H=K.length,Y=X,q=0,B=[];for(let F=0;F<H;F++){if(F%4===0&&F)B.push(q>>16&255),B.push(q>>8&255),B.push(q&255);q=q<<6|Y.indexOf(K.charAt(F))}let M=H%4*6;if(M===0)B.push(q>>16&255),B.push(q>>8&255),B.push(q&255);else if(M===18)B.push(q>>10&255),B.push(q>>2&255);else if(M===12)B.push(q>>4&255);return new Uint8Array(B)}function Q(U){let K="",H=0,Y=U.length,q=X;for(let M=0;M<Y;M++){if(M%3===0&&M)K+=q[H>>18&63],K+=q[H>>12&63],K+=q[H>>6&63],K+=q[H&63];H=(H<<8)+U[M]}let B=Y%3;if(B===0)K+=q[H>>18&63],K+=q[H>>12&63],K+=q[H>>6&63],K+=q[H&63];else if(B===2)K+=q[H>>10&63],K+=q[H>>4&63],K+=q[H<<2&63],K+=q[64];else if(B===1)K+=q[H>>2&63],K+=q[H<<4&63],K+=q[64],K+=q[64];return K}function J(U){return Object.prototype.toString.call(U)==="[object Uint8Array]"}return w8=new Z("tag:yaml.org,2002:binary",{kind:"scalar",resolve:W,construct:G,predicate:J,represent:Q}),w8}function _4(){if(W4)return O8;W4=1;let Z=Y2(),X=Object.prototype.hasOwnProperty,W=Object.prototype.toString;function G(J){if(J===null)return!0;let U=[],K=J;for(let H=0,Y=K.length;H<Y;H+=1){let q=K[H],B=!1;if(W.call(q)!=="[object Object]")return!1;let M;for(M in q)if(X.call(q,M))if(!B)B=!0;else return!1;if(!B)return!1;if(U.indexOf(M)===-1)U.push(M);else return!1}return!0}function Q(J){return J!==null?J:[]}return O8=new Z("tag:yaml.org,2002:omap",{kind:"sequence",resolve:G,construct:Q}),O8}function N4(){if(G4)return T8;G4=1;let Z=Y2(),X=Object.prototype.toString;function W(Q){if(Q===null)return!0;let J=Q,U=Array(J.length);for(let K=0,H=J.length;K<H;K+=1){let Y=J[K];if(X.call(Y)!=="[object Object]")return!1;let q=Object.keys(Y);if(q.length!==1)return!1;U[K]=[q[0],Y[q[0]]]}return!0}function G(Q){if(Q===null)return[];let J=Q,U=Array(J.length);for(let K=0,H=J.length;K<H;K+=1){let Y=J[K],q=Object.keys(Y);U[K]=[q[0],Y[q[0]]]}return U}return T8=new Z("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:W,construct:G}),T8}function j4(){if(Q4)return _8;Q4=1;let Z=Y2(),X=Object.prototype.hasOwnProperty;function W(Q){if(Q===null)return!0;let J=Q;for(let U in J)if(X.call(J,U)){if(J[U]!==null)return!1}return!0}function G(Q){return Q!==null?Q:{}}return _8=new Z("tag:yaml.org,2002:set",{kind:"mapping",resolve:W,construct:G}),_8}function C8(){if(J4)return N8;return J4=1,N8=I4().extend({implicit:[w4(),O4()],explicit:[T4(),_4(),N4(),j4()]}),N8}function RZ(){if(U4)return L1;U4=1;let Z=b0(),X=g0(),W=CZ(),G=C8(),Q=Object.prototype.hasOwnProperty,J=1,U=2,K=3,H=4,Y=1,q=2,B=3,M=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,F=/[\x85\u2028\u2029]/,D=/[,\[\]{}]/,w=/^(?:!|!!|![0-9A-Za-z-]+!)$/,A=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(z){return Object.prototype.toString.call(z)}function E(z){return z===10||z===13}function y(z){return z===9||z===32}function h(z){return z===9||z===32||z===10||z===13}function f(z){return z===44||z===91||z===93||z===123||z===125}function X2(z){if(z>=48&&z<=57)return z-48;let $=z|32;if($>=97&&$<=102)return $-97+10;return-1}function u(z){if(z===120)return 2;if(z===117)return 4;if(z===85)return 8;return 0}function b(z){if(z>=48&&z<=57)return z-48;return-1}function o(z){switch(z){case 48:return"\x00";case 97:return"\x07";case 98:return"\b";case 116:return"\t";case 9:return"\t";case 110:return`
|
|
29
29
|
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function W2(z){if(z<=65535)return String.fromCharCode(z);return String.fromCharCode((z-65536>>10)+55296,(z-65536&1023)+56320)}function E2(z,$,O){if($==="__proto__")Object.defineProperty(z,$,{configurable:!0,enumerable:!0,writable:!0,value:O});else z[$]=O}let m0=Array(256),I0=Array(256);for(let z=0;z<256;z++)m0[z]=o(z)?1:0,I0[z]=o(z);function G2(z,$){this.input=z,this.filename=$.filename||null,this.schema=$.schema||G,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth==="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys==="number"?$.maxTotalMergeKeys:1e4,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.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function h0(z,$){let O={name:z.filename,buffer:z.input.slice(0,-1),position:z.position,line:z.line,column:z.position-z.lineStart};return O.snippet=W(O),new X($,O)}function g(z,$){throw h0(z,$)}function J0(z,$){if(z.onWarning)z.onWarning.call(null,h0(z,$))}function S2(z,$,O){let N=z.anchorMapTransactions;if(N.length!==0){let I=N[N.length-1];if(!Q.call(I,$))I[$]={existed:Q.call(z.anchorMap,$),value:z.anchorMap[$]}}z.anchorMap[$]=O}function R1(z){z.anchorMapTransactions.push(Object.create(null))}function e2(z){let $=z.anchorMapTransactions.pop(),O=z.anchorMapTransactions;if(O.length===0)return;let N=O[O.length-1],I=Object.keys($);for(let x=0,V=I.length;x<V;x+=1){let L=I[x];if(!Q.call(N,L))N[L]=$[L]}}function P1(z){let $=z.anchorMapTransactions.pop(),O=Object.keys($);for(let N=O.length-1;N>=0;N-=1){let I=$[O[N]];if(I.existed)z.anchorMap[O[N]]=I.value;else delete z.anchorMap[O[N]]}}function w0(z){return{position:z.position,line:z.line,lineStart:z.lineStart,lineIndent:z.lineIndent,firstTabInLine:z.firstTabInLine,tag:z.tag,anchor:z.anchor,kind:z.kind,result:z.result}}function U0(z,$){z.position=$.position,z.line=$.line,z.lineStart=$.lineStart,z.lineIndent=$.lineIndent,z.firstTabInLine=$.firstTabInLine,z.tag=$.tag,z.anchor=$.anchor,z.kind=$.kind,z.result=$.result}let u0={YAML:function($,O,N){if($.version!==null)g($,"duplication of %YAML directive");if(N.length!==1)g($,"YAML directive accepts exactly one argument");let I=/^([0-9]+)\.([0-9]+)$/.exec(N[0]);if(I===null)g($,"ill-formed argument of the YAML directive");let x=parseInt(I[1],10),V=parseInt(I[2],10);if(x!==1)g($,"unacceptable YAML version of the document");if($.version=N[0],$.checkLineBreaks=V<2,V!==1&&V!==2)J0($,"unsupported YAML version of the document")},TAG:function($,O,N){let I;if(N.length!==2)g($,"TAG directive accepts exactly two arguments");let x=N[0];if(I=N[1],!w.test(x))g($,"ill-formed tag handle (first argument) of the TAG directive");if(Q.call($.tagMap,x))g($,'there is a previously declared suffix for "'+x+'" tag handle');if(!A.test(I))g($,"ill-formed tag prefix (second argument) of the TAG directive");try{I=decodeURIComponent(I)}catch(V){g($,"tag prefix is malformed: "+I)}$.tagMap[x]=I}};function B2(z,$,O,N){if($<O){let I=z.input.slice($,O);if(N)for(let x=0,V=I.length;x<V;x+=1){let L=I.charCodeAt(x);if(!(L===9||L>=32&&L<=1114111))g(z,"expected valid JSON character")}else if(M.test(I))g(z,"the stream contains non-printable characters");z.result+=I}}function p2(z,$,O,N){if(!Z.isObject(O))g(z,"cannot merge mappings; the provided source object is unacceptable");let I=Object.keys(O);for(let x=0,V=I.length;x<V;x+=1){let L=I[x];if(z.maxTotalMergeKeys!==-1&&++z.totalMergeKeys>z.maxTotalMergeKeys)g(z,"merge keys exceeded maxTotalMergeKeys ("+z.maxTotalMergeKeys+")");if(!Q.call($,L))E2($,L,O[L]),N[L]=!0}}function k2(z,$,O,N,I,x,V,L,R){if(Array.isArray(I)){I=Array.prototype.slice.call(I);for(let T=0,_=I.length;T<_;T+=1){if(Array.isArray(I[T]))g(z,"nested arrays are not supported inside keys");if(typeof I==="object"&&C(I[T])==="[object Object]")I[T]="[object Object]"}}if(typeof I==="object"&&C(I)==="[object Object]")I="[object Object]";if(I=String(I),$===null)$={};if(N==="tag:yaml.org,2002:merge")if(Array.isArray(x))for(let T=0,_=x.length;T<_;T+=1)p2(z,$,x[T],O);else p2(z,$,x,O);else{if(!z.json&&!Q.call(O,I)&&Q.call($,I))z.line=V||z.line,z.lineStart=L||z.lineStart,z.position=R||z.position,g(z,"duplicated mapping key");E2($,I,x),delete O[I]}return $}function Y0(z){let $=z.input.charCodeAt(z.position);if($===10)z.position++;else if($===13){if(z.position++,z.input.charCodeAt(z.position)===10)z.position++}else g(z,"a line break is expected");z.line+=1,z.lineStart=z.position,z.firstTabInLine=-1}function t(z,$,O){let N=0,I=z.input.charCodeAt(z.position);while(I!==0){while(y(I)){if(I===9&&z.firstTabInLine===-1)z.firstTabInLine=z.position;I=z.input.charCodeAt(++z.position)}if($&&I===35)do I=z.input.charCodeAt(++z.position);while(I!==10&&I!==13&&I!==0);if(E(I)){Y0(z),I=z.input.charCodeAt(z.position),N++,z.lineIndent=0;while(I===32)z.lineIndent++,I=z.input.charCodeAt(++z.position)}else break}if(O!==-1&&N!==0&&z.lineIndent<O)J0(z,"deficient indentation");return N}function K0(z){let $=z.position,O=z.input.charCodeAt($);if((O===45||O===46)&&O===z.input.charCodeAt($+1)&&O===z.input.charCodeAt($+2)){if($+=3,O=z.input.charCodeAt($),O===0||h(O))return!0}return!1}function b2(z,$){if($===1)z.result+=" ";else if($>1)z.result+=Z.repeat(`
|
|
30
|
-
`,$-1)}function f0(z,$,O){let N,I,x,V,L,R,T=z.kind,_=z.result,P=z.input.charCodeAt(z.position);if(h(P)||f(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96)return!1;if(P===63||P===45){let j=z.input.charCodeAt(z.position+1);if(h(j)||O&&f(j))return!1}z.kind="scalar",z.result="",N=I=z.position,x=!1;while(P!==0){if(P===58){let j=z.input.charCodeAt(z.position+1);if(h(j)||O&&f(j))break}else if(P===35){let j=z.input.charCodeAt(z.position-1);if(h(j))break}else if(z.position===z.lineStart&&K0(z)||O&&f(P))break;else if(E(P))if(V=z.line,L=z.lineStart,R=z.lineIndent,t(z,!1,-1),z.lineIndent>=$){x=!0,P=z.input.charCodeAt(z.position);continue}else{z.position=I,z.line=V,z.lineStart=L,z.lineIndent=R;break}if(x)B2(z,N,I,!1),b2(z,z.line-V),N=I=z.position,x=!1;if(!y(P))I=z.position+1;P=z.input.charCodeAt(++z.position)}if(B2(z,N,I,!1),z.result)return!0;return z.kind=T,z.result=_,!1}function c0(z,$){let O,N,I=z.input.charCodeAt(z.position);if(I!==39)return!1;z.kind="scalar",z.result="",z.position++,O=N=z.position;while((I=z.input.charCodeAt(z.position))!==0)if(I===39)if(B2(z,O,z.position,!0),I=z.input.charCodeAt(++z.position),I===39)O=z.position,z.position++,N=z.position;else return!0;else if(E(I))B2(z,O,N,!0),b2(z,t(z,!1,$)),O=N=z.position;else if(z.position===z.lineStart&&K0(z))g(z,"unexpected end of the document within a single quoted scalar");else if(z.position++,!y(I))N=z.position;g(z,"unexpected end of the stream within a single quoted scalar")}function O0(z,$){let O,N,I,x=z.input.charCodeAt(z.position);if(x!==34)return!1;z.kind="scalar",z.result="",z.position++,O=N=z.position;while((x=z.input.charCodeAt(z.position))!==0)if(x===34)return B2(z,O,z.position,!0),z.position++,!0;else if(x===92){if(B2(z,O,z.position,!0),x=z.input.charCodeAt(++z.position),E(x))t(z,!1,$);else if(x<256&&m0[x])z.result+=I0[x],z.position++;else if((I=u(x))>0){let V=I,L=0;for(;V>0;V--)if(x=z.input.charCodeAt(++z.position),(I=X2(x))>=0)L=(L<<4)+I;else g(z,"expected hexadecimal character");z.result+=W2(L),z.position++}else g(z,"unknown escape sequence");O=N=z.position}else if(E(x))B2(z,O,N,!0),b2(z,t(z,!1,$)),O=N=z.position;else if(z.position===z.lineStart&&K0(z))g(z,"unexpected end of the document within a double quoted scalar");else if(z.position++,!y(x))N=z.position;g(z,"unexpected end of the stream within a double quoted scalar")}function d0(z,$){let O=!0,N,I,x,V=z.tag,L,R=z.anchor,T,_,P,j,k=Object.create(null),S,v,m,d=z.input.charCodeAt(z.position);if(d===91)T=93,j=!1,L=[];else if(d===123)T=125,j=!0,L={};else return!1;if(z.anchor!==null)S2(z,z.anchor,L);d=z.input.charCodeAt(++z.position);while(d!==0){if(t(z,!0,$),d=z.input.charCodeAt(z.position),d===T)return z.position++,z.tag=V,z.anchor=R,z.kind=j?"mapping":"sequence",z.result=L,!0;else if(!O)g(z,"missed comma between flow collection entries");else if(d===44)g(z,"expected the node content, but found ','");if(v=S=m=null,_=P=!1,d===63){let
|
|
30
|
+
`,$-1)}function f0(z,$,O){let N,I,x,V,L,R,T=z.kind,_=z.result,P=z.input.charCodeAt(z.position);if(h(P)||f(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96)return!1;if(P===63||P===45){let j=z.input.charCodeAt(z.position+1);if(h(j)||O&&f(j))return!1}z.kind="scalar",z.result="",N=I=z.position,x=!1;while(P!==0){if(P===58){let j=z.input.charCodeAt(z.position+1);if(h(j)||O&&f(j))break}else if(P===35){let j=z.input.charCodeAt(z.position-1);if(h(j))break}else if(z.position===z.lineStart&&K0(z)||O&&f(P))break;else if(E(P))if(V=z.line,L=z.lineStart,R=z.lineIndent,t(z,!1,-1),z.lineIndent>=$){x=!0,P=z.input.charCodeAt(z.position);continue}else{z.position=I,z.line=V,z.lineStart=L,z.lineIndent=R;break}if(x)B2(z,N,I,!1),b2(z,z.line-V),N=I=z.position,x=!1;if(!y(P))I=z.position+1;P=z.input.charCodeAt(++z.position)}if(B2(z,N,I,!1),z.result)return!0;return z.kind=T,z.result=_,!1}function c0(z,$){let O,N,I=z.input.charCodeAt(z.position);if(I!==39)return!1;z.kind="scalar",z.result="",z.position++,O=N=z.position;while((I=z.input.charCodeAt(z.position))!==0)if(I===39)if(B2(z,O,z.position,!0),I=z.input.charCodeAt(++z.position),I===39)O=z.position,z.position++,N=z.position;else return!0;else if(E(I))B2(z,O,N,!0),b2(z,t(z,!1,$)),O=N=z.position;else if(z.position===z.lineStart&&K0(z))g(z,"unexpected end of the document within a single quoted scalar");else if(z.position++,!y(I))N=z.position;g(z,"unexpected end of the stream within a single quoted scalar")}function O0(z,$){let O,N,I,x=z.input.charCodeAt(z.position);if(x!==34)return!1;z.kind="scalar",z.result="",z.position++,O=N=z.position;while((x=z.input.charCodeAt(z.position))!==0)if(x===34)return B2(z,O,z.position,!0),z.position++,!0;else if(x===92){if(B2(z,O,z.position,!0),x=z.input.charCodeAt(++z.position),E(x))t(z,!1,$);else if(x<256&&m0[x])z.result+=I0[x],z.position++;else if((I=u(x))>0){let V=I,L=0;for(;V>0;V--)if(x=z.input.charCodeAt(++z.position),(I=X2(x))>=0)L=(L<<4)+I;else g(z,"expected hexadecimal character");z.result+=W2(L),z.position++}else g(z,"unknown escape sequence");O=N=z.position}else if(E(x))B2(z,O,N,!0),b2(z,t(z,!1,$)),O=N=z.position;else if(z.position===z.lineStart&&K0(z))g(z,"unexpected end of the document within a double quoted scalar");else if(z.position++,!y(x))N=z.position;g(z,"unexpected end of the stream within a double quoted scalar")}function d0(z,$){let O=!0,N,I,x,V=z.tag,L,R=z.anchor,T,_,P,j,k=Object.create(null),S,v,m,d=z.input.charCodeAt(z.position);if(d===91)T=93,j=!1,L=[];else if(d===123)T=125,j=!0,L={};else return!1;if(z.anchor!==null)S2(z,z.anchor,L);d=z.input.charCodeAt(++z.position);while(d!==0){if(t(z,!0,$),d=z.input.charCodeAt(z.position),d===T)return z.position++,z.tag=V,z.anchor=R,z.kind=j?"mapping":"sequence",z.result=L,!0;else if(!O)g(z,"missed comma between flow collection entries");else if(d===44)g(z,"expected the node content, but found ','");if(v=S=m=null,_=P=!1,d===63){let n=z.input.charCodeAt(z.position+1);if(h(n))_=P=!0,z.position++,t(z,!0,$)}if(N=z.line,I=z.lineStart,x=z.position,v2(z,$,J,!1,!0),v=z.tag,S=z.result,t(z,!0,$),d=z.input.charCodeAt(z.position),(P||z.line===N)&&d===58)_=!0,d=z.input.charCodeAt(++z.position),t(z,!0,$),v2(z,$,J,!1,!0),m=z.result;if(j)k2(z,L,k,v,S,m,N,I,x);else if(_)L.push(k2(z,null,k,v,S,m,N,I,x));else L.push(S);if(t(z,!0,$),d=z.input.charCodeAt(z.position),d===44)O=!0,d=z.input.charCodeAt(++z.position);else O=!1}g(z,"unexpected end of the stream within a flow collection")}function p0(z,$){let O,N=Y,I=!1,x=!1,V=$,L=0,R=!1,T,_=z.input.charCodeAt(z.position);if(_===124)O=!1;else if(_===62)O=!0;else return!1;z.kind="scalar",z.result="";while(_!==0)if(_=z.input.charCodeAt(++z.position),_===43||_===45)if(Y===N)N=_===43?B:q;else g(z,"repeat of a chomping mode identifier");else if((T=b(_))>=0)if(T===0)g(z,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!x)V=$+T-1,x=!0;else g(z,"repeat of an indentation width identifier");else break;if(y(_)){do _=z.input.charCodeAt(++z.position);while(y(_));if(_===35)do _=z.input.charCodeAt(++z.position);while(!E(_)&&_!==0)}while(_!==0){Y0(z),z.lineIndent=0,_=z.input.charCodeAt(z.position);while((!x||z.lineIndent<V)&&_===32)z.lineIndent++,_=z.input.charCodeAt(++z.position);if(!x&&z.lineIndent>V)V=z.lineIndent;if(E(_)){L++;continue}if(!x&&V===0)g(z,"missing indentation for block scalar");if(z.lineIndent<V){if(N===B)z.result+=Z.repeat(`
|
|
31
31
|
`,I?1+L:L);else if(N===Y){if(I)z.result+=`
|
|
32
32
|
`}break}if(O)if(y(_))R=!0,z.result+=Z.repeat(`
|
|
33
33
|
`,I?1+L:L);else if(R)R=!1,z.result+=Z.repeat(`
|
|
34
34
|
`,L+1);else if(L===0){if(I)z.result+=" "}else z.result+=Z.repeat(`
|
|
35
35
|
`,L);else z.result+=Z.repeat(`
|
|
36
|
-
`,I?1+L:L);I=!0,x=!0,L=0;let P=z.position;while(!E(_)&&_!==0)_=z.input.charCodeAt(++z.position);B2(z,P,z.position,!1)}return!0}function g2(z,$){let{tag:O,anchor:N}=z,I=[],x=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)S2(z,z.anchor,I);let V=z.input.charCodeAt(z.position);while(V!==0){if(z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");if(V!==45)break;let L=z.input.charCodeAt(z.position+1);if(!h(L))break;if(x=!0,z.position++,t(z,!0,-1)){if(z.lineIndent<=$){I.push(null),V=z.input.charCodeAt(z.position);continue}}let R=z.line;if(v2(z,$,K,!1,!0),I.push(z.result),t(z,!0,-1),V=z.input.charCodeAt(z.position),(z.line===R||z.lineIndent>$)&&V!==0)g(z,"bad indentation of a sequence entry");else if(z.lineIndent<$)break}if(x)return z.tag=O,z.anchor=N,z.kind="sequence",z.result=I,!0;return!1}function l0(z,$,O){let N,I,x,V,L=z.tag,R=z.anchor,T={},_=Object.create(null),P=null,j=null,k=null,S=!1,v=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)S2(z,z.anchor,T);let m=z.input.charCodeAt(z.position);while(m!==0){if(!S&&z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");let d=z.input.charCodeAt(z.position+1),
|
|
37
|
-
`;if(z.charCodeAt(0)===65279)z=z.slice(1)}let O=new G2(z,$),N=z.indexOf("\x00");if(N!==-1)O.position=N,g(O,"null byte is not allowed in input");O.input+="\x00";while(O.input.charCodeAt(O.position)===32)O.lineIndent+=1,O.position+=1;while(O.position<O.length-1)S1(O);return O.documents}function r0(z,$,O){if($!==null&&typeof $==="object"&&typeof O>"u")O=$,$=null;let N=o0(z,O);if(typeof $!=="function")return N;for(let I=0,x=N.length;I<x;I+=1)$(N[I])}function k1(z,$){let O=o0(z,$);if(O.length===0)return;else if(O.length===1)return O[0];throw new X("expected a single document in the stream, but found more")}return L1.loadAll=r0,L1.load=k1,L1}function
|
|
36
|
+
`,I?1+L:L);I=!0,x=!0,L=0;let P=z.position;while(!E(_)&&_!==0)_=z.input.charCodeAt(++z.position);B2(z,P,z.position,!1)}return!0}function g2(z,$){let{tag:O,anchor:N}=z,I=[],x=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)S2(z,z.anchor,I);let V=z.input.charCodeAt(z.position);while(V!==0){if(z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");if(V!==45)break;let L=z.input.charCodeAt(z.position+1);if(!h(L))break;if(x=!0,z.position++,t(z,!0,-1)){if(z.lineIndent<=$){I.push(null),V=z.input.charCodeAt(z.position);continue}}let R=z.line;if(v2(z,$,K,!1,!0),I.push(z.result),t(z,!0,-1),V=z.input.charCodeAt(z.position),(z.line===R||z.lineIndent>$)&&V!==0)g(z,"bad indentation of a sequence entry");else if(z.lineIndent<$)break}if(x)return z.tag=O,z.anchor=N,z.kind="sequence",z.result=I,!0;return!1}function l0(z,$,O){let N,I,x,V,L=z.tag,R=z.anchor,T={},_=Object.create(null),P=null,j=null,k=null,S=!1,v=!1;if(z.firstTabInLine!==-1)return!1;if(z.anchor!==null)S2(z,z.anchor,T);let m=z.input.charCodeAt(z.position);while(m!==0){if(!S&&z.firstTabInLine!==-1)z.position=z.firstTabInLine,g(z,"tab characters must not be used in indentation");let d=z.input.charCodeAt(z.position+1),n=z.line;if((m===63||m===58)&&h(d)){if(m===63){if(S)k2(z,T,_,P,j,null,I,x,V),P=j=k=null;v=!0,S=!0,N=!0}else if(S)S=!1,N=!0;else g(z,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");z.position+=1,m=d}else{if(I=z.line,x=z.lineStart,V=z.position,!v2(z,O,U,!1,!0))break;if(z.line===n){m=z.input.charCodeAt(z.position);while(y(m))m=z.input.charCodeAt(++z.position);if(m===58){if(m=z.input.charCodeAt(++z.position),!h(m))g(z,"a whitespace character is expected after the key-value separator within a block mapping");if(S)k2(z,T,_,P,j,null,I,x,V),P=j=k=null;v=!0,S=!1,N=!1,P=z.tag,j=z.result}else if(v)g(z,"can not read an implicit mapping pair; a colon is missed");else return z.tag=L,z.anchor=R,!0}else if(v)g(z,"can not read a block mapping entry; a multiline key may not be an implicit key");else return z.tag=L,z.anchor=R,!0}if(z.line===n||z.lineIndent>$){if(S)I=z.line,x=z.lineStart,V=z.position;if(v2(z,$,H,!0,N))if(S)j=z.result;else k=z.result;if(!S)k2(z,T,_,P,j,k,I,x,V),P=j=k=null;t(z,!0,-1),m=z.input.charCodeAt(z.position)}if((z.line===n||z.lineIndent>$)&&m!==0)g(z,"bad indentation of a mapping entry");else if(z.lineIndent<$)break}if(S)k2(z,T,_,P,j,null,I,x,V);if(v)z.tag=L,z.anchor=R,z.kind="mapping",z.result=T;return v}function x1(z){let $=!1,O=!1,N,I,x=z.input.charCodeAt(z.position);if(x!==33)return!1;if(z.tag!==null)g(z,"duplication of a tag property");if(x=z.input.charCodeAt(++z.position),x===60)$=!0,x=z.input.charCodeAt(++z.position);else if(x===33)O=!0,N="!!",x=z.input.charCodeAt(++z.position);else N="!";let V=z.position;if($){do x=z.input.charCodeAt(++z.position);while(x!==0&&x!==62);if(z.position<z.length)I=z.input.slice(V,z.position),x=z.input.charCodeAt(++z.position);else g(z,"unexpected end of the stream within a verbatim tag")}else{while(x!==0&&!h(x)){if(x===33)if(!O){if(N=z.input.slice(V-1,z.position+1),!w.test(N))g(z,"named tag handle cannot contain such characters");O=!0,V=z.position+1}else g(z,"tag suffix cannot contain exclamation marks");x=z.input.charCodeAt(++z.position)}if(I=z.input.slice(V,z.position),D.test(I))g(z,"tag suffix cannot contain flow indicator characters")}if(I&&!A.test(I))g(z,"tag name cannot contain such characters: "+I);try{I=decodeURIComponent(I)}catch(L){g(z,"tag name is malformed: "+I)}if($)z.tag=I;else if(Q.call(z.tagMap,N))z.tag=z.tagMap[N]+I;else if(N==="!")z.tag="!"+I;else if(N==="!!")z.tag="tag:yaml.org,2002:"+I;else g(z,'undeclared tag handle "'+N+'"');return!0}function i0(z){let $=z.input.charCodeAt(z.position);if($!==38)return!1;if(z.anchor!==null)g(z,"duplication of an anchor property");$=z.input.charCodeAt(++z.position);let O=z.position;while($!==0&&!h($)&&!f($))$=z.input.charCodeAt(++z.position);if(z.position===O)g(z,"name of an anchor node must contain at least one character");return z.anchor=z.input.slice(O,z.position),!0}function n0(z){let $=z.input.charCodeAt(z.position);if($!==42)return!1;$=z.input.charCodeAt(++z.position);let O=z.position;while($!==0&&!h($)&&!f($))$=z.input.charCodeAt(++z.position);if(z.position===O)g(z,"name of an alias node must contain at least one character");let N=z.input.slice(O,z.position);if(!Q.call(z.anchorMap,N))g(z,'unidentified alias "'+N+'"');return z.result=z.anchorMap[N],t(z,!0,-1),!0}function E1(z,$,O,N){let I=w0(z);if(R1(z),U0(z,$),z.tag=null,z.anchor=null,z.kind=null,z.result=null,l0(z,O,N)&&z.kind==="mapping")return e2(z),!0;return P1(z),U0(z,I),!1}function v2(z,$,O,N,I){let x,V,L=1,R=!1,T=!1,_=null,P,j,k;if(z.depth>=z.maxDepth)g(z,"nesting exceeded maxDepth ("+z.maxDepth+")");if(z.depth+=1,z.listener!==null)z.listener("open",z);z.tag=null,z.anchor=null,z.kind=null,z.result=null;let S=x=V=H===O||K===O;if(N){if(t(z,!0,-1)){if(R=!0,z.lineIndent>$)L=1;else if(z.lineIndent===$)L=0;else if(z.lineIndent<$)L=-1}}if(L===1)while(!0){let v=z.input.charCodeAt(z.position),m=w0(z);if(R&&(v===33&&z.tag!==null||v===38&&z.anchor!==null))break;if(!x1(z)&&!i0(z))break;if(_===null)_=m;if(t(z,!0,-1)){if(R=!0,V=S,z.lineIndent>$)L=1;else if(z.lineIndent===$)L=0;else if(z.lineIndent<$)L=-1}else V=!1}if(V)V=R||I;if(L===1||H===O){if(J===O||U===O)j=$;else j=$+1;if(k=z.position-z.lineStart,L===1)if(V&&(g2(z,k)||l0(z,k,j))||d0(z,j))T=!0;else{let v=z.input.charCodeAt(z.position);if(_!==null&&S&&!V&&v!==124&&v!==62&&E1(z,_,_.position-_.lineStart,j))T=!0;else if(x&&p0(z,j)||c0(z,j)||O0(z,j))T=!0;else if(n0(z)){if(T=!0,z.tag!==null||z.anchor!==null)g(z,"alias node should not have any properties")}else if(f0(z,j,J===O)){if(T=!0,z.tag===null)z.tag="?"}if(z.anchor!==null)S2(z,z.anchor,z.result)}else if(L===0)T=V&&g2(z,k)}if(z.tag===null){if(z.anchor!==null)S2(z,z.anchor,z.result)}else if(z.tag==="?"){if(z.result!==null&&z.kind!=="scalar")g(z,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+z.kind+'"');for(let v=0,m=z.implicitTypes.length;v<m;v+=1)if(P=z.implicitTypes[v],P.resolve(z.result)){if(z.result=P.construct(z.result),z.tag=P.tag,z.anchor!==null)S2(z,z.anchor,z.result);break}}else if(z.tag!=="!"){if(Q.call(z.typeMap[z.kind||"fallback"],z.tag))P=z.typeMap[z.kind||"fallback"][z.tag];else{P=null;let v=z.typeMap.multi[z.kind||"fallback"];for(let m=0,d=v.length;m<d;m+=1)if(z.tag.slice(0,v[m].tag.length)===v[m].tag){P=v[m];break}}if(!P)g(z,"unknown tag !<"+z.tag+">");if(z.result!==null&&P.kind!==z.kind)g(z,"unacceptable node kind for !<"+z.tag+'> tag; it should be "'+P.kind+'", not "'+z.kind+'"');if(!P.resolve(z.result,z.tag))g(z,"cannot resolve a node with !<"+z.tag+"> explicit tag");else if(z.result=P.construct(z.result,z.tag),z.anchor!==null)S2(z,z.anchor,z.result)}if(z.listener!==null)z.listener("close",z);return z.depth-=1,z.tag!==null||z.anchor!==null||T}function S1(z){let $=z.position,O=!1,N;z.version=null,z.checkLineBreaks=z.legacy,z.tagMap=Object.create(null),z.anchorMap=Object.create(null);while((N=z.input.charCodeAt(z.position))!==0){if(t(z,!0,-1),N=z.input.charCodeAt(z.position),z.lineIndent>0||N!==37)break;O=!0,N=z.input.charCodeAt(++z.position);let I=z.position;while(N!==0&&!h(N))N=z.input.charCodeAt(++z.position);let x=z.input.slice(I,z.position),V=[];if(x.length<1)g(z,"directive name must not be less than one character in length");while(N!==0){while(y(N))N=z.input.charCodeAt(++z.position);if(N===35){do N=z.input.charCodeAt(++z.position);while(N!==0&&!E(N));break}if(E(N))break;I=z.position;while(N!==0&&!h(N))N=z.input.charCodeAt(++z.position);V.push(z.input.slice(I,z.position))}if(N!==0)Y0(z);if(Q.call(u0,x))u0[x](z,x,V);else J0(z,'unknown document directive "'+x+'"')}if(t(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,t(z,!0,-1);else if(O)g(z,"directives end mark is expected");if(v2(z,z.lineIndent-1,H,!1,!0),t(z,!0,-1),z.checkLineBreaks&&F.test(z.input.slice($,z.position)))J0(z,"non-ASCII line breaks are interpreted as content");if(z.documents.push(z.result),z.position===z.lineStart&&K0(z)){if(z.input.charCodeAt(z.position)===46)z.position+=3,t(z,!0,-1);return}if(z.position<z.length-1)g(z,"end of the stream or a document separator is expected")}function o0(z,$){if(z=String(z),$=$||{},z.length!==0){if(z.charCodeAt(z.length-1)!==10&&z.charCodeAt(z.length-1)!==13)z+=`
|
|
37
|
+
`;if(z.charCodeAt(0)===65279)z=z.slice(1)}let O=new G2(z,$),N=z.indexOf("\x00");if(N!==-1)O.position=N,g(O,"null byte is not allowed in input");O.input+="\x00";while(O.input.charCodeAt(O.position)===32)O.lineIndent+=1,O.position+=1;while(O.position<O.length-1)S1(O);return O.documents}function r0(z,$,O){if($!==null&&typeof $==="object"&&typeof O>"u")O=$,$=null;let N=o0(z,O);if(typeof $!=="function")return N;for(let I=0,x=N.length;I<x;I+=1)$(N[I])}function k1(z,$){let O=o0(z,$);if(O.length===0)return;else if(O.length===1)return O[0];throw new X("expected a single document in the stream, but found more")}return L1.loadAll=r0,L1.load=k1,L1}function PZ(){if(Y4)return j8;Y4=1;let Z=b0(),X=g0(),W=C8(),G=Object.prototype.toString,Q=Object.prototype.hasOwnProperty,J=65279,U=9,K=10,H=13,Y=32,q=33,B=34,M=35,F=37,D=38,w=39,A=42,C=44,E=45,y=58,h=61,f=62,X2=63,u=64,b=91,o=93,W2=96,E2=123,m0=124,I0=125,G2={};G2[0]="\\0",G2[7]="\\a",G2[8]="\\b",G2[9]="\\t",G2[10]="\\n",G2[11]="\\v",G2[12]="\\f",G2[13]="\\r",G2[27]="\\e",G2[34]="\\\"",G2[92]="\\\\",G2[133]="\\N",G2[160]="\\_",G2[8232]="\\L",G2[8233]="\\P";let h0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],g=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function J0(V,L){if(L===null)return{};let R={},T=Object.keys(L);for(let _=0,P=T.length;_<P;_+=1){let j=T[_],k=String(L[j]);if(j.slice(0,2)==="!!")j="tag:yaml.org,2002:"+j.slice(2);let S=V.compiledTypeMap.fallback[j];if(S&&Q.call(S.styleAliases,k))k=S.styleAliases[k];R[j]=k}return R}function S2(V){let L,R,T=V.toString(16).toUpperCase();if(V<=255)L="x",R=2;else if(V<=65535)L="u",R=4;else if(V<=4294967295)L="U",R=8;else throw new X("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+L+Z.repeat("0",R-T.length)+T}let R1=1,e2=2;function P1(V){this.schema=V.schema||W,this.indent=Math.max(1,V.indent||2),this.noArrayIndent=V.noArrayIndent||!1,this.skipInvalid=V.skipInvalid||!1,this.flowLevel=Z.isNothing(V.flowLevel)?-1:V.flowLevel,this.styleMap=J0(this.schema,V.styles||null),this.sortKeys=V.sortKeys||!1,this.lineWidth=V.lineWidth||80,this.noRefs=V.noRefs||!1,this.noCompatMode=V.noCompatMode||!1,this.condenseFlow=V.condenseFlow||!1,this.quotingType=V.quotingType==='"'?e2:R1,this.forceQuotes=V.forceQuotes||!1,this.replacer=typeof V.replacer==="function"?V.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function w0(V,L){let R=Z.repeat(" ",L),T=0,_="",P=V.length;while(T<P){let j,k=V.indexOf(`
|
|
38
38
|
`,T);if(k===-1)j=V.slice(T),T=P;else j=V.slice(T,k+1),T=k+1;if(j.length&&j!==`
|
|
39
39
|
`)_+=R;_+=j}return _}function U0(V,L){return`
|
|
40
|
-
`+Z.repeat(" ",V.indent*L)}function u0(V,L){for(let R=0,T=V.implicitTypes.length;R<T;R+=1)if(V.implicitTypes[R].resolve(L))return!0;return!1}function B2(V){return V===Y||V===U}function p2(V){return V>=32&&V<=126||V>=161&&V<=55295&&V!==8232&&V!==8233||V>=57344&&V<=65533&&V!==J||V>=65536&&V<=1114111}function k2(V){return p2(V)&&V!==J&&V!==H&&V!==K}function Y0(V,L,R){let T=k2(V),_=T&&!B2(V);return(R?T:T&&V!==C&&V!==b&&V!==o&&V!==E2&&V!==I0)&&V!==M&&!(L===y&&!_)||k2(L)&&!B2(L)&&V===M||L===y&&_}function t(V){return p2(V)&&V!==J&&!B2(V)&&V!==E&&V!==X2&&V!==y&&V!==C&&V!==b&&V!==o&&V!==E2&&V!==I0&&V!==M&&V!==D&&V!==A&&V!==q&&V!==m0&&V!==h&&V!==f&&V!==w&&V!==B&&V!==F&&V!==u&&V!==W2}function K0(V){return!B2(V)&&V!==y}function b2(V,L){let R=V.charCodeAt(L),T;if(R>=55296&&R<=56319&&L+1<V.length){if(T=V.charCodeAt(L+1),T>=56320&&T<=57343)return(R-55296)*1024+T-56320+65536}return R}function f0(V){return/^\n* /.test(V)}let c0=1,O0=2,d0=3,p0=4,g2=5;function l0(V,L,R,T,_,P,j,k){let S,v=0,m=null,d=!1,
|
|
40
|
+
`+Z.repeat(" ",V.indent*L)}function u0(V,L){for(let R=0,T=V.implicitTypes.length;R<T;R+=1)if(V.implicitTypes[R].resolve(L))return!0;return!1}function B2(V){return V===Y||V===U}function p2(V){return V>=32&&V<=126||V>=161&&V<=55295&&V!==8232&&V!==8233||V>=57344&&V<=65533&&V!==J||V>=65536&&V<=1114111}function k2(V){return p2(V)&&V!==J&&V!==H&&V!==K}function Y0(V,L,R){let T=k2(V),_=T&&!B2(V);return(R?T:T&&V!==C&&V!==b&&V!==o&&V!==E2&&V!==I0)&&V!==M&&!(L===y&&!_)||k2(L)&&!B2(L)&&V===M||L===y&&_}function t(V){return p2(V)&&V!==J&&!B2(V)&&V!==E&&V!==X2&&V!==y&&V!==C&&V!==b&&V!==o&&V!==E2&&V!==I0&&V!==M&&V!==D&&V!==A&&V!==q&&V!==m0&&V!==h&&V!==f&&V!==w&&V!==B&&V!==F&&V!==u&&V!==W2}function K0(V){return!B2(V)&&V!==y}function b2(V,L){let R=V.charCodeAt(L),T;if(R>=55296&&R<=56319&&L+1<V.length){if(T=V.charCodeAt(L+1),T>=56320&&T<=57343)return(R-55296)*1024+T-56320+65536}return R}function f0(V){return/^\n* /.test(V)}let c0=1,O0=2,d0=3,p0=4,g2=5;function l0(V,L,R,T,_,P,j,k){let S,v=0,m=null,d=!1,n=!1,Z9=T!==-1,T0=-1,_0=t(b2(V,0))&&K0(b2(V,V.length-1));if(L||j)for(S=0;S<V.length;v>=65536?S+=2:S++){if(v=b2(V,S),!p2(v))return g2;_0=_0&&Y0(v,m,k),m=v}else{for(S=0;S<V.length;v>=65536?S+=2:S++){if(v=b2(V,S),v===K){if(d=!0,Z9)n=n||S-T0-1>T&&V[T0+1]!==" ",T0=S}else if(!p2(v))return g2;_0=_0&&Y0(v,m,k),m=v}n=n||Z9&&(S-T0-1>T&&V[T0+1]!==" ")}if(!d&&!n){if(_0&&!j&&!_(V))return c0;return P===e2?g2:O0}if(R>9&&f0(V))return g2;if(!j)return n?p0:d0;return P===e2?g2:O0}function x1(V,L,R,T,_){V.dump=function(){if(L.length===0)return V.quotingType===e2?'""':"''";if(!V.noCompatMode){if(h0.indexOf(L)!==-1||g.test(L))return V.quotingType===e2?'"'+L+'"':"'"+L+"'"}let P=V.indent*Math.max(1,R),j=V.lineWidth===-1?-1:Math.max(Math.min(V.lineWidth,40),V.lineWidth-P),k=T||V.flowLevel>-1&&R>=V.flowLevel;function S(v){return u0(V,v)}switch(l0(L,k,V.indent,j,S,V.quotingType,V.forceQuotes&&!T,_)){case c0:return L;case O0:return"'"+L.replace(/'/g,"''")+"'";case d0:return"|"+i0(L,V.indent)+n0(w0(L,P));case p0:return">"+i0(L,V.indent)+n0(w0(E1(L,j),P));case g2:return'"'+S1(L)+'"';default:throw new X("impossible error: invalid scalar style")}}()}function i0(V,L){let R=f0(V)?String(L):"",T=V[V.length-1]===`
|
|
41
41
|
`,P=T&&(V[V.length-2]===`
|
|
42
42
|
`||V===`
|
|
43
43
|
`)?"+":T?"":"-";return R+P+`
|
|
@@ -48,12 +48,12 @@ Parsed value is empty`);else return U}catch(U){if(!U&&X.continueOnError)throw ne
|
|
|
48
48
|
`:"")+v2(S,L),_=P}return T}function v2(V,L){if(V===""||V[0]===" ")return V;let R=/ [^ ]/g,T,_=0,P,j=0,k=0,S="";while(T=R.exec(V)){if(k=T.index,k-_>L)P=j>_?j:k,S+=`
|
|
49
49
|
`+V.slice(_,P),_=P+1;j=k}if(S+=`
|
|
50
50
|
`,V.length-_>L&&j>_)S+=V.slice(_,j)+`
|
|
51
|
-
`+V.slice(j+1);else S+=V.slice(_);return S.slice(1)}function S1(V){let L="",R=0;for(let T=0;T<V.length;R>=65536?T+=2:T++){R=b2(V,T);let _=G2[R];if(!_&&p2(R)){if(L+=V[T],R>=65536)L+=V[T+1]}else L+=_||S2(R)}return L}function o0(V,L,R){let T="",_=V.tag;for(let P=0,j=R.length;P<j;P+=1){let k=R[P];if(V.replacer)k=V.replacer.call(R,String(P),k);if(O(V,L,k,!1,!1)||typeof k>"u"&&O(V,L,null,!1,!1)){if(T!=="")T+=","+(!V.condenseFlow?" ":"");T+=V.dump}}V.tag=_,V.dump="["+T+"]"}function r0(V,L,R,T){let _="",P=V.tag;for(let j=0,k=R.length;j<k;j+=1){let S=R[j];if(V.replacer)S=V.replacer.call(R,String(j),S);if(O(V,L+1,S,!0,!0,!1,!0)||typeof S>"u"&&O(V,L+1,null,!0,!0,!1,!0)){if(!T||_!=="")_+=U0(V,L);if(V.dump&&K===V.dump.charCodeAt(0))_+="-";else _+="- ";_+=V.dump}}V.tag=P,V.dump=_||"[]"}function k1(V,L,R){let T="",_=V.tag,P=Object.keys(R);for(let j=0,k=P.length;j<k;j+=1){let S="";if(T!=="")S+=", ";if(V.condenseFlow)S+='"';let v=P[j],m=R[v];if(V.replacer)m=V.replacer.call(R,v,m);if(!O(V,L,v,!1,!1))continue;if(V.dump.length>1024)S+="? ";if(S+=V.dump+(V.condenseFlow?'"':"")+":"+(V.condenseFlow?"":" "),!O(V,L,m,!1,!1))continue;S+=V.dump,T+=S}V.tag=_,V.dump="{"+T+"}"}function z(V,L,R,T){let _="",P=V.tag,j=Object.keys(R);if(V.sortKeys===!0)j.sort();else if(typeof V.sortKeys==="function")j.sort(V.sortKeys);else if(V.sortKeys)throw new X("sortKeys must be a boolean or a function");for(let k=0,S=j.length;k<S;k+=1){let v="";if(!T||_!=="")v+=U0(V,L);let m=j[k],d=R[m];if(V.replacer)d=V.replacer.call(R,m,d);if(!O(V,L+1,m,!0,!0,!0))continue;let
|
|
52
|
-
`;return""}return
|
|
51
|
+
`+V.slice(j+1);else S+=V.slice(_);return S.slice(1)}function S1(V){let L="",R=0;for(let T=0;T<V.length;R>=65536?T+=2:T++){R=b2(V,T);let _=G2[R];if(!_&&p2(R)){if(L+=V[T],R>=65536)L+=V[T+1]}else L+=_||S2(R)}return L}function o0(V,L,R){let T="",_=V.tag;for(let P=0,j=R.length;P<j;P+=1){let k=R[P];if(V.replacer)k=V.replacer.call(R,String(P),k);if(O(V,L,k,!1,!1)||typeof k>"u"&&O(V,L,null,!1,!1)){if(T!=="")T+=","+(!V.condenseFlow?" ":"");T+=V.dump}}V.tag=_,V.dump="["+T+"]"}function r0(V,L,R,T){let _="",P=V.tag;for(let j=0,k=R.length;j<k;j+=1){let S=R[j];if(V.replacer)S=V.replacer.call(R,String(j),S);if(O(V,L+1,S,!0,!0,!1,!0)||typeof S>"u"&&O(V,L+1,null,!0,!0,!1,!0)){if(!T||_!=="")_+=U0(V,L);if(V.dump&&K===V.dump.charCodeAt(0))_+="-";else _+="- ";_+=V.dump}}V.tag=P,V.dump=_||"[]"}function k1(V,L,R){let T="",_=V.tag,P=Object.keys(R);for(let j=0,k=P.length;j<k;j+=1){let S="";if(T!=="")S+=", ";if(V.condenseFlow)S+='"';let v=P[j],m=R[v];if(V.replacer)m=V.replacer.call(R,v,m);if(!O(V,L,v,!1,!1))continue;if(V.dump.length>1024)S+="? ";if(S+=V.dump+(V.condenseFlow?'"':"")+":"+(V.condenseFlow?"":" "),!O(V,L,m,!1,!1))continue;S+=V.dump,T+=S}V.tag=_,V.dump="{"+T+"}"}function z(V,L,R,T){let _="",P=V.tag,j=Object.keys(R);if(V.sortKeys===!0)j.sort();else if(typeof V.sortKeys==="function")j.sort(V.sortKeys);else if(V.sortKeys)throw new X("sortKeys must be a boolean or a function");for(let k=0,S=j.length;k<S;k+=1){let v="";if(!T||_!=="")v+=U0(V,L);let m=j[k],d=R[m];if(V.replacer)d=V.replacer.call(R,m,d);if(!O(V,L+1,m,!0,!0,!0))continue;let n=V.tag!==null&&V.tag!=="?"||V.dump&&V.dump.length>1024;if(n)if(V.dump&&K===V.dump.charCodeAt(0))v+="?";else v+="? ";if(v+=V.dump,n)v+=U0(V,L);if(!O(V,L+1,d,!0,n))continue;if(V.dump&&K===V.dump.charCodeAt(0))v+=":";else v+=": ";v+=V.dump,_+=v}V.tag=P,V.dump=_||"{}"}function $(V,L,R){let T=R?V.explicitTypes:V.implicitTypes;for(let _=0,P=T.length;_<P;_+=1){let j=T[_];if((j.instanceOf||j.predicate)&&(!j.instanceOf||typeof L==="object"&&L instanceof j.instanceOf)&&(!j.predicate||j.predicate(L))){if(R)if(j.multi&&j.representName)V.tag=j.representName(L);else V.tag=j.tag;else V.tag="?";if(j.represent){let k=V.styleMap[j.tag]||j.defaultStyle,S;if(G.call(j.represent)==="[object Function]")S=j.represent(L,k);else if(Q.call(j.represent,k))S=j.represent[k](L,k);else throw new X("!<"+j.tag+'> tag resolver accepts not "'+k+'" style');V.dump=S}return!0}}return!1}function O(V,L,R,T,_,P,j){if(V.tag=null,V.dump=R,!$(V,R,!1))$(V,R,!0);let k=G.call(V.dump),S=T;if(T)T=V.flowLevel<0||V.flowLevel>L;let v=k==="[object Object]"||k==="[object Array]",m,d;if(v)m=V.duplicates.indexOf(R),d=m!==-1;if(V.tag!==null&&V.tag!=="?"||d||V.indent!==2&&L>0)_=!1;if(d&&V.usedDuplicates[m])V.dump="*ref_"+m;else{if(v&&d&&!V.usedDuplicates[m])V.usedDuplicates[m]=!0;if(k==="[object Object]"){if(T&&Object.keys(V.dump).length!==0){if(z(V,L,V.dump,_),d)V.dump="&ref_"+m+V.dump}else if(k1(V,L,V.dump),d)V.dump="&ref_"+m+" "+V.dump}else if(k==="[object Array]"){if(T&&V.dump.length!==0){if(V.noArrayIndent&&!j&&L>0)r0(V,L-1,V.dump,_);else r0(V,L,V.dump,_);if(d)V.dump="&ref_"+m+V.dump}else if(o0(V,L,V.dump),d)V.dump="&ref_"+m+" "+V.dump}else if(k==="[object String]"){if(V.tag!=="?")x1(V,V.dump,L,P,S)}else if(k==="[object Undefined]")return!1;else{if(V.skipInvalid)return!1;throw new X("unacceptable kind of an object to dump "+k)}if(V.tag!==null&&V.tag!=="?"){let n=encodeURI(V.tag[0]==="!"?V.tag.slice(1):V.tag).replace(/!/g,"%21");if(V.tag[0]==="!")n="!"+n;else if(n.slice(0,18)==="tag:yaml.org,2002:")n="!!"+n.slice(18);else n="!<"+n+">";V.dump=n+" "+V.dump}}return!0}function N(V,L){let R=[],T=[];I(V,R,T);let _=T.length;for(let P=0;P<_;P+=1)L.duplicates.push(R[T[P]]);L.usedDuplicates=Array(_)}function I(V,L,R){if(V!==null&&typeof V==="object"){let T=L.indexOf(V);if(T!==-1){if(R.indexOf(T)===-1)R.push(T)}else if(L.push(V),Array.isArray(V))for(let _=0,P=V.length;_<P;_+=1)I(V[_],L,R);else{let _=Object.keys(V);for(let P=0,j=_.length;P<j;P+=1)I(V[_[P]],L,R)}}}function x(V,L){L=L||{};let R=new P1(L);if(!R.noRefs)N(V,R);let T=V;if(R.replacer)T=R.replacer.call({"":T},"",T);if(O(R,0,T,!0,!0))return R.dump+`
|
|
52
|
+
`;return""}return j8.dump=x,j8}function xZ(){if(K4)return Q2;K4=1;let Z=RZ(),X=PZ();function W(G,Q){return function(){throw Error("Function yaml."+G+" is removed in js-yaml 4. Use yaml."+Q+" instead, which is now safe by default.")}}return Q2.Type=Y2(),Q2.Schema=V4(),Q2.FAILSAFE_SCHEMA=M4(),Q2.JSON_SCHEMA=A4(),Q2.CORE_SCHEMA=I4(),Q2.DEFAULT_SCHEMA=C8(),Q2.load=Z.load,Q2.loadAll=Z.loadAll,Q2.dump=X.dump,Q2.YAMLException=g0(),Q2.types={binary:T4(),float:L4(),map:B4(),null:F4(),pairs:N4(),set:j4(),timestamp:w4(),bool:$4(),int:D4(),merge:O4(),omap:_4(),seq:H4(),str:q4()},Q2.safeLoad=W("safeLoad","load"),Q2.safeLoadAll=W("safeLoadAll","loadAll"),Q2.safeDump=W("safeDump","dump"),Q2}var Q2,L1,a2,h9,Q8,u9,J8,f9,U8,c9,Y8,d9,K8,p9,V8,l9,q8,i9,H8,n9,B8,o9,M8,r9,F8,s9,$8,a9,D8,t9,L8,e9,A8,Z4,I8,X4,w8,z4,O8,W4,T8,G4,_8,Q4,N8,J4,U4,j8,Y4,K4,EZ,A1,D5,L5,A5,C4,I5,w5,O5,T5,_5,N5,j5,C5,R5,P5;var R8=c(()=>{Q2={},L1={},a2={};j8={};EZ=xZ(),A1=jZ(EZ),{Type:D5,Schema:L5,FAILSAFE_SCHEMA:A5,JSON_SCHEMA:C4,CORE_SCHEMA:I5,DEFAULT_SCHEMA:w5,load:O5,loadAll:T5,dump:_5,YAMLException:N5,types:j5,safeLoad:C5,safeLoadAll:R5,safeDump:P5}=A1});var R4;var P4=c(()=>{O2();R8();R8();R4={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 A1.load(X,{schema:C4})}catch{try{return A1.load(X)}catch(W){throw new w2(W?.message||"Parser Error",Z.url)}}else return X}}});var SZ,x4;var E4=c(()=>{O2();SZ=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i,x4={order:300,allowEmpty:!0,encoding:"utf8",canParse(Z){return(typeof Z.data==="string"||Buffer.isBuffer(Z.data))&&SZ.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 w2("data is not text",Z.url)}}});var kZ,S4;var k4=c(()=>{kZ=/\.(jpeg|jpg|gif|png|bmp|ico)$/i,S4={order:400,allowEmpty:!0,canParse(Z){return Buffer.isBuffer(Z.data)&&kZ.test(Z.url)},parse(Z){if(Buffer.isBuffer(Z.data))return Z.data;else return Buffer.from(Z.data)}}});var P8;var x8=c(()=>{q2();O2();P8={order:100,canRead(Z){return Y1(Z.url)},async read(Z){let X,W=await import("fs");try{X=$0(Z.url)}catch(G){let Q=G;throw Q.message=`Malformed URI: ${Z.url}: ${Q.message}`,new N2(Q,Z.url)}if(X.endsWith("/")||X.endsWith("\\"))X=X.slice(0,-1);try{return await W.promises.readFile(X)}catch(G){let Q=G;throw Q.message=`Error opening file ${X}: ${Q.message}`,new N2(Q,X)}}}});async function b4(Z,X,W){Z=F0(Z);let G=W||[];G.push(Z.href);try{if(X.safeUrlResolver&&U1(Z.href))throw Error(`Unsafe URL blocked by safeUrlResolver: ${Z.href}`);let Q=await bZ(Z,X);if(Q.status>=400){let J=Error(`HTTP ERROR ${Q.status}`);throw J.status=Q.status,J}else if(Q.status>=300)if(!Number.isNaN(X.redirects)&&G.length>X.redirects){let J=Error(`Error downloading ${G[0]}.
|
|
53
53
|
Too many redirects:
|
|
54
54
|
${G.join(`
|
|
55
|
-
`)}`);throw J.status=Q.status,new N2(J)}else{let J=bZ(Q,"location");if(!J){let K=Error(`HTTP ${Q.status} redirect with no location header`);throw K.status=Q.status,K}let U=e(Z.href,J);return k4(U,X,G)}else{if(Q.body){let J=await Q.arrayBuffer();return Buffer.from(J)}return Buffer.alloc(0)}}catch(Q){let J=Q;throw J.message=`Error downloading ${Z.href}: ${J.message}`,new N2(J,Z.href)}}async function kZ(Z,X){let W,G;if(X.timeout&&typeof AbortController<"u")W=new AbortController,G=setTimeout(()=>W.abort(),X.timeout);let Q=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",redirect:"manual",signal:W?W.signal:null});if(G)clearTimeout(G);return Q}function bZ(Z,X){return Z.headers.get(X)}var x8;var E8=c(()=>{q2();O2();x8={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return T9(Z.url)&&(!this.safeUrlResolver||!U1(Z.url))},read(Z){let X=F0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=F0(location.href).protocol;return k4(X,this)}}});function y4(Z,X){if(b4(X)){let W=Object.keys(X).filter((G)=>!["__proto__","constructor","prototype"].includes(G));for(let G=0;G<W.length;G++){let Q=W[G],J=X[Q],U=Z[Q];if(b4(J))Z[Q]=y4(U||{},J);else if(J!==void 0)Z[Q]=J}}return Z}function b4(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var g4=()=>{return{parse:{json:{...v9},yaml:{...C4},text:{...P4},binary:{...E4}},resolve:{file:{...R8},http:{...x8},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},v4=(Z)=>{let X=g4();if(Z)y4(X,Z);return X};var S8=c(()=>{y9();R4();x4();S4();P8();E8()});function gZ(Z){let X,W,G,Q,J=Array.prototype.slice.call(Z);if(typeof J[J.length-1]==="function")Q=J.pop();if(typeof J[0]==="string")if(X=J[0],typeof J[2]==="object")W=J[1],G=J[2];else W=void 0,G=J[1];else X="",W=J[0],G=J[1];try{G=v4(G)}catch(U){console.error(`JSON Schema Ref Parser: Error normalizing options: ${U}`)}if(!G.mutateInputSchema&&typeof W==="object")W=JSON.parse(JSON.stringify(W));return{path:X,schema:W,options:G,callback:Q}}var v0;var m4=c(()=>{S8();v0=gZ});function vZ(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let W=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=k8(Z.schema,Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(G)}catch(W){return Promise.reject(W)}}function k8(Z,X,W,G,Q,J,U,K){U||=new Set;let H=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!U.has(Z)){U.add(Z);let Y=W;if(a.isExternal$Ref(Z))H.push(yZ(Z,X,Y,G,Q,J));let q=Object.keys(Z);for(let B of q){let M=H2.join(X,B),F=Z[B],D=G&&F&&typeof F==="object"&&!ArrayBuffer.isView(F)?U2(Y,F):Y;H=H.concat(k8(F,M,D,G,Q,J,U,K))}}return H}async function yZ(Z,X,W,G,Q,J){let K=J.dereference?.externalReferenceResolution==="root"?z0():G?W:X,H=e(K,Z.$ref),Y=Z2(H),q=Q._get$Ref(Y);if(q)return Promise.resolve(q.value);try{let B=Z.$ref,M={url:H,baseUrl:K};if(typeof B==="string")M.reference=B;let F=await D1(M,Q,J),D=Q._get$Ref(Y),w=k8(F,Y+"#",Y,D?.dynamicIdScope??!1,Q,J,new Set,!0);return Promise.all(w)}catch(B){if(!J?.continueOnError||!x2(B))throw B;if(Q._$refs[Y])B.source=decodeURI(Z2(X)),B.path=K1(R2(X));return[]}}var h4;var u4=c(()=>{A0();E0();W8();q2();O2();W0();h4=vZ});function mZ(Z,X){let W=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=[];b8(Z,"schema",Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,"#",0,G,Z.$refs,X);let Q=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(hZ(G,X,Q),(X.bundle||{}).optimizeInternalRefs!==!1)cZ(G,Z.schema)}function b8(Z,X,W,G,Q,J,U,K,H,Y){let q=X===null?Z:Z[X],B=Y.bundle||{},M=B.excludedPathMatcher||(()=>!1);if(q&&typeof q==="object"&&!ArrayBuffer.isView(q)&&!M(J)){let F=G;if(a.isAllowed$Ref(q))f4(Z,X,W,F,Q,J,U,K,H,Y);else{let D=Object.keys(q).sort((w,A)=>{if(w==="definitions"||w==="$defs")return-1;else if(A==="definitions"||A==="$defs")return 1;else return w.length-A.length});for(let w of D){let A=H2.join(W,w),C=H2.join(J,w),E=q[w],y=Q&&E&&typeof E==="object"&&!ArrayBuffer.isView(E)?U2(F,E):F;if(a.isAllowed$Ref(E))f4(q,w,A,y,Q,C,U,K,H,Y);else b8(q,w,A,y,Q,C,U,K,H,Y);if(E&&typeof E==="object"&&!Array.isArray(E)){if("$ref"in E)B?.onBundle?.(E.$ref,q[w],q,w)}}}}}function f4(Z,X,W,G,Q,J,U,K,H,Y){let q=X===null?Z:Z[X],B=e(Q?G:W,q.$ref),M=H._resolve(B,J,Y);if(M===null)return;let D=H2.parse(J).length,w=Z2(M.path),A=R2(M.path),C=w!==H._root$Ref.path&&!H._aliases[w],E=Boolean(H._aliases[w])&&M.$ref.value!==H._root$Ref.value,y=a.isExtended$Ref(q);U+=M.indirections;let h=uZ(K,Z,X);if(h)if(D<h.depth||U<h.indirections)fZ(K,h);else return;if(K.push({$ref:q,parent:Z,key:X,pathFromRoot:J,depth:D,file:w,hash:A,value:M.value,circular:M.circular,extended:y,external:C,nestedResource:E,indirections:U}),!h||C)b8(M.value,null,M.path,M.$ref.path,M.$ref.dynamicIdScope,J,U+1,K,H,Y)}function hZ(Z,X,W){Z.sort((U,K)=>{if(U.file!==K.file)return U.file<K.file?-1:1;else if(U.hash!==K.hash)return U.hash<K.hash?-1:1;else if(U.circular!==K.circular)return U.circular?-1:1;else if(U.extended!==K.extended)return U.extended?1:-1;else if(U.indirections!==K.indirections)return U.indirections-K.indirections;else if(U.depth!==K.depth)return U.depth-K.depth;else{let H=Math.max(U.pathFromRoot.lastIndexOf("/definitions"),U.pathFromRoot.lastIndexOf("/$defs")),Y=Math.max(K.pathFromRoot.lastIndexOf("/definitions"),K.pathFromRoot.lastIndexOf("/$defs"));if(H!==Y)return Y-H;else return U.pathFromRoot.length-K.pathFromRoot.length}});let G,Q,J;for(let U of Z){let K=X.bundle||{};if(!U.external){if(K.optimizeInternalRefs!==!1&&!U.nestedResource)U.$ref.$ref=U.hash}else if(U.file===G&&U.hash===Q)if(W&&c4(Z,U))U.$ref.$ref=W+J;else U.$ref.$ref=J;else if(U.file===G&&U.hash.indexOf(Q+"/")===0){let H=H2.join(J,H2.parse(U.hash.replace(Q,"#")));if(W&&c4(Z,U))U.$ref.$ref=W+H;else U.$ref.$ref=H}else if(G=U.file,Q=U.hash,J=U.pathFromRoot,U.$ref=U.parent[U.key]=a.dereference(U.$ref,U.value,X),U.circular)U.$ref.$ref=U.pathFromRoot}}function uZ(Z,X,W){for(let G of Z)if(G&&G.parent===X&&G.key===W)return G;return}function fZ(Z,X){let W=Z.indexOf(X);Z.splice(W,1)}function cZ(Z,X){for(let W of Z){if(!W.$ref||typeof W.$ref!=="object"||!("$ref"in W.$ref))continue;let G=W.$ref.$ref;if(typeof G!=="string"||!G.startsWith("#/"))continue;let Q=dZ(X,G);if(Q!==G)W.$ref.$ref=Q}}function dZ(Z,X){if(!X.startsWith("#/"))return X;let W=X.slice(2).split("/"),G=Z,Q=[];for(let U of W){if(G===null||G===void 0||typeof G!=="object")return X;if("$ref"in G&&typeof G.$ref==="string"&&G.$ref.startsWith("#/")){let Y=G.$ref.slice(2).split("/");if(Q.length=0,Q.push(...Y),G=pZ(Z,G.$ref),G===null||G===void 0||typeof G!=="object")return X}let K=U.replace(/~1/g,"/").replace(/~0/g,"~"),H=Array.isArray(G)?parseInt(K):K;G=G[H],Q.push(U)}return"#/"+Q.join("/")}function pZ(Z,X){if(!X.startsWith("#/"))return;let W=X.slice(2).split("/"),G=Z;for(let Q of W){if(G===null||G===void 0||typeof G!=="object")return;let J=Q.replace(/~1/g,"/").replace(/~0/g,"~"),U=Array.isArray(G)?parseInt(J):J;G=G[U]}return G}function c4(Z,X){for(let W of Z){if(W.pathFromRoot==="#"||W.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(W.pathFromRoot+"/")){if(W.value&&typeof W.value==="object"&&"$id"in W.value)return!0}}return!1}var d4;var p4=c(()=>{A0();E0();q2();W0();d4=mZ});function lZ(Z,X){let W=Date.now(),G=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=g8(Z.schema,Z.$refs._root$Ref.path,G,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,W,0);Z.$refs.circular=Q.circular,Z.schema=Q.value}function g8(Z,X,W,G,Q,J,U,K,H,Y,q,B){let M,F={value:Z,circular:!1};i4(q,Y);let D=Y.dereference||{},w=D.maxDepth??500;if(B>w)throw RangeError(`Maximum dereference depth (${w}) exceeded at ${Q}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let A=D.excludedPathMatcher||(()=>!1);if(D?.circular==="ignore"||!U.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!A(Q)){J.add(Z),U.add(Z);let C=W;if(a.isAllowed$Ref(Z,Y))M=l4(Z,X,C,G,Q,J,U,K,H,Y,q,B),F.circular=M.circular,F.value=M.value;else for(let E of Object.keys(Z)){i4(q,Y);let y=H2.join(X,E),h=H2.join(Q,E);if(A(h))continue;let f=Z[E],X2=G&&f&&typeof f==="object"&&!ArrayBuffer.isView(f)?U2(C,f):C,u;if(a.isAllowed$Ref(f,Y)){if(M=l4(f,y,X2,G,h,J,U,K,H,Y,q,B),u=M.circular,Z[E]!==M.value){let b=new Map;if(D?.preservedProperties){if(typeof Z[E]==="object"&&!Array.isArray(Z[E]))D?.preservedProperties.forEach((W2)=>{if(W2 in Z[E])b.set(W2,Z[E][W2])})}let o=M.value;if(D?.cloneReferences&&!u&&o&&typeof o==="object")o=structuredClone(o);if(Z[E]=o,D?.preservedProperties){if(b.size&&typeof Z[E]==="object"&&!Array.isArray(Z[E]))b.forEach((W2,E2)=>{Z[E][E2]=W2})}D?.onDereference?.(f.$ref,Z[E],Z,E)}}else if(!J.has(f)){if(M=g8(f,y,X2,G,h,J,U,K,H,Y,q,B+1),u=M.circular,Z[E]!==M.value)Z[E]=M.value}else u=I1(y,H,Y);F.circular=F.circular||u}J.delete(Z)}}return F}function l4(Z,X,W,G,Q,J,U,K,H,Y,q,B){let D=a.isExternal$Ref(Z)&&Y?.dereference?.externalReferenceResolution==="root"?z0():G?W:X,w=e(D,Z.$ref),A=K.get(w);if(A){if(!A.circular){let X2=Object.keys(Z);if(X2.length>1){let u={};for(let b of X2)if(b!=="$ref"&&!(b in A.value))u[b]=Z[b];return{circular:A.circular,value:Object.assign({},A.value,u)}}return A}if(typeof A.value==="object"&&"$ref"in A.value&&"$ref"in Z){if(A.value.$ref===Z.$ref)return I1(X,H,Y),A}else return I1(X,H,Y),A}let C=H._resolve(w,X,Y);if(C===null)return{circular:!1,value:null};let E=C.circular,y=E||C.chainCircular||J.has(C.value);if(y)I1(X,H,Y);let h=a.dereference(Z,C.value,Y);if(!y){let X2=g8(h,C.path,C.$ref.path,C.$ref.dynamicIdScope,Q,J,U,K,H,Y,q,B+1);y=X2.circular,h=X2.value}if(y&&!E&&Y.dereference?.circular==="ignore")h=Z;if(E&&h!==Z)h.$ref=Q;let f={circular:y,value:h};if(Object.keys(Z).length===1)K.set(w,f);return f}function i4(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new a1(X.timeoutMs)}}function I1(Z,X,W){if(X.circular=!0,W?.dereference?.onCircular?.(Z),!W.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var n4;var o4=c(()=>{A0();E0();q2();W0();O2();n4=lZ});function iZ(){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 v8;var r4=c(()=>{v8=iZ()});function D2(Z,X){if(Z){X.then(function(W){v8(function(){Z(null,W)})},function(W){v8(function(){Z(W)})});return}else return X}var s4=c(()=>{r4()});class c2{schema=null;$refs=new k0;async parse(){let Z=v0(arguments),X;if(!Z.path&&!Z.schema){let G=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return D2(Z.callback,Promise.reject(G))}this.schema=null,this.$refs=new k0;let W="http";if(Y1(Z.path))Z.path=C9(Z.path),W="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let G=F0(Z.schema.$id),Q=G.port??(G.protocol==="https:"?443:80);Z.path=`${G.protocol}//${G.hostname}:${Q}`}if(Z.path=e(z0(),Z.path),Z.schema&&typeof Z.schema==="object"){let G=this.$refs._add(Z.path);G.value=Z.schema,G.pathType=W,G.dynamicIdScope=B1(G.value),M1(this.$refs,G.path,G.value,G.pathType,G.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=D1(Z.path,this.$refs,Z.options);try{let G=await X;if(G!==null&&typeof G==="object"&&!Buffer.isBuffer(G))return this.schema=G,D2(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,D2(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||!x2(G))return D2(Z.callback,Promise.reject(G));if(this.$refs._$refs[Z2(Z.path)])this.$refs._$refs[Z2(Z.path)].addError(G);return D2(Z.callback,Promise.resolve(null))}}static parse(){let Z=new c2;return Z.parse.apply(Z,arguments)}async resolve(){let Z=v0(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await h4(this,Z.options),y8(this),D2(Z.callback,Promise.resolve(this.$refs))}catch(X){return D2(Z.callback,Promise.reject(X))}}static resolve(){let Z=new c2;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new c2;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=v0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),d4(this,Z.options),y8(this),D2(Z.callback,Promise.resolve(this.schema))}catch(X){return D2(Z.callback,Promise.reject(X))}}static dereference(){let Z=new c2;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=v0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),n4(this,Z.options),y8(this),D2(Z.callback,Promise.resolve(this.schema))}catch(X){return D2(Z.callback,Promise.reject(X))}}}function y8(Z){if(D0.getParserErrors(Z).length>0)throw new D0(Z)}var CX,RX,PX,a4;var t4=c(()=>{b9();W8();m4();u4();p4();o4();q2();P8();E8();O2();s4();W0();S8();q2();CX=c2.parse,RX=c2.resolve,PX=c2.bundle,a4=c2.dereference});async function m8(Z,X={}){let{baseUrl:W="/_jx/server"}=X,G=await a4(Z),Q=D9(G);if(Q.length===0)return null;let J=Q.map(({exportName:K,src:H})=>`import { ${K} } from '${H}'`).join(`
|
|
56
|
-
`),U=Q.map(({exportName:K})=>
|
|
55
|
+
`)}`);throw J.status=Q.status,new N2(J)}else{let J=gZ(Q,"location");if(!J){let K=Error(`HTTP ${Q.status} redirect with no location header`);throw K.status=Q.status,K}let U=e(Z.href,J);return b4(U,X,G)}else{if(Q.body){let J=await Q.arrayBuffer();return Buffer.from(J)}return Buffer.alloc(0)}}catch(Q){let J=Q;throw J.message=`Error downloading ${Z.href}: ${J.message}`,new N2(J,Z.href)}}async function bZ(Z,X){let W,G;if(X.timeout&&typeof AbortController<"u")W=new AbortController,G=setTimeout(()=>W.abort(),X.timeout);let Q=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",redirect:"manual",signal:W?W.signal:null});if(G)clearTimeout(G);return Q}function gZ(Z,X){return Z.headers.get(X)}var E8;var S8=c(()=>{q2();O2();E8={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return _9(Z.url)&&(!this.safeUrlResolver||!U1(Z.url))},read(Z){let X=F0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=F0(location.href).protocol;return b4(X,this)}}});function m4(Z,X){if(g4(X)){let W=Object.keys(X).filter((G)=>!["__proto__","constructor","prototype"].includes(G));for(let G=0;G<W.length;G++){let Q=W[G],J=X[Q],U=Z[Q];if(g4(J))Z[Q]=m4(U||{},J);else if(J!==void 0)Z[Q]=J}}return Z}function g4(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var v4=()=>{return{parse:{json:{...y9},yaml:{...R4},text:{...x4},binary:{...S4}},resolve:{file:{...P8},http:{...E8},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},y4=(Z)=>{let X=v4();if(Z)m4(X,Z);return X};var k8=c(()=>{m9();P4();E4();k4();x8();S8()});function vZ(Z){let X,W,G,Q,J=Array.prototype.slice.call(Z);if(typeof J[J.length-1]==="function")Q=J.pop();if(typeof J[0]==="string")if(X=J[0],typeof J[2]==="object")W=J[1],G=J[2];else W=void 0,G=J[1];else X="",W=J[0],G=J[1];try{G=y4(G)}catch(U){console.error(`JSON Schema Ref Parser: Error normalizing options: ${U}`)}if(!G.mutateInputSchema&&typeof W==="object")W=JSON.parse(JSON.stringify(W));return{path:X,schema:W,options:G,callback:Q}}var v0;var h4=c(()=>{k8();v0=vZ});function yZ(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let W=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=b8(Z.schema,Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(G)}catch(W){return Promise.reject(W)}}function b8(Z,X,W,G,Q,J,U,K){U||=new Set;let H=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!U.has(Z)){U.add(Z);let Y=W;if(a.isExternal$Ref(Z))H.push(mZ(Z,X,Y,G,Q,J));let q=Object.keys(Z);for(let B of q){let M=H2.join(X,B),F=Z[B],D=G&&F&&typeof F==="object"&&!ArrayBuffer.isView(F)?U2(Y,F):Y;H=H.concat(b8(F,M,D,G,Q,J,U,K))}}return H}async function mZ(Z,X,W,G,Q,J){let K=J.dereference?.externalReferenceResolution==="root"?z0():G?W:X,H=e(K,Z.$ref),Y=Z2(H),q=Q._get$Ref(Y);if(q)return Promise.resolve(q.value);try{let B=Z.$ref,M={url:H,baseUrl:K};if(typeof B==="string")M.reference=B;let F=await D1(M,Q,J),D=Q._get$Ref(Y),w=b8(F,Y+"#",Y,D?.dynamicIdScope??!1,Q,J,new Set,!0);return Promise.all(w)}catch(B){if(!J?.continueOnError||!x2(B))throw B;if(Q._$refs[Y])B.source=decodeURI(Z2(X)),B.path=K1(R2(X));return[]}}var u4;var f4=c(()=>{A0();E0();G8();q2();O2();W0();u4=yZ});function hZ(Z,X){let W=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=[];g8(Z,"schema",Z.$refs._root$Ref.path+"#",W,Z.$refs._root$Ref.dynamicIdScope,"#",0,G,Z.$refs,X);let Q=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(uZ(G,X,Q),(X.bundle||{}).optimizeInternalRefs!==!1)dZ(G,Z.schema)}function g8(Z,X,W,G,Q,J,U,K,H,Y){let q=X===null?Z:Z[X],B=Y.bundle||{},M=B.excludedPathMatcher||(()=>!1);if(q&&typeof q==="object"&&!ArrayBuffer.isView(q)&&!M(J)){let F=G;if(a.isAllowed$Ref(q))c4(Z,X,W,F,Q,J,U,K,H,Y);else{let D=Object.keys(q).sort((w,A)=>{if(w==="definitions"||w==="$defs")return-1;else if(A==="definitions"||A==="$defs")return 1;else return w.length-A.length});for(let w of D){let A=H2.join(W,w),C=H2.join(J,w),E=q[w],y=Q&&E&&typeof E==="object"&&!ArrayBuffer.isView(E)?U2(F,E):F;if(a.isAllowed$Ref(E))c4(q,w,A,y,Q,C,U,K,H,Y);else g8(q,w,A,y,Q,C,U,K,H,Y);if(E&&typeof E==="object"&&!Array.isArray(E)){if("$ref"in E)B?.onBundle?.(E.$ref,q[w],q,w)}}}}}function c4(Z,X,W,G,Q,J,U,K,H,Y){let q=X===null?Z:Z[X],B=e(Q?G:W,q.$ref),M=H._resolve(B,J,Y);if(M===null)return;let D=H2.parse(J).length,w=Z2(M.path),A=R2(M.path),C=w!==H._root$Ref.path&&!H._aliases[w],E=Boolean(H._aliases[w])&&M.$ref.value!==H._root$Ref.value,y=a.isExtended$Ref(q);U+=M.indirections;let h=fZ(K,Z,X);if(h)if(D<h.depth||U<h.indirections)cZ(K,h);else return;if(K.push({$ref:q,parent:Z,key:X,pathFromRoot:J,depth:D,file:w,hash:A,value:M.value,circular:M.circular,extended:y,external:C,nestedResource:E,indirections:U}),!h||C)g8(M.value,null,M.path,M.$ref.path,M.$ref.dynamicIdScope,J,U+1,K,H,Y)}function uZ(Z,X,W){Z.sort((U,K)=>{if(U.file!==K.file)return U.file<K.file?-1:1;else if(U.hash!==K.hash)return U.hash<K.hash?-1:1;else if(U.circular!==K.circular)return U.circular?-1:1;else if(U.extended!==K.extended)return U.extended?1:-1;else if(U.indirections!==K.indirections)return U.indirections-K.indirections;else if(U.depth!==K.depth)return U.depth-K.depth;else{let H=Math.max(U.pathFromRoot.lastIndexOf("/definitions"),U.pathFromRoot.lastIndexOf("/$defs")),Y=Math.max(K.pathFromRoot.lastIndexOf("/definitions"),K.pathFromRoot.lastIndexOf("/$defs"));if(H!==Y)return Y-H;else return U.pathFromRoot.length-K.pathFromRoot.length}});let G,Q,J;for(let U of Z){let K=X.bundle||{};if(!U.external){if(K.optimizeInternalRefs!==!1&&!U.nestedResource)U.$ref.$ref=U.hash}else if(U.file===G&&U.hash===Q)if(W&&d4(Z,U))U.$ref.$ref=W+J;else U.$ref.$ref=J;else if(U.file===G&&U.hash.indexOf(Q+"/")===0){let H=H2.join(J,H2.parse(U.hash.replace(Q,"#")));if(W&&d4(Z,U))U.$ref.$ref=W+H;else U.$ref.$ref=H}else if(G=U.file,Q=U.hash,J=U.pathFromRoot,U.$ref=U.parent[U.key]=a.dereference(U.$ref,U.value,X),U.circular)U.$ref.$ref=U.pathFromRoot}}function fZ(Z,X,W){for(let G of Z)if(G&&G.parent===X&&G.key===W)return G;return}function cZ(Z,X){let W=Z.indexOf(X);Z.splice(W,1)}function dZ(Z,X){for(let W of Z){if(!W.$ref||typeof W.$ref!=="object"||!("$ref"in W.$ref))continue;let G=W.$ref.$ref;if(typeof G!=="string"||!G.startsWith("#/"))continue;let Q=pZ(X,G);if(Q!==G)W.$ref.$ref=Q}}function pZ(Z,X){if(!X.startsWith("#/"))return X;let W=X.slice(2).split("/"),G=Z,Q=[];for(let U of W){if(G===null||G===void 0||typeof G!=="object")return X;if("$ref"in G&&typeof G.$ref==="string"&&G.$ref.startsWith("#/")){let Y=G.$ref.slice(2).split("/");if(Q.length=0,Q.push(...Y),G=lZ(Z,G.$ref),G===null||G===void 0||typeof G!=="object")return X}let K=U.replace(/~1/g,"/").replace(/~0/g,"~"),H=Array.isArray(G)?parseInt(K):K;G=G[H],Q.push(U)}return"#/"+Q.join("/")}function lZ(Z,X){if(!X.startsWith("#/"))return;let W=X.slice(2).split("/"),G=Z;for(let Q of W){if(G===null||G===void 0||typeof G!=="object")return;let J=Q.replace(/~1/g,"/").replace(/~0/g,"~"),U=Array.isArray(G)?parseInt(J):J;G=G[U]}return G}function d4(Z,X){for(let W of Z){if(W.pathFromRoot==="#"||W.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(W.pathFromRoot+"/")){if(W.value&&typeof W.value==="object"&&"$id"in W.value)return!0}}return!1}var p4;var l4=c(()=>{A0();E0();q2();W0();p4=hZ});function iZ(Z,X){let W=Date.now(),G=Z.$refs._root$Ref.dynamicIdScope?U2(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,Q=v8(Z.schema,Z.$refs._root$Ref.path,G,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,W,0);Z.$refs.circular=Q.circular,Z.schema=Q.value}function v8(Z,X,W,G,Q,J,U,K,H,Y,q,B){let M,F={value:Z,circular:!1};n4(q,Y);let D=Y.dereference||{},w=D.maxDepth??500;if(B>w)throw RangeError(`Maximum dereference depth (${w}) exceeded at ${Q}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let A=D.excludedPathMatcher||(()=>!1);if(D?.circular==="ignore"||!U.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!A(Q)){J.add(Z),U.add(Z);let C=W;if(a.isAllowed$Ref(Z,Y))M=i4(Z,X,C,G,Q,J,U,K,H,Y,q,B),F.circular=M.circular,F.value=M.value;else for(let E of Object.keys(Z)){n4(q,Y);let y=H2.join(X,E),h=H2.join(Q,E);if(A(h))continue;let f=Z[E],X2=G&&f&&typeof f==="object"&&!ArrayBuffer.isView(f)?U2(C,f):C,u;if(a.isAllowed$Ref(f,Y)){if(M=i4(f,y,X2,G,h,J,U,K,H,Y,q,B),u=M.circular,Z[E]!==M.value){let b=new Map;if(D?.preservedProperties){if(typeof Z[E]==="object"&&!Array.isArray(Z[E]))D?.preservedProperties.forEach((W2)=>{if(W2 in Z[E])b.set(W2,Z[E][W2])})}let o=M.value;if(D?.cloneReferences&&!u&&o&&typeof o==="object")o=structuredClone(o);if(Z[E]=o,D?.preservedProperties){if(b.size&&typeof Z[E]==="object"&&!Array.isArray(Z[E]))b.forEach((W2,E2)=>{Z[E][E2]=W2})}D?.onDereference?.(f.$ref,Z[E],Z,E)}}else if(!J.has(f)){if(M=v8(f,y,X2,G,h,J,U,K,H,Y,q,B+1),u=M.circular,Z[E]!==M.value)Z[E]=M.value}else u=I1(y,H,Y);F.circular=F.circular||u}J.delete(Z)}}return F}function i4(Z,X,W,G,Q,J,U,K,H,Y,q,B){let D=a.isExternal$Ref(Z)&&Y?.dereference?.externalReferenceResolution==="root"?z0():G?W:X,w=e(D,Z.$ref),A=K.get(w);if(A){if(!A.circular){let X2=Object.keys(Z);if(X2.length>1){let u={};for(let b of X2)if(b!=="$ref"&&!(b in A.value))u[b]=Z[b];return{circular:A.circular,value:Object.assign({},A.value,u)}}return A}if(typeof A.value==="object"&&"$ref"in A.value&&"$ref"in Z){if(A.value.$ref===Z.$ref)return I1(X,H,Y),A}else return I1(X,H,Y),A}let C=H._resolve(w,X,Y);if(C===null)return{circular:!1,value:null};let E=C.circular,y=E||C.chainCircular||J.has(C.value);if(y)I1(X,H,Y);let h=a.dereference(Z,C.value,Y);if(!y){let X2=v8(h,C.path,C.$ref.path,C.$ref.dynamicIdScope,Q,J,U,K,H,Y,q,B+1);y=X2.circular,h=X2.value}if(y&&!E&&Y.dereference?.circular==="ignore")h=Z;if(E&&h!==Z)h.$ref=Q;let f={circular:y,value:h};if(Object.keys(Z).length===1)K.set(w,f);return f}function n4(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new t1(X.timeoutMs)}}function I1(Z,X,W){if(X.circular=!0,W?.dereference?.onCircular?.(Z),!W.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var o4;var r4=c(()=>{A0();E0();q2();W0();O2();o4=iZ});function nZ(){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 y8;var s4=c(()=>{y8=nZ()});function D2(Z,X){if(Z){X.then(function(W){y8(function(){Z(null,W)})},function(W){y8(function(){Z(W)})});return}else return X}var a4=c(()=>{s4()});class c2{schema=null;$refs=new k0;async parse(){let Z=v0(arguments),X;if(!Z.path&&!Z.schema){let G=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return D2(Z.callback,Promise.reject(G))}this.schema=null,this.$refs=new k0;let W="http";if(Y1(Z.path))Z.path=R9(Z.path),W="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let G=F0(Z.schema.$id),Q=G.port??(G.protocol==="https:"?443:80);Z.path=`${G.protocol}//${G.hostname}:${Q}`}if(Z.path=e(z0(),Z.path),Z.schema&&typeof Z.schema==="object"){let G=this.$refs._add(Z.path);G.value=Z.schema,G.pathType=W,G.dynamicIdScope=B1(G.value),M1(this.$refs,G.path,G.value,G.pathType,G.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=D1(Z.path,this.$refs,Z.options);try{let G=await X;if(G!==null&&typeof G==="object"&&!Buffer.isBuffer(G))return this.schema=G,D2(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,D2(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||!x2(G))return D2(Z.callback,Promise.reject(G));if(this.$refs._$refs[Z2(Z.path)])this.$refs._$refs[Z2(Z.path)].addError(G);return D2(Z.callback,Promise.resolve(null))}}static parse(){let Z=new c2;return Z.parse.apply(Z,arguments)}async resolve(){let Z=v0(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await u4(this,Z.options),m8(this),D2(Z.callback,Promise.resolve(this.$refs))}catch(X){return D2(Z.callback,Promise.reject(X))}}static resolve(){let Z=new c2;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new c2;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=v0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),p4(this,Z.options),m8(this),D2(Z.callback,Promise.resolve(this.schema))}catch(X){return D2(Z.callback,Promise.reject(X))}}static dereference(){let Z=new c2;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=v0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),o4(this,Z.options),m8(this),D2(Z.callback,Promise.resolve(this.schema))}catch(X){return D2(Z.callback,Promise.reject(X))}}}function m8(Z){if(D0.getParserErrors(Z).length>0)throw new D0(Z)}var RX,PX,xX,t4;var e4=c(()=>{g9();G8();h4();f4();l4();r4();q2();x8();S8();O2();a4();W0();k8();q2();RX=c2.parse,PX=c2.resolve,xX=c2.bundle,t4=c2.dereference});async function h8(Z,X={}){let{baseUrl:W="/_jx/server"}=X,G=await t4(Z),Q=L9(G);if(Q.length===0)return null;let J=Q.map(({exportName:K,src:H})=>`import { ${K} } from '${H}'`).join(`
|
|
56
|
+
`),U=Q.map(({exportName:K})=>Z6(K,W)).join(`
|
|
57
57
|
`);return`// Generated by @jxsuite/compiler — do not edit manually
|
|
58
58
|
// Deploy as a Cloudflare Worker, Node server, or Bun process.
|
|
59
59
|
// Requires: npm install hono
|
|
@@ -65,8 +65,8 @@ const app = new Hono()
|
|
|
65
65
|
${U}
|
|
66
66
|
|
|
67
67
|
export default app
|
|
68
|
-
`}function
|
|
69
|
-
`),K=
|
|
68
|
+
`}function oZ(Z,X={}){let{baseUrl:W="/_jx/server",adapter:G=null,mounts:Q=[],connectors:J=[]}=X;if(Z.length===0&&Q.length===0&&!G)return null;let U=Z.map(({exportName:q,src:B})=>`import { ${q} } from '${B}'`).join(`
|
|
69
|
+
`),K=rZ(Q,J),H=Z.map(({exportName:q})=>Z6(q,W)).join(`
|
|
70
70
|
`),Y=G==="cloudflare-workers"||G==="cloudflare-pages"?`
|
|
71
71
|
app.all('*', (c) => c.env.ASSETS.fetch(c.req.raw))
|
|
72
72
|
`:`
|
|
@@ -78,11 +78,11 @@ const app = new Hono()
|
|
|
78
78
|
${K.routes}${H}
|
|
79
79
|
${Y}
|
|
80
80
|
export default app
|
|
81
|
-
`}function
|
|
81
|
+
`}function rZ(Z,X){if(Z.length===0)return{imports:"",routes:""};let W=Z.toSorted((J,U)=>J.order-U.order),G=[];for(let J of W)G.push(`import { ${J.className} } from '${J.module}'`);for(let J of X)G.push(`import { ${J.className} } from '${J.module}'`);let Q=["// Extension server mounts (specs/extensions.md §11): one shared ctx, mounted in order.","const jxCtx = {}",`const jxConnectors = { ${X.map((J)=>`${JSON.stringify(J.provider)}: ${J.className}`).join(", ")} }`];for(let[J,U]of W.entries()){let K=JSON.stringify(U.options);Q.push(`const jxMount${J} = await ${U.className}.mount({ ...${K}, connectors: jxConnectors }, jxCtx)`,`app.all('${U.basePath}/*', (c) => jxMount${J}(c.req.raw, c.env))`,`app.all('${U.basePath}', (c) => jxMount${J}(c.req.raw, c.env))`)}return{imports:`
|
|
82
82
|
${G.join(`
|
|
83
83
|
`)}`,routes:`${Q.join(`
|
|
84
84
|
`)}
|
|
85
|
-
`}}function
|
|
85
|
+
`}}function Z6(Z,X){return`
|
|
86
86
|
app.post('${X}/${Z}', async (c) => {
|
|
87
87
|
const args = await c.req.json().catch(() => ({}))
|
|
88
88
|
try {
|
|
@@ -90,7 +90,7 @@ app.post('${X}/${Z}', async (c) => {
|
|
|
90
90
|
} catch (e) {
|
|
91
91
|
return c.json({ ok: false, error: e?.message ?? 'Server error' }, 500)
|
|
92
92
|
}
|
|
93
|
-
})`}var
|
|
93
|
+
})`}var u8=c(()=>{e4();X0()});function sZ(Z){return Z instanceof Error?Z.message:String(Z)}function f8(Z,X,W){let G;try{G=JSON.parse(Z)}catch(Q){throw Error(`Failed to parse ${W} at ${X}: ${sZ(Q)}`,{cause:Q})}if(!F2(G))throw Error(`Invalid ${W} at ${X}: expected a JSON object`);return G}function w1(Z,X){return f8(Z,X,"Jx document")}function vX(Z,X){return f8(Z,X,"project config")}function yX(Z,X){return f8(Z,X,"class definition")}var c8=c(()=>{o2()});class O1{name;classPath;classDef;extensions;mediaType;documentKinds;exportTarget;remote;studio;project;server;connector;capabilities;#X;#Z=null;constructor(Z,X,W,G){this.name=Z,this.classPath=X,this.classDef=W,this.#X=G;let{format:Q}=W;this.extensions=(Q?.extensions??[]).map((J)=>J.toLowerCase()),this.mediaType=Q?.mediaType??null,this.documentKinds=Q?.documentKinds??[],this.exportTarget=Q?.exportTarget===!0,this.remote=Q?.remote===!0,this.studio=W.$studio??null,this.project=W.project??null,this.server=W.server??null,this.connector=W.connector??null,this.capabilities=tZ(W)}implementation(){if(!this.#Z){let Z=this.classDef.$implementation;if(!Z)return Promise.reject(Error(`Format class "${this.name}" has no $implementation to import`));this.#Z=this.#X.importModule(this.#X.resolvePath(this.classPath,Z))}return this.#Z}async call(Z,...X){let W=this.capabilities[Z];if(!W)throw Error(`Format class "${this.name}" does not declare a "${Z}" capability`);let G=await this.implementation(),Q=this.classDef.title??this.name,J=G[Q]??G.default?.[Q]??G.default,U=J?.[W.identifier];if(typeof U!=="function")throw TypeError(`Format class "${this.name}": implementation export "${Q}" has no static "${W.identifier}" method`);return await U.call(J,...X)}}class T1{#X;constructor(Z){this.#X=Z;for(let X of z6){let W=new Map;for(let G of Z){if(!G.capabilities[X])continue;for(let Q of G.extensions){let J=W.get(Q);if(J)throw Error(`Format conflict: "${J.name}" and "${G.name}" both claim "${Q}" with the "${X}" capability`);W.set(Q,G)}}}}get entries(){return this.#X}byExtension(Z,X){let W=X6(Z);return this.#X.find((G)=>G.extensions.includes(W)&&(!X||G.capabilities[X]))}byName(Z){return this.#X.find((X)=>X.name===Z)}withCapability(Z){return this.#X.filter((X)=>X.capabilities[Z])}documentExtensions(Z){let X=new Set;for(let W of this.#X){if(Z&&!W.documentKinds.includes(Z))continue;for(let G of W.extensions)X.add(G)}return X.delete(".json"),[...X]}has(Z){let X=X6(Z);return this.#X.some((W)=>W.extensions.includes(X))}}function tZ(Z){let X={},W=Z.$defs?.methods??{};for(let[G,Q]of Object.entries(W)){let J=Q.role;if(!J||!W6.includes(J))continue;let U={identifier:Q.identifier??G,timing:Q.timing??aZ};if(typeof Q.discriminator==="string")U.discriminator=Q.discriminator;X[J]=U}return X}function X6(Z){let X=Z.toLowerCase();return X.startsWith(".")?X:`.${X}`}var z6,W6,aZ;var d8=c(()=>{z6=["parse","serialize","discover","load"],W6=[...z6,"projectData","resolvePaths","lower","emit","assets","mount","dialect","deploySchema","bindings","testConnection"],aZ=["compiler","server"]});class G6{#X;#Z;#z;constructor(Z){this.#X=Z,this.#Z=Z.flatMap((Q)=>Q.classes);let X=new Map;for(let Q of Z)for(let J of Q.classes){let U=X.get(J.name);if(U&&U!==Q.specifier)throw Error(`Extension conflict: "${U}" and "${Q.specifier}" both provide a class named "${J.name}"`);X.set(J.name,Q.specifier)}let W=new Map;for(let Q of this.#Z){if(!Q.project)continue;let J=W.get(Q.project.key);if(J)throw Error(`Extension conflict: "${J.name}" and "${Q.name}" both claim the project section "${Q.project.key}"`);W.set(Q.project.key,Q)}let G=new Map;for(let Q of this.#Z){if(!Q.server)continue;let{basePath:J}=Q.server;if(!J.startsWith("/_jx/"))throw Error(`Extension "${Q.name}": server basePath "${J}" must be under /_jx/`);let U=G.get(J);if(U)throw Error(`Extension conflict: "${U.name}" and "${Q.name}" both mount "${J}"`);G.set(J,Q)}this.#z=new T1(this.#Z.filter((Q)=>Q.extensions.length>0))}get extensions(){return this.#X}get classes(){return this.#Z}get formats(){return this.#z}byName(Z){return this.#Z.find((X)=>X.name===Z)}projectContributions(){return this.#Z.filter((Z)=>Z.project!==null)}byProjectKey(Z){return this.#Z.find((X)=>X.project?.key===Z)}byPathsDiscriminator(Z){return this.#Z.find((X)=>X.capabilities.resolvePaths?.discriminator===Z)}emitters(){return this.#Z.filter((Z)=>Z.capabilities.emit!==void 0)}assetProviders(){return this.#Z.filter((Z)=>Z.capabilities.assets!==void 0)}serverMounts(){return this.#Z.filter((Z)=>Z.server!==null).toSorted((Z,X)=>(Z.server?.order??100)-(X.server?.order??100)||Z.name.localeCompare(X.name))}connectors(){return this.#Z.filter((Z)=>Z.connector!==null)}schemaFragments(Z){return this.#X.map((X)=>X.schemas[Z]).filter((X)=>typeof X==="string")}}async function Q6(Z,X,W){let G=[];for(let Q of Z??[])G.push(await eZ(Q,X,W));return new G6(G)}async function eZ(Z,X,W){let G;if(Z.startsWith("./")||Z.startsWith("../")){let K=X.resolvePath(W,Z);G=X.resolvePath(`${K}/package.json`,`./${_1}`)}else try{G=X.resolvePath(W,`${Z}/${_1}`)}catch(K){throw Error(`Extension "${Z}" is not resolvable: it must export ${_1} (is the package installed, and does its exports map include it?): ${p8(K)}`,{cause:K})}let Q;try{Q=await X.loadJson(G)}catch(K){throw Error(`Extension "${Z}": cannot read manifest ${G}: ${p8(K)}`,{cause:K})}if(!Q||typeof Q!=="object"||typeof Q.name!=="string")throw Error(`Extension "${Z}": ${_1} must declare a "name"`);if(!Z.startsWith(".")&&Q.name!==Z)throw Error(`Extension "${Z}": manifest name "${Q.name}" does not match the specifier`);let J=[];for(let[K,H]of Object.entries(Q.classes??{})){let Y=X.resolvePath(G,H),q;try{q=await X.loadJson(Y)}catch(B){throw Error(`Extension "${Z}": cannot read class "${K}" at ${Y}: ${p8(B)}`,{cause:B})}J.push(new O1(K,Y,q,X))}let U={};if(Q.schemas?.project)U.project=X.resolvePath(G,Q.schemas.project);if(Q.schemas?.document)U.document=X.resolvePath(G,Q.schemas.document);if(Q.schemas?.fields)U.fields=X.resolvePath(G,Q.schemas.fields);return{specifier:Z,manifestPath:G,manifest:Q,classes:J,schemas:U}}function p8(Z){return Z instanceof Error?Z.message:String(Z)}var _1="jx-extension.json";var J6=c(()=>{d8();d8()});var i8={};X9(i8,{unknownFormatError:()=>Q7,importImplementation:()=>K6,createNodeFormatIO:()=>V6,buildProjectFormatRegistry:()=>W7,buildProjectExtensionRegistry:()=>q6,buildExtensionsPayload:()=>G7});import{readFileSync as Y6}from"node:fs";import{dirname as Z7,isAbsolute as X7,resolve as l8,sep as N1}from"node:path";import{pathToFileURL as z7}from"node:url";import{createRequire as U6}from"node:module";async function K6(Z){let X=[Z],W=`${N1}src${N1}`,G=`${N1}dist${N1}`;if(Z.includes(W))X.push(Z.replace(W,G));if(Z.endsWith(".js"))X.push(`${Z.slice(0,-3)}.ts`);let Q;for(let J of X)try{return await import(z7(J).href)}catch(U){Q=U}throw Q instanceof Error?Q:Error(String(Q))}function V6(Z){return{importModule:(X)=>K6(X),loadJson:async(X)=>JSON.parse(Y6(X,"utf8")),resolvePath:(X,W)=>{if(W.startsWith("./")||W.startsWith("../"))return l8(Z7(X),W);if(X7(W))return W;let G=U6(l8(Z,"package.json"));try{return G.resolve(W)}catch{return U6(import.meta.url).resolve(W)}}}}async function q6(Z,X){return Q6(X?.extensions,V6(Z),l8(Z,"project.json"))}async function W7(Z,X){return(await q6(Z,X)).formats}function G7(Z){let X=[];for(let W of Z.extensions){let G={};if(W.schemas.project)try{G=JSON.parse(Y6(W.schemas.project,"utf8")).properties??{}}catch{G={}}let Q=[];for(let J of W.classes){if(!J.project)continue;Q.push({className:J.name,entrySchema:G[J.project.key]??null,project:J.project,studio:J.studio})}X.push({classes:W.classes.map((J)=>{let U=J.studio?.stateDefaults,K=J.project===null&&J.server===null&&J.connector===null&&J.extensions.length===0;return{name:J.name,path:J.classPath,...K?{state:!0}:{},...U&&typeof U==="object"?{stateDefaults:U}:{}}}),contributions:Q,name:W.manifest.name,specifier:W.specifier,...W.manifest.title===void 0?{}:{title:W.manifest.title},...W.manifest.description===void 0?{}:{description:W.manifest.description}})}return X}function Q7(Z,X){return Error(`No format class registered for "${X}" (${Z}). Enable an extension providing this format in project.json "extensions", e.g. "@jxsuite/parser".`)}var n8=c(()=>{J6()});async function B6(Z,X={}){let{resolveElementPath:W,$media:G,formats:Q}=X,J=[],U=new Set;async function K(H,Y){let q,B;if(typeof H==="string"){let{readFileSync:h}=await import("node:fs"),{resolve:f}=await import("node:path");if(B=Y?f(Y,H):f(H),U.has(B))return;if(U.add(B),B.endsWith(".json"))q=w1(h(B,"utf8"),B);else{let{extname:X2}=await import("node:path"),u=X2(B).toLowerCase(),b=Q?.byExtension?.(u,"parse");if(!b){let{unknownFormatError:o}=await Promise.resolve().then(() => (n8(),i8));throw o(B,u)}q=await b.call("parse",h(B,"utf8"))}}else{if(q=H,B=null,q.tagName&&U.has(q.tagName))return;if(q.tagName)U.add(q.tagName)}let{tagName:M}=q;if(!M||!M.includes("-"))throw Error(`compileElement: tagName "${M}" must contain a hyphen`);let{dirname:F}=await import("node:path"),D=B?F(B):null,w=[];if(Array.isArray(q.$elements))for(let h of q.$elements){let f=T2(h)?h.$ref:h;if(typeof f!=="string")continue;if(D)await K(f,D);let X2=W?W(f,D):f.replace(/\.json$/,".js");w.push(X2)}let A=J1(M);if(G)q.$media={...G,...q.$media};let{rewriteSrc:C}=X,E=y0(q,A,w,C?(h)=>C(h,D):void 0),y=B?B.replace(/\.json$/,".js"):`${M}.js`;J.push({content:E,path:y,tagName:M})}return await K(Z,X.basePath??null),{files:J}}async function J7(Z,X={}){let{title:W="Jx App",reactivitySrc:G="https://esm.sh/@vue/reactivity@3.5.13",litHtmlSrc:Q="https://esm.sh/lit-html@3.3.0"}=X,J=await B6(Z,X),U=J.files.at(-1);if(!U)throw Error("compileElementPage: no element modules were produced");let{basename:K}=await import("node:path"),H=K(U.path),Y=`<!DOCTYPE html>
|
|
94
94
|
<html lang="en">
|
|
95
95
|
<head>
|
|
96
96
|
<meta charset="utf-8">
|
|
@@ -109,27 +109,27 @@ app.post('${X}/${Z}', async (c) => {
|
|
|
109
109
|
<${U.tagName}></${U.tagName}>
|
|
110
110
|
<script type="module" src="./${H}"></script>
|
|
111
111
|
</body>
|
|
112
|
-
</html>`;return{files:J.files,html:Y}}function
|
|
113
|
-
`)}function
|
|
114
|
-
`)}function
|
|
112
|
+
</html>`;return{files:J.files,html:Y}}function U7(Z){if(Z===null||typeof Z!=="object"||Array.isArray(Z))return JSON.stringify(Z);if("default"in Z)return JSON.stringify(Z.default);if(i2(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 y0(Z,X,W,G){let Q=["// Generated by @jxsuite/compiler — do not edit manually"];if(Z.$id)Q.push(`// Source: ${Z.$id}`);for(let F of W)Q.push(`import '${F}';`);let J=new Map,U=Z.state??{};for(let[F,D]of Object.entries(U)){let w=D;if(w&&typeof w==="object"&&!Array.isArray(w)&&w.$prototype==="Function"&&w.$src){let A=w.$src;if(!J.has(A))J.set(A,[]);J.get(A).push(F)}}for(let[F,D]of J){let w=G?G(F):F;Q.push(`import { ${D.join(", ")} } from '${w}';`)}Q.push("import { reactive, computed, effect } from '@vue/reactivity';","import { render, html } from 'lit-html';","",`class ${X} extends HTMLElement {`," #dispose = null;",""," constructor() {"," super();");let K=[],H=[],Y=[],q=[];for(let[F,D]of Object.entries(U)){let w=D;if(L2(w)){let A=w.$expression;if(Z0(w))q.push([F,w]);else if(l2(A.operator))Y.push([F,w]);else H.push([F,w])}else if(j2(w))if(typeof w.body==="string"&&w.body.includes("return"))H.push([F,w]);else Y.push([F,w]);else{let A=U7(w);if(A!==void 0)K.push([F,A])}}Q.push(" this.state = reactive({");for(let[F,D]of K)Q.push(` ${F}: ${D},`);Q.push(" });");for(let[F,D]of Y)if(Q.push(""),L2(D)){let w=J2(D.$expression,{eventParam:"e",statePrefix:"s"});Q.push(` this.state.${F} = (s, e) => { ${w}; };`)}else if(C2(D)){let w=A2(D.body,{dispatchTarget:"this",eventParam:"e",indent:" ",statePrefix:"this.state"});Q.push(` this.state.${F} = (s, e) => {`,w," };")}else{let A=(D.parameters?n2(D.parameters):D.arguments??["state"]).join(", ");if(D.$src)Q.push(` this.state.${F} = (${A}) => ${F}(${A});`);else Q.push(` this.state.${F} = (${A}) => {`,` ${typeof D.body==="string"?D.body:""}`," };")}for(let[F,D]of q){Q.push("");let w=J2(D.$expression,{eventParam:"e",statePrefix:"this.state"});Q.push(` this.state.${F} = ${R0(D,w)};`)}for(let[F,D]of H)if(Q.push(""),L2(D)){let w=J2(D.$expression,{eventParam:"e",statePrefix:"this.state"});Q.push(` this.state.${F} = computed(() => ${w});`)}else if(D.$src)Q.push(` this.state.${F} = computed(() => ${F}(this.state));`);else{Q.push(` this.state.${F} = computed(() => {`);let w=(typeof D.body==="string"?D.body:"").replaceAll("state.","this.state.");Q.push(` ${w}`," });")}Q.push(" }","");let B=[];if(Array.isArray(Z.children)){let F={n:0};for(let D of Z.children)H0(D,B,Z.$media??{},"",F,Z.tagName)}if(Q.push(" template() {"," const s = this.state;"," return html`",r8(Z.children,Z.style," ")," `;"," }",""," connectedCallback() {"," const _pa = this.getAttribute('data-jx-props');"," if (_pa) {"," try {"," const _p = JSON.parse(_pa);"," for (const [k, v] of Object.entries(_p)) {"," if (k in this.state) this.state[k] = v;"," }"," } catch {}"," this.removeAttribute('data-jx-props');"," }"," for (const key of Object.keys(this.state)) {"," if (this.hasOwnProperty(key) && this[key] !== undefined) {"," this.state[key] = this[key];"," }"," }"),Z.style&&typeof Z.style==="object"){let F=[];for(let[D,w]of Object.entries(Z.style)){if(D.startsWith(":")||D.startsWith(".")||D.startsWith("&")||D.startsWith("[")||D.startsWith("@"))continue;if(w===null||typeof w==="object")continue;let A=V2(D);if(typeof w==="string"&&w.includes("${"))F.push([A,w])}if(F.length>0){Q.push(" effect(() => {");for(let[D,w]of F){let A=w.replaceAll(/\$\{([^}]+)\}/g,(C,E)=>`\${${E.replaceAll("state.","this.state.")}}`);Q.push(` this.style['${D}'] = \`${A}\`;`)}Q.push(" });")}}let M=$6(Z.children);if(M)Q.push(" const _slotted = Array.from(this.childNodes).filter(n => n.nodeType === 1 || (n.nodeType === 3 && n.textContent.trim()));");if(Q.push(" if (this.hasAttribute('data-jx-prerendered')) {"," this.removeAttribute('data-jx-prerendered');"," }"," this.innerHTML = '';"," this.#dispose = effect(() => render(this.template(), this));"),M)Q.push(" const _slot = this.querySelector('slot');"," if (_slot && _slotted.length > 0) {"," for (const n of _slotted) _slot.before(n);"," _slot.remove();"," }");return Q.push(" if (typeof this.state.onMount === 'function') {"," queueMicrotask(() => this.state.onMount(this.state));"," }"," }",""," disconnectedCallback() {"," if (this.#dispose) { this.#dispose(); this.#dispose = null; }"," if (typeof this.state.onUnmount === 'function') { this.state.onUnmount(this.state); }"," }","}","",`customElements.define('${Z.tagName}', ${X});`,""),Q.join(`
|
|
113
|
+
`)}function r8(Z,X,W){if(!Z)return"";if(K2(Z))return H6(Z,W);if(!Array.isArray(Z))return"";return Z.map((G)=>K2(G)?H6(G,W):M6(G,W)).join(`
|
|
114
|
+
`)}function M6(Z,X){if(typeof Z==="string"){if(Z.includes("${"))return`${X}${o8(Z)}`;return`${X}${p(Z)}`}if(typeof Z==="number"||typeof Z==="boolean")return`${X}${p(String(Z))}`;if(!Z||typeof Z!=="object")return"";let W=Z.tagName??"div",G=[];if(Z.attributes)for(let[H,Y]of Object.entries(Z.attributes))if(Y&&typeof Y==="object"&&T2(Y))G.push(`${H}="\${${d2(Y.$ref)}}"`);else if(typeof Y==="string"&&Y.includes("${"))G.push(`${H}="${j1(Y)}"`);else G.push(`${H}="${Y}"`);if(Z.id)G.push(`id="${Z.id}"`);if(Z.className)G.push(`class="${Z.className}"`);for(let[H,Y]of Object.entries(Z)){if(r2.has(H)||H.startsWith("$")||H.startsWith("on")||H==="tagName"||H==="id"||H==="className"||H==="style"||H==="children"||H==="textContent"||H==="innerHTML"||H==="attributes")continue;if(Y&&typeof Y==="object"&&Y.$ref)G.push(`.${H}="\${${d2(Y.$ref)}}"`);else if(typeof Y==="string"&&Y.includes("${"))G.push(`.${H}="${j1(Y)}"`)}if(Z.$props)for(let[H,Y]of Object.entries(Z.$props))if(Y&&typeof Y==="object"&&Y.$ref)G.push(`.${H}="\${${d2(Y.$ref)}}"`);else G.push(`.${H}="\${${JSON.stringify(Y)}}"`);for(let[H,Y]of Object.entries(Z)){if(!H.startsWith("on")||H==="observedAttributes")continue;let q=H.slice(2).toLowerCase();if(Y&&typeof Y==="object"&&Y.$ref)G.push(`@${q}="\${(e) => ${d2(Y.$ref)}(s, e)}"`);else if(Y&&typeof Y==="object"&&"$expression"in Y){let B=J2(Y.$expression,{eventParam:"e",statePrefix:"s"});G.push(`@${q}="\${(e) => { ${B}; }}"`)}else if(j2(Y))G.push(`@${q}="\${(e) => { ${K7(Y)} }}"`)}let Q=F6(Z.style);if(Q)G.push(`style="${Q}"`);let J=G.length>0?`
|
|
115
115
|
${X} ${G.join(`
|
|
116
116
|
${X} `)}`:"";if(new Set(["input","br","hr","img","meta","link"]).has(W))return`${X}<${W}${J}
|
|
117
|
-
${X}>`;let K="";if(Z.$switch){let H=T2(Z.$switch)?Z.$switch.$ref:Z.$switch,Y=d2(H),q=Z.cases??{},B=[];for(let[M,F]of Object.entries(q)){if(!F||T2(F))continue;let D=
|
|
117
|
+
${X}>`;let K="";if(Z.$switch){let H=T2(Z.$switch)?Z.$switch.$ref:Z.$switch,Y=d2(H),q=Z.cases??{},B=[];for(let[M,F]of Object.entries(q)){if(!F||T2(F))continue;let D=M6(F,`${X} `);B.push(` ${JSON.stringify(M)}: html\`
|
|
118
118
|
${D}
|
|
119
119
|
\``)}K=`\${{
|
|
120
120
|
${B.join(`,
|
|
121
121
|
`)}
|
|
122
|
-
}[${Y}]}`}else if(Z.textContent!==void 0)K=
|
|
123
|
-
${
|
|
122
|
+
}[${Y}]}`}else if(Z.textContent!==void 0)K=o8(Z.textContent);else if(Z.innerHTML!==void 0)K=Z.innerHTML;else if(Z.children)K=`
|
|
123
|
+
${r8(Z.children,Z.style,`${X} `)}
|
|
124
124
|
${X}`;return`${X}<${W}${J}
|
|
125
|
-
${X}>${K}</${W}>`}function
|
|
125
|
+
${X}>${K}</${W}>`}function H6(Z,X){let W=T2(Z.items)?d2(Z.items.$ref):"ITEMS",G=Z.map;if(!G)return"";let Q=G.tagName??"div",J=[];if(G.$props)for(let[Y,q]of Object.entries(G.$props))if(T2(q))J.push(`.${Y}="\${${Y7(q.$ref)}}"`);else J.push(`.${Y}="\${${JSON.stringify(q)}}"`);let U=F6(G.style);if(U)J.push(`style="${U}"`);for(let[Y,q]of Object.entries(G)){if(!Y.startsWith("on"))continue;let B=Y.slice(2).toLowerCase();if(T2(q))J.push(`@${B}="\${(e) => ${d2(q.$ref)}(s, e)}"`);else if(L2(q)){let M=J2(q.$expression,{eventParam:"e",statePrefix:"s"});J.push(`@${B}="\${(e) => { ${M}; }}"`)}}let K=J.length>0?`
|
|
126
126
|
${X} ${J.join(`
|
|
127
|
-
${X} `)}`:"",H="";if(G.textContent!==void 0)H=
|
|
128
|
-
${
|
|
127
|
+
${X} `)}`:"",H="";if(G.textContent!==void 0)H=o8(G.textContent);else if(G.children)H=`
|
|
128
|
+
${r8(G.children,null,`${X} `)}
|
|
129
129
|
${X} `;return`${X}\${${W}.map((item, index) => html\`
|
|
130
130
|
${X} <${Q}${K}
|
|
131
131
|
${X} >${H}</${Q}>
|
|
132
|
-
${X}\`)}`}function d2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return`s.${Z}`}function
|
|
132
|
+
${X}\`)}`}function d2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return`s.${Z}`}function Y7(Z){if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return d2(Z)}function j1(Z){return Z.replaceAll("state.","s.")}function o8(Z){if(Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string")return`\${${d2(Z.$ref)}}`;if(typeof Z==="string"&&Z.includes("${"))return j1(Z);return String(Z)}function K7(Z){if(C2(Z))return A2(Z.body,{dispatchTarget:"e.currentTarget",eventParam:"e",statePrefix:"s"});return(typeof Z.body==="string"?Z.body:"").replaceAll(/(?<!this\.)state\./g,"s.").replaceAll(/(?<!this\.)state(?!\.)/g,"s")}function F6(Z){if(!Z||typeof Z!=="object")return"";let X=[];for(let[W,G]of Object.entries(Z)){if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")||W.startsWith("@"))continue;if(G===null||typeof G==="object")continue;if(typeof G==="string"&&G.includes("${")){let Q=V2(W);X.push(`${Q}: ${j1(G)}`)}}return X.join("; ")}function $6(Z){if(!Array.isArray(Z))return!1;for(let X of Z){if(!X||typeof X!=="object")continue;if(X.tagName==="slot")return!0;if($6(X.children))return!0}return!1}var C1=c(()=>{C0();X0();o2();c8()});function D6(Z,X){let{title:W="Jx App",reactivitySrc:G,litHtmlSrc:Q}=X,J=B0(Z,null,Z.state??{},Z.$media??{}),U=M0(Z,Z.$media??{},X.projectStyle??null),K=[],H=L6(Z,!1,Z,J,K),Y=[],q="",B="";if(K.length>0){for(let D of K){let w=y0(D.def,D.className,[],X.rewriteSrc);Y.push({content:w,path:`_islands/${D.tagName}.js`,tagName:D.tagName})}q=`<script type="importmap">
|
|
133
133
|
{
|
|
134
134
|
"imports": {
|
|
135
135
|
"@vue/reactivity": "${G}",
|
|
@@ -151,10 +151,10 @@ ${X}\`)}`}function d2(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).repla
|
|
|
151
151
|
${H}
|
|
152
152
|
${B}
|
|
153
153
|
</body>
|
|
154
|
-
</html>`;return{files:Y,html:F}}function
|
|
155
|
-
`)}return""}var
|
|
154
|
+
</html>`;return{files:Y,html:F}}function L6(Z,X,W,G,Q){if(typeof Z==="string")return p(Z);if(typeof Z==="number"||typeof Z==="boolean")return p(String(Z));if(!Z||typeof Z!=="object")return"";let J=B0(W,G.scope,W?.state??G.scopeDefs,W?.$media??G.media);if(X){let Y=Q.length,q=`jx-island-${Y}`,B=`JxIsland${Y}`,M={...W??Z,tagName:q};return Q.push({className:B,def:M,tagName:q}),`<${q}></${q}>`}let U=Z.tagName??"div",K=q0(Z,J.scope);if(s1.has(U))return`<${U}${K}>`;let H=V7(Z,W,J,Q);return`<${U}${K}>${H}</${U}>`}function V7(Z,X,W,G){let Q=X??Z;if(Q.textContent!==void 0){let J=z2(Q.textContent,W.scope);return J==null?"":p(String(J))}if(Q.innerHTML)return z2(Q.innerHTML,W.scope)??Q.innerHTML;if(Array.isArray(Q.children)){let J=Array.isArray(X?.children)?X.children:void 0;return Q.children.map((U,K)=>{let H=U,Y=M9(H),q=J?.[K]??U;return L6(H,Y,q,W,G)}).join(`
|
|
155
|
+
`)}return""}var A6=c(()=>{X0();C1()});function a8(Z,X){let{title:W="Jx App",reactivitySrc:G=X1,litHtmlSrc:Q=z1,modulePath:J="app.js"}=X,U=B0(Z,null,Z.state??{},Z.$media??{}),K=M0(Z,Z.$media??{},X.projectStyle??null),H={h:0,l:0,m:0,needsLit:!1,s:0,sw:0,t:0},Y=new Map,q=new Map,B=[],M=[],F=[],D=[],w=[],A=new Map,C=Z.state??{};for(let[u,b]of Object.entries(C)){if(b===null||typeof b!=="object"||Array.isArray(b)){if(typeof b==="string"&&i(b))M.push([u,`() => \`${b}\``]);else B.push([u,b]);continue}if(L2(b)){let o=b.$expression,W2=J2(o,{eventParam:"e",statePrefix:"state"});if(Z0(b))w.push(`state[${JSON.stringify(u)}] = ${R0(b,W2)};`);else if(l2(o.operator))D.push([u,{args:["state","e"],body:W2}]);else M.push([u,`() => ${W2}`]);continue}if(j2(b)){let o=b.parameters?n2(b.parameters):b.arguments;if(C2(b)){let W2=A2(b.body,{eventParam:"e",statePrefix:"state"});if(b.parameters&&b.parameters.length>0)w.push(`state[${JSON.stringify(u)}] = ${R0(b,`(() => {
|
|
156
156
|
${W2}
|
|
157
|
-
})()`)};`);else D.push([u,{args:["state","e"],body:W2}])}else if(b.$src){if(!A.has(b.$src))A.set(b.$src,new Set);A.get(b.$src).add(u),M.push([u,`() => { return ${u}(state); }`])}else if(typeof b.body==="string"&&b.body.includes("return"))M.push([u,`() => { ${b.body} }`]);else D.push([u,{args:o??["state"],body:b.body}]);continue}if(i2(b))continue;if(
|
|
157
|
+
})()`)};`);else D.push([u,{args:["state","e"],body:W2}])}else if(b.$src){if(!A.has(b.$src))A.set(b.$src,new Set);A.get(b.$src).add(u),M.push([u,`() => { return ${u}(state); }`])}else if(typeof b.body==="string"&&b.body.includes("return"))M.push([u,`() => { ${b.body} }`]);else D.push([u,{args:o??["state"],body:b.body}]);continue}if(i2(b))continue;if(K9(b)){B.push([u,b.default]);continue}if(j0(b)){if(b.$prototype==="LocalStorage"||b.$prototype==="SessionStorage"){let o=b.$prototype==="LocalStorage"?"localStorage":"sessionStorage",W2=b.key??u,E2=b.default??null;B.push([u,null]),w.push(B7(u,o,W2,E2));continue}if(b.$prototype==="Request"){B.push([u,null]),w.push(H7(u,b));continue}if(b.$prototype==="Cookie"){B.push([u,null]),w.push(M7(u,b.name??u,b.default??null));continue}}B.push([u,b])}let E=I6(Z,Z,U,Y,q,H);for(let[u,b]of Y)if(!F.some(([o])=>o===u))F.push([u,b]);for(let[u,b]of q)if(!D.some(([o])=>o===u))D.push([u,b]);let y=q7(B,M,F,D,w,A,H,G,X.rewriteSrc),h=[` "@vue/reactivity": "${G}"`,` "lit-html": "${Q}"`],f=X.prePaintScheme!==!1&&Object.values(Z.$media??{}).some((u)=>s2(String(u))!==null)?`<script>${G1()}</script>
|
|
158
158
|
`:"",X2=`<!DOCTYPE html>
|
|
159
159
|
<html lang="en">
|
|
160
160
|
<head>
|
|
@@ -175,22 +175,22 @@ ${h.join(`,
|
|
|
175
175
|
<body>
|
|
176
176
|
${E}
|
|
177
177
|
</body>
|
|
178
|
-
</html>`;return{files:[{content:y,path:J}],html:X2}}function
|
|
178
|
+
</html>`;return{files:[{content:y,path:J}],html:X2}}function I6(Z,X,W,G,Q,J){if(typeof Z==="string")return p(Z);if(typeof Z==="number"||typeof Z==="boolean")return p(String(Z));if(!Z||typeof Z!=="object")return"";let U=B0(X,W.scope,X?.state??W.scopeDefs,X?.$media??W.media),K=Z.tagName??"div",H=[],Y=!1;if(Z.textContent!==void 0){let A=X?.textContent??Z.textContent;if(_2(A)){let C=t2(A.$ref);H.push(`:text-content="${C}"`),s8(G,C,A.$ref),Y=!0}else if(i(A)){let C=`_t${J.t}`;J.t+=1,H.push(`:text-content="${C}"`),G.set(C,`() => \`${A}\``),Y=!0}}for(let[A,C]of Object.entries(Z)){if(!A.startsWith("on")||A==="observedAttributes")continue;let E=A.slice(2).toLowerCase();if(_2(C)){let y=t2(C.$ref);H.push(`@${E}="${y}"`),Y=!0}else if(C2(C)){let y=`_h${J.h}`;J.h+=1,H.push(`@${E}="${y}"`),Q.set(y,{args:["state","e"],body:A2(C.body,{eventParam:"e",statePrefix:"state"})}),Y=!0}else if(j2(C)){let y=`_h${J.h}`;J.h+=1,H.push(`@${E}="${y}"`),Q.set(y,{args:C.parameters?n2(C.parameters):C.arguments??["state","event"],body:C.body}),Y=!0}else if(L2(C)){let y=`_h${J.h}`;J.h+=1,H.push(`@${E}="${y}"`);let h=J2(C.$expression,{eventParam:"e",statePrefix:"state"});Q.set(y,{args:["state","e"],body:h}),Y=!0}}if(Z.style&&typeof Z.style==="object")for(let[A,C]of Object.entries(Z.style)){if(A.startsWith(":")||A.startsWith(".")||A.startsWith("&")||A.startsWith("[")||A.startsWith("@"))continue;if(C===null||typeof C==="object")continue;if(i(C)){let E=`_s${J.s}`;J.s+=1,H.push(`:style.${V2(A)}="${E}"`),G.set(E,`() => \`${C}\``),Y=!0}}if(Z.attributes&&typeof Z.attributes==="object"){for(let[A,C]of Object.entries(Z.attributes))if(_2(C)){let E=t2(C.$ref);H.push(`:attr.${A}="${E}"`),s8(G,E,C.$ref),Y=!0}else if(i(C)){let E=`_t${J.t}`;J.t+=1,H.push(`:attr.${A}="${E}"`),G.set(E,`() => \`${C}\``),Y=!0}}for(let[A,C]of Object.entries(Z)){if(r2.has(A)||A.startsWith("on")||A.startsWith("$")||A==="tagName"||A==="id"||A==="className"||A==="style"||A==="children"||A==="textContent"||A==="innerHTML"||A==="attributes")continue;if(_2(C)){let E=t2(C.$ref);H.push(`:${V2(A)}="${E}"`),s8(G,E,C.$ref),Y=!0}else if(i(C)){let E=`_t${J.t}`;J.t+=1,H.push(`:${V2(A)}="${E}"`),G.set(E,`() => \`${C}\``),Y=!0}}let q=q0(Z,U.scope),B=Y?" data-bind":"",M=H.length>0?` ${H.join(" ")}`:"",F="",D=X??Z;if(D.textContent!==void 0&&!Y){let A=z2(D.textContent,U.scope);F=A==null?"":p(String(A))}else if(D.textContent!==void 0&&Y){let A=z2(D.textContent,U.scope);F=A==null?"":p(String(A))}else if(D.innerHTML)F=z2(D.innerHTML,U.scope)??D.innerHTML;else if(K2(D.children)){J.needsLit=!0;let A=`_list${J.l}`;J.l+=1;let C=D.children,E;if(_2(C.items))E=`state.${t2(C.items.$ref)}`;else E=JSON.stringify(C.items);let y=t8(C.map);G.set(A,`() => (${E} ?? []).map((item, index) => html\`${y}\`)`),H.push(`:render="${A}"`),Y=!0;let h=" data-bind",f=` ${H.join(" ")}`;if(new Set(["input","br","hr","img","meta","link"]).has(K))return`<${K}${q}${h}${f}>`;return`<${K}${q}${h}${f}></${K}>`}else if(Array.isArray(D.children)&&D.children.some((A)=>K2(A))){J.needsLit=!0;let A=`_children${J.l}`;J.l+=1;let C=D.children.map((y)=>w6(y)).join(`
|
|
179
179
|
`);G.set(A,`() => html\`
|
|
180
180
|
${C}
|
|
181
|
-
\``),H.push(`:render="${A}"`),Y=!0;let E=` ${H.join(" ")}`;return`<${K}${q} data-bind${E}></${K}>`}else if(Array.isArray(D.children)){let A=Array.isArray(X?.children)?X.children:void 0;F=D.children.map((C,E)=>{let y=A?.[E]??C;return
|
|
182
|
-
`)}if(new Set(["input","br","hr","img","meta","link"]).has(K))return`<${K}${q}${B}${M}>`;return`<${K}${q}${B}${M}>${F}</${K}>`}function
|
|
183
|
-
${
|
|
181
|
+
\``),H.push(`:render="${A}"`),Y=!0;let E=` ${H.join(" ")}`;return`<${K}${q} data-bind${E}></${K}>`}else if(Array.isArray(D.children)){let A=Array.isArray(X?.children)?X.children:void 0;F=D.children.map((C,E)=>{let y=A?.[E]??C;return I6(C,y,U,G,Q,J)}).join(`
|
|
182
|
+
`)}if(new Set(["input","br","hr","img","meta","link"]).has(K))return`<${K}${q}${B}${M}>`;return`<${K}${q}${B}${M}>${F}</${K}>`}function t8(Z){if(!Z)return"";let X=Z.tagName??"div",W="";if(Z.id)W+=` id="${Z.id}"`;if(Z.className)W+=` class="${Q0(Z.className)}"`;if(Z.attributes&&typeof Z.attributes==="object")for(let[J,U]of Object.entries(Z.attributes))W+=typeof U==="string"&&i(U)?` ${J}="${Q0(U)}"`:` ${J}="${p(String(U))}"`;if(Z.style&&typeof Z.style==="object"){let J=[];for(let[U,K]of Object.entries(Z.style)){if(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")||U.startsWith("@"))continue;if(K===null||typeof K==="object")continue;let H=V2(U);if(i(String(K)))J.push(`${H}: ${Q0(String(K))}`);else J.push(`${H}: ${K}`)}if(J.length>0)W+=` style="${J.join("; ")}"`}for(let[J,U]of Object.entries(Z)){if(!J.startsWith("on")||J==="observedAttributes")continue;let K=J.slice(2).toLowerCase();if(_2(U)){let H=t2(U.$ref);W+=` @${K}=\${(e) => { state.$map = { item, index }; on.${H}(e); }}`}else if(C2(U)){let H=A2(U.body,{eventParam:"e",statePrefix:"state"});W+=` @${K}=\${(e) => { state.$map = { item, index }; ${H} }}`}else if(U&&typeof U==="object"&&U.$prototype==="Function"){let H=Q0(U.body);W+=` @${K}=\${(e) => { ${H} }}`}else if(U&&typeof U==="object"&&"$expression"in U){let H=J2(U.$expression,{eventParam:"e",statePrefix:"state"});W+=` @${K}=\${(e) => { state.$map = { item, index }; ${H}; }}`}}if(Z.contentEditable)W+=` contenteditable="${Z.contentEditable}"`;let G="";if(Z.textContent!==void 0){let J=String(Z.textContent);if(i(J))G=Q0(J);else if(_2(Z.textContent))G=`\${state.${t2(Z.textContent.$ref)}}`;else G=p(J)}else if(Z.innerHTML)G=Q0(String(Z.innerHTML));else if(K2(Z.children))G=`
|
|
183
|
+
${O6(Z.children)}
|
|
184
184
|
`;else if(Array.isArray(Z.children))G=`
|
|
185
|
-
${Z.children.map((J)=>
|
|
185
|
+
${Z.children.map((J)=>w6(J)).join(`
|
|
186
186
|
`)}
|
|
187
|
-
`;if(new Set(["input","br","hr","img","meta","link"]).has(X))return`<${X}${W}>`;return`<${X}${W}>${G}</${X}>`}function
|
|
188
|
-
`)}function
|
|
189
|
-
`)}function
|
|
190
|
-
`)}function
|
|
191
|
-
`)}function t2(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replaceAll("/","_");return Z.replaceAll("/","_")}function
|
|
192
|
-
`)}function
|
|
193
|
-
`):Z.body??"").includes("await ")}import{readFileSync as
|
|
187
|
+
`;if(new Set(["input","br","hr","img","meta","link"]).has(X))return`<${X}${W}>`;return`<${X}${W}>${G}</${X}>`}function w6(Z){if(typeof Z==="string")return i(Z)?Q0(Z):p(Z);if(typeof Z==="number"||typeof Z==="boolean")return p(String(Z));if(K2(Z))return O6(Z);return t8(Z)}function O6(Z){let{items:X}=Z,W=_2(X)?`state.${t2(X.$ref)}`:JSON.stringify(X??[]),G=t8(Z.map);return`\${(${W} ?? []).map((item, index) => html\`${G}\`)}`}function Q0(Z){return Z.replaceAll("$map.","")}function q7(Z,X,W,G,Q,J,U,K,H){let Y=[],{needsLit:q}=U,B=X.length>0;Y.push("// Generated by @jxsuite/compiler — do not edit manually");let M=["reactive","effect"];if(B)M.push("computed");if(Y.push(`import { ${M.join(", ")} } from '@vue/reactivity';`),q)Y.push("import { html, render } from 'lit-html';");for(let[F,D]of J){let w=H?H(F):F;Y.push(`import { ${[...D].join(", ")} } from '${w}';`)}Y.push("","const state = reactive({");for(let[F,D]of Z)Y.push(` ${F}: ${JSON.stringify(D)},`);if(Y.push("});",""),Q.length>0){for(let F of Q)Y.push(F);Y.push("")}if(X.length>0){for(let[F,D]of X)Y.push(`state.${F} = computed(${D});`);Y.push("")}if(W.length>0){Y.push("const bind = {");for(let[F,D]of W)Y.push(` ${F}: ${D},`);Y.push("};")}else Y.push("const bind = {};");if(Y.push(""),G.length>0){Y.push("const on = {");for(let[F,D]of G){let w=D.args??["state"],A=w.map((C)=>C==="state"?"state":"e").join(", ");Y.push(` ${F}: (e) => { const fn = (${w.join(", ")}) => { ${D.body} }; fn(${A}); },`)}Y.push("};")}else Y.push("const on = {};");if(Y.push("","function hydrate(root) {"," root.querySelectorAll('[data-bind]').forEach(el => {"," [...el.attributes].forEach(a => {"," if (a.name.startsWith(':')) {"," const parts = a.name.slice(1).split('.');"," const key = a.value;"),q)Y.push(" if (parts[0] === 'render') {"," effect(() => { render(bind[key](), el); });"," } 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](); });"," } else if (parts[0] === 'attr' && parts.length > 1) {"," effect(() => { el.setAttribute(parts[1], bind[key]()); });"," } else {"," const prop = parts[0].replace(/-([a-z])/g, (_, c) => c.toUpperCase());"," effect(() => { el[prop] = bind[key](); });"," }"," } else if (a.name.startsWith('@')) {"," el.addEventListener(a.name.slice(1), on[a.value]);"," }"," });"," });","}","","hydrate(document);",""),Y.join(`
|
|
188
|
+
`)}function H7(Z,X){let{url:W}=X,G=X.method??"GET",Q=i(W);if(X.manual)return`// ${Z}: manual Request — fetch triggered by user action`;let J=[`// ${Z}: auto-fetch from ${Q?"(dynamic URL)":W}`,"effect(() => {"];if(Q)J.push(` const url = \`${W}\`;`,' if (!url || url === "undefined" || url.includes("undefined")) return;');else J.push(` const url = ${JSON.stringify(W)};`);let U=[];if(G!=="GET")U.push(`method: ${JSON.stringify(G)}`);if(X.headers)U.push(`headers: ${JSON.stringify(X.headers)}`);if(X.body){let H=typeof X.body==="object"?JSON.stringify(JSON.stringify(X.body)):JSON.stringify(X.body);U.push(`body: ${H}`)}let K=U.length>0?`, { ${U.join(", ")} }`:"";return J.push(` fetch(url${K})`," .then(r => r.ok ? r.json() : Promise.reject(r.statusText))",` .then(d => { state.${Z} = d; })`,` .catch(e => { state.${Z} = { error: String(e) }; });`,"});"),J.join(`
|
|
189
|
+
`)}function B7(Z,X,W,G){return[`// ${Z}: ${X} (key: "${W}")`,"try {",` const _s = ${X}.getItem(${JSON.stringify(W)});`,` state.${Z} = _s !== null ? JSON.parse(_s) : ${JSON.stringify(G)};`,`} catch { state.${Z} = ${JSON.stringify(G)}; }`,"effect(() => {",` const v = state.${Z};`," try {",` if (v === null) ${X}.removeItem(${JSON.stringify(W)});`,` else ${X}.setItem(${JSON.stringify(W)}, JSON.stringify(v));`," } catch {}","});"].join(`
|
|
190
|
+
`)}function M7(Z,X,W){return[`// ${Z}: Cookie (name: "${X}")`,"{",` const _m = document.cookie.match(new RegExp("(?:^|; )${X}=([^;]*)"));`,` try { state.${Z} = _m ? JSON.parse(decodeURIComponent(_m[1])) : ${JSON.stringify(W)}; }`,` catch { state.${Z} = _m ? _m[1] : ${JSON.stringify(W)}; }`,"}"].join(`
|
|
191
|
+
`)}function t2(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replaceAll("/","_");return Z.replaceAll("/","_")}function s8(Z,X,W){if(Z.has(X))return;if(W.startsWith("#/state/")){let Q=W.slice(8).split("/");Z.set(X,`() => state.${Q.join(".")}`)}else Z.set(X,`() => state.${W}`)}var e8=c(()=>{C0();X0();o2()});var _6={};X9(_6,{compileClassJson:()=>F7});function F7(Z,X={}){let W=Z.title;if(!W)throw Error("compileClassJson: missing title (class name)");let G=$7(Z.extends),Q=Z.$defs,J=Q?.fields??{},U=Q?.constructor,K=typeof U==="object"?U:void 0,H=Q?.methods??{},Y=["// Generated by @jxsuite/compiler from .class.json — do not edit manually"];if(Z.$id)Y.push(`// Source: ${Z.$id}`);Y.push("");let q=G!=="Object"?` extends ${G}`:"";Y.push(`class ${W}${q} {`);for(let[B,M]of Object.entries(J)){if(M.scope!=="static")continue;let F=M.identifier??B,D=M.access==="private"?"#":"",w=M.initializer!==void 0?JSON.stringify(M.initializer):M.default!==void 0?JSON.stringify(M.default):"null";Y.push(` static ${D}${F} = ${w};`)}for(let[B,M]of Object.entries(J)){if(M.scope==="static")continue;if(M.access!=="private")continue;let F=M.identifier??B;Y.push(` #${F};`)}if(Object.keys(J).length>0)Y.push("");if(Y.push(" constructor(config = {}) {"),K?.superCall||G!=="Object"){let B=K?.superCall?.arguments?K.superCall.arguments.join(", "):"";Y.push(` super(${B});`)}for(let[B,M]of Object.entries(J)){if(M.scope==="static")continue;let F=M.identifier??B,D=M.access==="private"?"#":"",w=M.initializer!==void 0?JSON.stringify(M.initializer):M.default!==void 0?JSON.stringify(M.default):"null";Y.push(` this.${D}${F} = config.${F} !== undefined ? config.${F} : ${w};`)}if(K?.body){let B=Array.isArray(K.body)?K.body:[K.body];for(let M of B)Y.push(` ${M}`)}Y.push(" }");for(let[B,M]of Object.entries(H)){let F=M.identifier??B,D=M.scope==="static",A=M.access==="private"?"#":"",C=D?"static ":"",E=M.returnType?.$ref?.includes("Promise")||L7(M)?"async ":"",y=T6(M.parameters??[]),h=D7(M.body);if(Y.push(""),M.role==="accessor"){if(M.getter)Y.push(` ${C}get ${A}${F}() {`,` ${M.getter.body}`," }");if(M.setter){let f=T6(M.setter.parameters??[]);Y.push(` ${C}set ${A}${F}(${f}) {`,` ${M.setter.body}`," }")}}else{Y.push(` ${C}${E}${A}${F}(${y}) {`);for(let f of h)Y.push(` ${f}`);Y.push(" }")}}return Y.push("}","",`export { ${W} };`,`export default ${W};`,""),Y.join(`
|
|
192
|
+
`)}function $7(Z){if(!Z)return"Object";if(typeof Z==="string")return Z;if(Z.$ref){let X=Z.$ref.match(/([A-Za-z0-9_]+)\.class\.json/);return X?X[1]:"Object"}return"Object"}function T6(Z){return Z.map((X)=>{if(X.$ref)return X.$ref.split("/").pop();let W=X.identifier??X.name;return typeof W==="string"?W:"arg"}).join(", ")}function D7(Z){if(!Z)return[""];return Array.isArray(Z)?Z:[Z]}function L7(Z){return(Array.isArray(Z.body)?Z.body.join(`
|
|
193
|
+
`):Z.body??"").includes("await ")}import{readFileSync as A7}from"node:fs";async function I7(Z,X={}){let{title:W="Jx App",reactivitySrc:G=X1,litHtmlSrc:Q=z1,projectStyle:J=null}=X,U;if(typeof Z==="string"){let K=A7(Z,"utf8");if(Z.endsWith(".json"))U=w1(K,Z);else{let{extname:H}=await import("node:path"),Y=H(Z).toLowerCase(),q=X.formats?.byExtension?.(Y,"parse");if(!q){let{unknownFormatError:B}=await Promise.resolve().then(() => (n8(),i8));throw B(Z,Y)}U=await q.call("parse",K)}}else U=Z;if(q9(U)){let{compileClassJson:K}=await Promise.resolve().then(() => _6),H=K(U,X),Y=typeof Z==="string"?Z.replace(/\.class\.json$/,".js"):`${U.title}.js`;return{files:[{content:H,path:Y}],html:""}}if(!W1(U))return D6(U,{litHtmlSrc:Q,projectStyle:J,reactivitySrc:G,...X.prePaintScheme===!1?{prePaintScheme:!1}:{},...X.rewriteSrc?{rewriteSrc:X.rewriteSrc}:{},title:W});if(U.tagName&&U.tagName.includes("-")){let{tagName:K}=U,H=J1(K),q={content:y0(U,H,[],X.rewriteSrc),path:`${K}.js`,tagName:K},B=M0(U,U.$media??{}),M=`<!DOCTYPE html>
|
|
194
194
|
<html lang="en">
|
|
195
195
|
<head>
|
|
196
196
|
<meta charset="utf-8">
|
|
@@ -210,4 +210,4 @@ ${h.join(`,
|
|
|
210
210
|
<${K}></${K}>
|
|
211
211
|
<script type="module" src="./${K}.js"></script>
|
|
212
212
|
</body>
|
|
213
|
-
</html>`;return{files:[q],html:M}}return
|
|
213
|
+
</html>`;return{files:[q],html:M}}return a8(U,{litHtmlSrc:Q,projectStyle:J,reactivitySrc:G,...X.prePaintScheme===!1?{prePaintScheme:!1}:{},...X.rewriteSrc?{rewriteSrc:X.rewriteSrc}:{},title:W})}async function Mz(Z,X){let[W,G]=await Promise.all([I7(Z),h8(Z)]),{writeFileSync:Q,mkdirSync:J}=await import("node:fs"),{dirname:U,join:K}=await import("node:path");if(X){Q(X,W.html,"utf8"),console.error(`Written to ${X}`);let H=U(X);for(let Y of W.files){let q=K(H,Y.path);J(U(q),{recursive:!0}),Q(q,Y.content,"utf8"),console.error(`Written to ${q}`)}}else process.stdout.write(W.html);if(G&&X){let H=X.replace(/(\.[^.]+)?$/,"-server.js");Q(H,G,"utf8"),console.error(`Server handler written to ${H}`)}}var w7=c(()=>{X0();u8();C1();A6();e8();o2();c8();X0();u8();C1();e8()});w7();export{Mz as runCli,W1 as isDynamic,oZ as compileSiteServer,h8 as compileServer,J7 as compileElementPage,B6 as compileElement,a8 as compileClient,I7 as compile};
|