@arach/arc-iso 0.5.0 → 0.6.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.
@@ -1,9 +1,9 @@
1
- (function(J,Q){typeof exports=="object"&&typeof module<"u"?Q(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],Q):(J=typeof globalThis<"u"?globalThis:J||self,Q(J.ArcIso={},J.React))})(this,(function(J,Q){"use strict";const sn=30*(Math.PI/180),Or=Math.cos(sn),jr=Math.sin(sn);function w(e,n,r=0){return{screenX:(e-n)*Or,screenY:-(e+n)*jr-r}}function fe(e,n,r,t=0,i=0,l=0){const o={frontBottom:w(e,0,0),rightBottom:w(e,n,0),backBottom:w(0,n,0),leftBottom:w(0,0,0),frontTop:w(e,0,r),rightTop:w(e,n,r),backTop:w(0,n,r),leftTop:w(0,0,r)},a=E=>({x:E.screenX+t,y:E.screenY+i}),c=Object.fromEntries(Object.entries(o).map(([E,j])=>[E,a(j)])),s=(E,j,R,$)=>{if($<=0){const ne=w(0,0,R),q=w(E,0,R),T=w(E,j,R),H=w(0,j,R);return`M ${ne.screenX+t},${ne.screenY+i} L ${q.screenX+t},${q.screenY+i} L ${T.screenX+t},${T.screenY+i} L ${H.screenX+t},${H.screenY+i} Z`}const W=Math.min(E,j)/2,N=Math.min($,W),I=8,M=[],ie=(ne,q,T,H)=>{for(let re=0;re<=I;re++){const O=T+(H-T)*(re/I),S=ne+N*Math.cos(O),h=q+N*Math.sin(O),C=w(S,h,R);M.push(`${C.screenX+t},${C.screenY+i}`)}};return ie(N,N,Math.PI,Math.PI*1.5),ie(E-N,N,Math.PI*1.5,Math.PI*2),ie(E-N,j-N,0,Math.PI*.5),ie(N,j-N,Math.PI*.5,Math.PI),`M ${M[0]} L ${M.slice(1).join(" L ")} Z`},u=E=>`M ${E.map(j=>`${j.x},${j.y}`).join(" L ")} Z`,x=(E,j,R,$,W,N)=>{const M=[];for(let T=0;T<6;T++){const H=W+(N-W)*(T/6),re=W+(N-W)*((T+1)/6),O=(H+re)/2,S=Math.cos(O),h=Math.sin(O),F=S*-.577+h*-.577+0*.577,de=.3+Math.max(0,F+.4)*.5,he=w(E+R*Math.cos(H),j+R*Math.sin(H),0),P=w(E+R*Math.cos(re),j+R*Math.sin(re),0),oe=w(E+R*Math.cos(H),j+R*Math.sin(H),$),se=w(E+R*Math.cos(re),j+R*Math.sin(re),$),Fe=`M ${he.screenX+t},${he.screenY+i} L ${P.screenX+t},${P.screenY+i} L ${se.screenX+t},${se.screenY+i} L ${oe.screenX+t},${oe.screenY+i} Z`;M.push({path:Fe,intensity:de})}return M},p=Math.min(l,Math.min(e,n)/2),f=s(e,n,r,p);let m,y,A,v,b,D;if(p>0){const E=[{x:w(0,p,0).screenX+t,y:w(0,p,0).screenY+i},{x:w(0,n-p,0).screenX+t,y:w(0,n-p,0).screenY+i},{x:w(0,n-p,r).screenX+t,y:w(0,n-p,r).screenY+i},{x:w(0,p,r).screenX+t,y:w(0,p,r).screenY+i}];m=u(E);const j=[{x:w(p,0,0).screenX+t,y:w(p,0,0).screenY+i},{x:w(e-p,0,0).screenX+t,y:w(e-p,0,0).screenY+i},{x:w(e-p,0,r).screenX+t,y:w(e-p,0,r).screenY+i},{x:w(p,0,r).screenX+t,y:w(p,0,r).screenY+i}];y=u(j),A=x(p,p,p,r,Math.PI,Math.PI*1.5),v=x(e-p,p,p,r,Math.PI*1.5,Math.PI*2),b=x(p,n-p,p,r,Math.PI*.5,Math.PI),D=x(e-p,n-p,p,r,0,Math.PI*.5)}else{const E=[c.leftBottom,c.backBottom,c.backTop,c.leftTop],j=[c.leftBottom,c.frontBottom,c.frontTop,c.leftTop];m=u(E),y=u(j),A=[],v=[],b=[],D=[]}const L=`M ${c.leftBottom.x},${c.leftBottom.y} L ${c.frontBottom.x},${c.frontBottom.y} L ${c.rightBottom.x},${c.rightBottom.y} L ${c.backBottom.x},${c.backBottom.y} Z`;return{top:f,left:m,right:y,cornerFrontLeft:A,cornerFrontRight:v,cornerBackLeft:b,cornerBackRight:D,outline:L}}function Fr(e,n=60,r=50){return{top:`hsl(${e}, ${n}%, ${Math.min(r+15,95)}%)`,right:`hsl(${e}, ${n}%, ${r}%)`,left:`hsl(${e}, ${n}%, ${Math.max(r-15,15)}%)`}}const fn={violet:{hue:270,saturation:60,lightness:55},blue:{hue:220,saturation:70,lightness:50},cyan:{hue:190,saturation:80,lightness:45},emerald:{hue:155,saturation:65,lightness:45},amber:{hue:40,saturation:90,lightness:50},rose:{hue:350,saturation:70,lightness:55},slate:{hue:220,saturation:15,lightness:50},zinc:{hue:240,saturation:5,lightness:50}};function Lr(e){const n=fn[e]||fn.slate;return Fr(n.hue,n.saturation,n.lightness)}var Ie={exports:{}},Se={};var un;function Ir(){if(un)return Se;un=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,i,l){var o=null;if(l!==void 0&&(o=""+l),i.key!==void 0&&(o=""+i.key),"key"in i){l={};for(var a in i)a!=="key"&&(l[a]=i[a])}else l=i;return i=l.ref,{$$typeof:e,type:t,key:o,ref:i!==void 0?i:null,props:l}}return Se.Fragment=n,Se.jsx=r,Se.jsxs=r,Se}var we={};var pn;function Rr(){return pn||(pn=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===I?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case A:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case j:return"Suspense";case R:return"SuspenseList";case N:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case y:return"Portal";case L:return h.displayName||"Context";case D:return(h._context.displayName||"Context")+".Consumer";case E:var C=h.render;return h=h.displayName,h||(h=C.displayName||C.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case $:return C=h.displayName||null,C!==null?C:e(h.type)||"Memo";case W:C=h._payload,h=h._init;try{return e(h(C))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var C=!1}catch{C=!0}if(C){C=console;var F=C.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return F.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),n(h)}}function t(h){if(h===A)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===W)return"<...>";try{var C=e(h);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function i(){var h=M.A;return h===null?null:h.getOwner()}function l(){return Error("react-stack-top-frame")}function o(h){if(ie.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function a(h,C){function F(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",C))}F.isReactWarning=!0,Object.defineProperty(h,"key",{get:F,configurable:!0})}function c(){var h=e(this.type);return H[h]||(H[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function s(h,C,F,Y,de,he){var P=F.ref;return h={$$typeof:m,type:h,key:C,props:F,_owner:Y},(P!==void 0?P:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:he}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function u(h,C,F,Y,de,he){var P=C.children;if(P!==void 0)if(Y)if(ne(P)){for(Y=0;Y<P.length;Y++)x(P[Y]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(P);if(ie.call(C,"key")){P=e(h);var oe=Object.keys(C).filter(function(Fe){return Fe!=="key"});Y=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",S[P+Y]||(oe=0<oe.length?"{"+oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(J,Q){typeof exports=="object"&&typeof module<"u"?Q(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],Q):(J=typeof globalThis<"u"?globalThis:J||self,Q(J.ArcIso={},J.React))})(this,(function(J,Q){"use strict";const sn=30*(Math.PI/180),jr=Math.cos(sn),Fr=Math.sin(sn);function E(e,n,r=0){return{screenX:(e-n)*jr,screenY:-(e+n)*Fr-r}}function fe(e,n,r,t=0,i=0,l=0){const o={frontBottom:E(e,0,0),rightBottom:E(e,n,0),backBottom:E(0,n,0),leftBottom:E(0,0,0),frontTop:E(e,0,r),rightTop:E(e,n,r),backTop:E(0,n,r),leftTop:E(0,0,r)},a=w=>({x:w.screenX+t,y:w.screenY+i}),c=Object.fromEntries(Object.entries(o).map(([w,j])=>[w,a(j)])),s=(w,j,I,O)=>{if(O<=0){const ne=E(0,0,I),q=E(w,0,I),T=E(w,j,I),H=E(0,j,I);return`M ${ne.screenX+t},${ne.screenY+i} L ${q.screenX+t},${q.screenY+i} L ${T.screenX+t},${T.screenY+i} L ${H.screenX+t},${H.screenY+i} Z`}const W=Math.min(w,j)/2,N=Math.min(O,W),R=8,M=[],ie=(ne,q,T,H)=>{for(let re=0;re<=R;re++){const $=T+(H-T)*(re/R),S=ne+N*Math.cos($),h=q+N*Math.sin($),C=E(S,h,I);M.push(`${C.screenX+t},${C.screenY+i}`)}};return ie(N,N,Math.PI,Math.PI*1.5),ie(w-N,N,Math.PI*1.5,Math.PI*2),ie(w-N,j-N,0,Math.PI*.5),ie(N,j-N,Math.PI*.5,Math.PI),`M ${M[0]} L ${M.slice(1).join(" L ")} Z`},u=w=>`M ${w.map(j=>`${j.x},${j.y}`).join(" L ")} Z`,x=(w,j,I,O,W,N)=>{const M=[];for(let T=0;T<6;T++){const H=W+(N-W)*(T/6),re=W+(N-W)*((T+1)/6),$=(H+re)/2,S=Math.cos($),h=Math.sin($),F=S*-.577+h*-.577+0*.577,de=.3+Math.max(0,F+.4)*.5,he=E(w+I*Math.cos(H),j+I*Math.sin(H),0),P=E(w+I*Math.cos(re),j+I*Math.sin(re),0),oe=E(w+I*Math.cos(H),j+I*Math.sin(H),O),se=E(w+I*Math.cos(re),j+I*Math.sin(re),O),Fe=`M ${he.screenX+t},${he.screenY+i} L ${P.screenX+t},${P.screenY+i} L ${se.screenX+t},${se.screenY+i} L ${oe.screenX+t},${oe.screenY+i} Z`;M.push({path:Fe,intensity:de})}return M},p=Math.min(l,Math.min(e,n)/2),f=s(e,n,r,p);let m,y,A,v,b,D;if(p>0){const w=[{x:E(0,p,0).screenX+t,y:E(0,p,0).screenY+i},{x:E(0,n-p,0).screenX+t,y:E(0,n-p,0).screenY+i},{x:E(0,n-p,r).screenX+t,y:E(0,n-p,r).screenY+i},{x:E(0,p,r).screenX+t,y:E(0,p,r).screenY+i}];m=u(w);const j=[{x:E(p,0,0).screenX+t,y:E(p,0,0).screenY+i},{x:E(e-p,0,0).screenX+t,y:E(e-p,0,0).screenY+i},{x:E(e-p,0,r).screenX+t,y:E(e-p,0,r).screenY+i},{x:E(p,0,r).screenX+t,y:E(p,0,r).screenY+i}];y=u(j),A=x(p,p,p,r,Math.PI,Math.PI*1.5),v=x(e-p,p,p,r,Math.PI*1.5,Math.PI*2),b=x(p,n-p,p,r,Math.PI*.5,Math.PI),D=x(e-p,n-p,p,r,0,Math.PI*.5)}else{const w=[c.leftBottom,c.backBottom,c.backTop,c.leftTop],j=[c.leftBottom,c.frontBottom,c.frontTop,c.leftTop];m=u(w),y=u(j),A=[],v=[],b=[],D=[]}const L=`M ${c.leftBottom.x},${c.leftBottom.y} L ${c.frontBottom.x},${c.frontBottom.y} L ${c.rightBottom.x},${c.rightBottom.y} L ${c.backBottom.x},${c.backBottom.y} Z`;return{top:f,left:m,right:y,cornerFrontLeft:A,cornerFrontRight:v,cornerBackLeft:b,cornerBackRight:D,outline:L}}function Lr(e,n=60,r=50){return{top:`hsl(${e}, ${n}%, ${Math.min(r+15,95)}%)`,right:`hsl(${e}, ${n}%, ${r}%)`,left:`hsl(${e}, ${n}%, ${Math.max(r-15,15)}%)`}}const fn={violet:{hue:270,saturation:60,lightness:55},blue:{hue:220,saturation:70,lightness:50},cyan:{hue:190,saturation:80,lightness:45},emerald:{hue:155,saturation:65,lightness:45},amber:{hue:40,saturation:90,lightness:50},rose:{hue:350,saturation:70,lightness:55},slate:{hue:220,saturation:15,lightness:50},zinc:{hue:240,saturation:5,lightness:50}};function Rr(e){const n=fn[e]||fn.slate;return Lr(n.hue,n.saturation,n.lightness)}var Re={exports:{}},Se={};var un;function Ir(){if(un)return Se;un=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(t,i,l){var o=null;if(l!==void 0&&(o=""+l),i.key!==void 0&&(o=""+i.key),"key"in i){l={};for(var a in i)a!=="key"&&(l[a]=i[a])}else l=i;return i=l.ref,{$$typeof:e,type:t,key:o,ref:i!==void 0?i:null,props:l}}return Se.Fragment=n,Se.jsx=r,Se.jsxs=r,Se}var Ee={};var pn;function Mr(){return pn||(pn=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===R?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case A:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case j:return"Suspense";case I:return"SuspenseList";case N:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case y:return"Portal";case L:return h.displayName||"Context";case D:return(h._context.displayName||"Context")+".Consumer";case w:var C=h.render;return h=h.displayName,h||(h=C.displayName||C.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case O:return C=h.displayName||null,C!==null?C:e(h.type)||"Memo";case W:C=h._payload,h=h._init;try{return e(h(C))}catch{}}return null}function n(h){return""+h}function r(h){try{n(h);var C=!1}catch{C=!0}if(C){C=console;var F=C.error,Y=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return F.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Y),n(h)}}function t(h){if(h===A)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===W)return"<...>";try{var C=e(h);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function i(){var h=M.A;return h===null?null:h.getOwner()}function l(){return Error("react-stack-top-frame")}function o(h){if(ie.call(h,"key")){var C=Object.getOwnPropertyDescriptor(h,"key").get;if(C&&C.isReactWarning)return!1}return h.key!==void 0}function a(h,C){function F(){T||(T=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",C))}F.isReactWarning=!0,Object.defineProperty(h,"key",{get:F,configurable:!0})}function c(){var h=e(this.type);return H[h]||(H[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function s(h,C,F,Y,de,he){var P=F.ref;return h={$$typeof:m,type:h,key:C,props:F,_owner:Y},(P!==void 0?P:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:de}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:he}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function u(h,C,F,Y,de,he){var P=C.children;if(P!==void 0)if(Y)if(ne(P)){for(Y=0;Y<P.length;Y++)x(P[Y]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(P);if(ie.call(C,"key")){P=e(h);var oe=Object.keys(C).filter(function(Fe){return Fe!=="key"});Y=0<oe.length?"{key: someKey, "+oe.join(": ..., ")+": ...}":"{key: someKey}",S[P+Y]||(oe=0<oe.length?"{"+oe.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,Y,P,oe,P),S[P+Y]=!0)}if(P=null,F!==void 0&&(r(F),P=""+F),o(C)&&(r(C.key),P=""+C.key),"key"in C){F={};for(var se in C)se!=="key"&&(F[se]=C[se])}else F=C;return P&&a(F,typeof h=="function"?h.displayName||h.name||"Unknown":h),s(h,P,F,i(),de,he)}function x(h){p(h)?h._store&&(h._store.validated=1):typeof h=="object"&&h!==null&&h.$$typeof===W&&(h._payload.status==="fulfilled"?p(h._payload.value)&&h._payload.value._store&&(h._payload.value._store.validated=1):h._store&&(h._store.validated=1))}function p(h){return typeof h=="object"&&h!==null&&h.$$typeof===m}var f=Q,m=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),L=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),M=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=Object.prototype.hasOwnProperty,ne=Array.isArray,q=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(h){return h()}};var T,H={},re=f.react_stack_bottom_frame.bind(f,l)(),O=q(t(l)),S={};we.Fragment=A,we.jsx=function(h,C,F){var Y=1e4>M.recentlyCreatedOwnerStacks++;return u(h,C,F,!1,Y?Error("react-stack-top-frame"):re,Y?q(t(h)):O)},we.jsxs=function(h,C,F){var Y=1e4>M.recentlyCreatedOwnerStacks++;return u(h,C,F,!0,Y?Error("react-stack-top-frame"):re,Y?q(t(h)):O)}})()),we}var dn;function Mr(){return dn||(dn=1,process.env.NODE_ENV==="production"?Ie.exports=Ir():Ie.exports=Rr()),Ie.exports}var d=Mr();const Ge='"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace',Nr=.78,g=e=>Math.round(e*Nr*10)/10,hn={id:"solid",name:"Solid",description:"Shaded isometric boxes",technical:!1,paper:{from:"transparent",to:"transparent",edge:"transparent",grid:"transparent",grain:0},ink:{line:"rgba(0,0,0,0.3)",hidden:"rgba(0,0,0,0.2)",hatch:"transparent",text:"#ffffff",muted:"rgba(255,255,255,0.6)",accent:"#3b82f6"},face:{top:"transparent",right:"transparent",left:"transparent"},hatchOpacity:{top:0,right:0,left:0},font:Ge,strokeWidth:.5},Pr={solid:hn,blueprint:{id:"blueprint",name:"Blueprint",description:"Sepia engineering plate on parchment",technical:!0,paper:{from:"#f0e6d0",to:"#ddceac",edge:"#b09a74",grid:"#c6b48f",grain:.055},ink:{line:"#4a3826",hidden:"#96805f",hatch:"#6d563c",text:"#3b2c1d",muted:"#8a7455",accent:"#a8412a"},face:{top:"#f4ebd7",right:"#e6dabb",left:"#d6c6a2"},hatchOpacity:{top:.3,right:.55,left:.85},font:Ge,strokeWidth:1},cyanotype:{id:"cyanotype",name:"Cyanotype",description:"White linework on classic blueprint blue",technical:!0,paper:{from:"#123256",to:"#0b1f3a",edge:"#3f6d9f",grid:"#27507f",grain:.07},ink:{line:"#e6f0fb",hidden:"#78a2cc",hatch:"#a6c6e5",text:"#f2f8ff",muted:"#8fb2d6",accent:"#ffc857"},face:{top:"#1b4675",right:"#153a61",left:"#0f2b49"},hatchOpacity:{top:.28,right:.5,left:.78},font:Ge,strokeWidth:1}};function Dr(e){return Pr[e]||hn}const Yr={violet:"cross",blue:"lines",sky:"lines",cyan:"dashes",emerald:"dots",amber:"dense",orange:"dense",rose:"cross",zinc:"plain",slate:"plain"};function xn(e){return Yr[e||"zinc"]||"lines"}const Br={plain:"PLAIN",lines:"HATCH-A",cross:"HATCH-X",dense:"HATCH-D",dots:"STIPPLE",dashes:"BROKEN"};function mn(e,n,r,t=0,i=0){const l=(v,b,D)=>{const L=w(v,b,D);return{x:L.screenX+t,y:L.screenY+i}},o=l(0,0,0),a=l(e,0,0),c=l(e,n,0),s=l(0,n,0),u=l(0,0,r),x=l(e,0,r),p=l(e,n,r),f=l(0,n,r),m=v=>`M ${v.map(b=>`${b.x},${b.y}`).join(" L ")} Z`,y=(v,b)=>`M ${v.x},${v.y} L ${b.x},${b.y}`,A=[o,a,c,s,u,x,p,f];return{top:m([u,x,p,f]),right:m([o,a,x,u]),left:m([o,s,f,u]),visible:[m([o,a,x,p,f,s]),y(u,x),y(u,f),y(u,o)].join(" "),hidden:[y(c,a),y(c,s),y(c,p)].join(" "),topCenter:{x:(u.x+p.x)/2,y:(u.y+p.y)/2},topApex:{x:p.x,y:p.y},minX:Math.min(...A.map(v=>v.x)),minY:Math.min(...A.map(v=>v.y)),maxX:Math.max(...A.map(v=>v.x)),maxY:Math.max(...A.map(v=>v.y))}}function Re(e){return String(e).padStart(2,"0")}const Wr={top:["n30","p30"],right:["n30","v"],left:["p30","v"]},Hr={n30:-30,p30:30,v:90},Ur=[{key:"line",spacing:6.2,strokeWidth:.55},{key:"dense",spacing:3.1,strokeWidth:.45},{key:"dash",spacing:6.2,strokeWidth:.55,dash:"2.6 2.6"}],Ee=22;function gn(e,n,r){const[t,i]=Wr[r];switch(n){case"plain":return[];case"lines":return[`${e}-line-${t}`];case"cross":return[`${e}-line-${t}`,`${e}-line-${i}`];case"dense":return[`${e}-dense-${t}`];case"dashes":return[`${e}-dash-${t}`];case"dots":return[`${e}-dot`];default:return[`${e}-line-${t}`]}}const yn=e=>`${e}-paper`,vn=e=>`${e}-grain`,Xr=(e,n="line")=>`${e}-arrow-${n}`,Gr=e=>[`${e}-grid-n30`,`${e}-grid-p30`];function ze({uid:e,style:n,gridTransform:r=""}){return d.jsxs("defs",{children:[Ur.flatMap(t=>Object.entries(Hr).map(([i,l])=>d.jsx("pattern",{id:`${e}-${t.key}-${i}`,width:t.spacing,height:t.spacing,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${l})`,children:d.jsx("line",{x1:-1,y1:t.spacing/2,x2:t.spacing+1,y2:t.spacing/2,stroke:n.ink.hatch,strokeWidth:t.strokeWidth,strokeDasharray:t.dash})},`${t.key}-${i}`))),d.jsx("pattern",{id:`${e}-dot`,width:4.5,height:4.5,patternUnits:"userSpaceOnUse",children:d.jsx("circle",{cx:2.25,cy:2.25,r:.55,fill:n.ink.hatch})}),[{id:`${e}-grid-n30`,angle:-30},{id:`${e}-grid-p30`,angle:30}].map(({id:t,angle:i})=>d.jsx("pattern",{id:t,width:Ee,height:Ee,patternUnits:"userSpaceOnUse",patternTransform:`${r} rotate(${i})`.trim(),children:d.jsx("line",{x1:-1,y1:Ee/2,x2:Ee+1,y2:Ee/2,stroke:n.paper.grid,strokeWidth:.5})},t)),d.jsxs("linearGradient",{id:yn(e),x1:"0",y1:"0",x2:"0.35",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:n.paper.from}),d.jsx("stop",{offset:"100%",stopColor:n.paper.to})]}),d.jsxs("filter",{id:vn(e),x:"0%",y:"0%",width:"100%",height:"100%",children:[d.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.85",numOctaves:3,stitchTiles:"stitch"}),d.jsx("feColorMatrix",{type:"saturate",values:"0"})]}),["line","accent"].map(t=>d.jsx("marker",{id:Xr(e,t),markerWidth:"10",markerHeight:"10",refX:"8",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:d.jsx("path",{d:"M 1 1 L 8 4 L 1 7",fill:"none",stroke:t==="accent"?n.ink.accent:n.ink.line,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})},t))]})}function zr({style:e,rect:n,pan:r,zoom:t=1,className:i="absolute inset-0 w-full h-full pointer-events-none"}){const l=Q.useId().replace(/:/g,""),o=r?`translate(${r.x} ${r.y}) scale(${t})`:t!==1?`scale(${t})`:"",a=n?{x:n.x,y:n.y,width:n.width,height:n.height}:{x:0,y:0,width:"100%",height:"100%"};return d.jsxs("svg",{className:i,"aria-hidden":"true",children:[d.jsx(ze,{uid:l,style:e,gridTransform:o}),d.jsx("rect",{...a,fill:`url(#${yn(l)})`}),Gr(l).map(c=>d.jsx("rect",{...a,fill:`url(#${c})`,opacity:.6},c)),e.paper.grain>0&&d.jsx("rect",{...a,filter:`url(#${vn(l)})`,opacity:e.paper.grain})]})}const Me=g(10),Kr=9,bn=(e,n)=>e.length>n?`${e.slice(0,n-1)}…`:e;function qr({style:e,plate:n,rows:r,title:t,tally:i,className:l="absolute inset-0 w-full h-full pointer-events-none"}){const o=Q.useId().replace(/:/g,""),a=r.slice(0,Kr),c=r.length-a.length,s={x:n.minX+Me,y:n.minY+Me,width:n.maxX-n.minX-Me*2,height:n.maxY-n.minY-Me*2},u={fontFamily:e.font,letterSpacing:"0.08em"},x=g(236),p=g(13),f=g(16),m=f+Math.max(a.length,1)*p+(c>0?p:0),y=s.x+g(14),A=s.y+g(14),v=g(264),b=g(74),D=g(126),L=s.x+s.width-v-g(14),E=s.y+s.height-b-g(14);return d.jsxs("svg",{className:l,style:{overflow:"visible"},"aria-hidden":"true",children:[d.jsx(ze,{uid:o,style:e}),d.jsx("rect",{x:n.minX,y:n.minY,width:n.maxX-n.minX,height:n.maxY-n.minY,fill:"none",stroke:e.paper.edge,strokeWidth:1.4}),d.jsx("rect",{x:s.x,y:s.y,width:s.width,height:s.height,fill:"none",stroke:e.paper.edge,strokeWidth:.6,opacity:.75}),[[s.x,s.y,1,1],[s.x+s.width,s.y,-1,1],[s.x,s.y+s.height,1,-1],[s.x+s.width,s.y+s.height,-1,-1]].map(([j,R,$,W],N)=>d.jsx("path",{d:`M ${j+$*g(16)} ${R} L ${j} ${R} L ${j} ${R+W*g(16)}`,fill:"none",stroke:e.ink.line,strokeWidth:1.2},N)),a.length>0&&d.jsxs("g",{children:[d.jsx("rect",{x:y,y:A,width:x,height:m,fill:e.paper.from,fillOpacity:.55,stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:y,y1:A+f,x2:y+x,y2:A+f,stroke:e.ink.line,strokeWidth:.8}),d.jsx("text",{x:y+g(8),y:A+g(11),fill:e.ink.text,fontSize:g(8),fontWeight:600,style:u,children:"COMPONENT INDEX"}),d.jsxs("text",{x:y+x-g(8),y:A+g(11),textAnchor:"end",fill:e.ink.muted,fontSize:g(8),style:u,children:[Re(r.length)," ITEMS"]}),a.map((j,R)=>{const $=A+f+R*p,W=xn(j.color),N=gn(o,W,"top");return d.jsxs("g",{children:[d.jsx("text",{x:y+g(8),y:$+g(9.5),fill:e.ink.muted,fontSize:g(7.5),style:u,children:Re(j.n)}),d.jsx("rect",{x:y+g(28),y:$+g(3),width:g(14),height:g(7),fill:e.face.right,stroke:e.ink.line,strokeWidth:.4}),N.map(I=>d.jsx("rect",{x:y+g(28),y:$+g(3),width:g(14),height:g(7),fill:`url(#${I})`,opacity:.85},I)),d.jsx("text",{x:y+g(50),y:$+g(9.5),fill:e.ink.text,fontSize:g(7.5),style:u,children:bn((j.name||"").toUpperCase(),18)}),d.jsx("text",{x:y+x-g(8),y:$+g(9.5),textAnchor:"end",fill:e.ink.muted,fontSize:g(7),style:u,children:Br[W]})]},j.n)}),c>0&&d.jsx("text",{x:y+g(8),y:A+f+a.length*p+g(9.5),fill:e.ink.muted,fontSize:g(7.5),style:u,children:`+ ${c} NOT LISTED`})]}),d.jsxs("g",{children:[d.jsx("rect",{x:L,y:E,width:v,height:b,fill:e.paper.from,fillOpacity:.55,stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:L,y1:E+g(30),x2:L+v,y2:E+g(30),stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:L,y1:E+g(52),x2:L+v,y2:E+g(52),stroke:e.ink.line,strokeWidth:.5}),d.jsx("line",{x1:L+D,y1:E+g(30),x2:L+D,y2:E+b,stroke:e.ink.line,strokeWidth:.5}),d.jsx("text",{x:L+g(9),y:E+g(12),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"DRAWING TITLE"}),d.jsx("text",{x:L+g(9),y:E+g(24),fill:e.ink.text,fontSize:g(10),fontWeight:600,style:u,children:bn((t||"UNTITLED ASSEMBLY").toUpperCase(),26)}),d.jsx("text",{x:L+g(9),y:E+g(43),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"PROJECTION"}),d.jsx("text",{x:L+D-g(9),y:E+g(43),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"ISOMETRIC 30°"}),d.jsx("text",{x:L+g(9),y:E+g(65),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"SCALE"}),d.jsx("text",{x:L+D-g(9),y:E+g(65),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"1:1"}),d.jsx("text",{x:L+D+g(9),y:E+g(43),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"QTY"}),d.jsx("text",{x:L+v-g(9),y:E+g(43),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:i||`${Re(r.length)} CMP`}),d.jsx("text",{x:L+D+g(9),y:E+g(65),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"SHEET"}),d.jsx("text",{x:L+v-g(9),y:E+g(65),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"1 OF 1"})]})]})}function Vr({uid:e,style:n,box:r,color:t,tag:i,selected:l=!1,opacity:o,onClick:a,onPointerDown:c}){const s=xn(t),u=l?n.ink.accent:n.ink.line,x=l?n.ink.accent:n.ink.text,p=[{face:"left",path:r.left},{face:"right",path:r.right},{face:"top",path:r.top}];return d.jsxs("g",{className:a||c?"cursor-pointer":void 0,opacity:o,onClick:a,onPointerDown:c,children:[p.map(({face:f,path:m})=>d.jsxs("g",{children:[d.jsx("path",{d:m,fill:n.face[f]}),gn(e,s,f).map(y=>d.jsx("path",{d:m,fill:`url(#${y})`,opacity:n.hatchOpacity[f]},y))]},f)),d.jsx("path",{d:r.hidden,fill:"none",stroke:n.ink.hidden,strokeWidth:n.strokeWidth*.55,strokeDasharray:"3.5 3",opacity:.85}),d.jsx("path",{d:r.visible,fill:"none",stroke:u,strokeWidth:l?n.strokeWidth*1.7:n.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"}),i!=null&&d.jsx("text",{x:r.topCenter.x,y:r.topCenter.y+g(3),textAnchor:"middle",fill:x,fontSize:g(8),fontWeight:600,fontFamily:n.font,style:{letterSpacing:"0.1em"},pointerEvents:"none",children:Re(i)})]})}function Zr({style:e,box:n,name:r,subtitle:t,selected:i=!1,opacity:l}){const o=i?e.ink.accent:e.ink.line,a=i?e.ink.accent:e.ink.text,c=(r||"").toUpperCase(),s=(t||"").toUpperCase(),u=n.minY-g(11),x=u-g(4),p=s?u-g(15):u-g(4),f=Math.max(c.length*g(5.6),s.length*g(4.4),g(24));return d.jsxs("g",{pointerEvents:"none",opacity:l,children:[d.jsx("line",{x1:n.topCenter.x,y1:n.topCenter.y-g(6),x2:n.topCenter.x,y2:u,stroke:o,strokeWidth:e.strokeWidth*.6}),d.jsx("line",{x1:n.topCenter.x-f/2,y1:u,x2:n.topCenter.x+f/2,y2:u,stroke:o,strokeWidth:e.strokeWidth*.6}),d.jsx("text",{x:n.topCenter.x,y:p,textAnchor:"middle",fill:a,fontSize:g(9.5),fontWeight:600,fontFamily:e.font,stroke:e.paper.from,strokeWidth:g(3),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.12em"},children:c}),s&&d.jsx("text",{x:n.topCenter.x,y:x,textAnchor:"middle",fill:e.ink.muted,fontSize:g(7.5),fontFamily:e.font,stroke:e.paper.from,strokeWidth:g(2.5),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.1em"},children:s})]})}const An='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',Jr={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},Qr={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function Ne(e,n,r){const t=s=>{const u=s.replace("#","");return{r:parseInt(u.substring(0,2),16),g:parseInt(u.substring(2,4),16),b:parseInt(u.substring(4,6),16)}},i=t(e),l=t(n),o=Math.round(i.r+(l.r-i.r)*r),a=Math.round(i.g+(l.g-i.g)*r),c=Math.round(i.b+(l.b-i.b)*r);return`rgb(${o},${a},${c})`}function ei({x:e,y:n,z:r,children:t,fontSize:i=8,color:l="#1e293b",shadow:o}){const a=w(e,n,r);return d.jsx("g",{transform:`translate(${a.screenX}, ${a.screenY})`,filter:o,children:d.jsx("g",{transform:"matrix(0.866, -0.5, 0.866, 0.5, 0, 0)",children:d.jsx("text",{x:0,y:0,textAnchor:"middle",fill:l,fontSize:i,fontWeight:600,fontFamily:An,style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:t})})})}function ni({width:e,depth:n,elevation:r,color:t,opacity:i,borderColor:l,theme:o,isGround:a}){const s=fe(e,n,a?8:2,0,0),u=w(0,0,r);return d.jsxs("g",{transform:`translate(${u.screenX}, ${u.screenY})`,children:[a&&d.jsx("g",{transform:"translate(4, 4)",opacity:.2,children:d.jsx("path",{d:s.top,fill:"#000"})}),d.jsx("path",{d:s.top,fill:t,opacity:i}),a&&d.jsxs(d.Fragment,{children:[d.jsx("path",{d:s.left,fill:o==="dark"?"#0f172a":"#cbd5e1",opacity:.8}),d.jsx("path",{d:s.right,fill:o==="dark"?"#1e293b":"#94a3b8",opacity:.8})]}),d.jsx("path",{d:s.top,fill:"none",stroke:l||(o==="dark"?"#475569":"#94a3b8"),strokeWidth:a?1.5:.75,opacity:a?1:.6})]})}function ri({config:e,options:n={},className:r,style:t,onNodeClick:i,onLayerClick:l}){const{interactive:o=!0,animate:a=!0,showLabels:c=!0,expandOnHover:s=!0}=n,{theme:u,canvas:x,origin:p,tiers:f,floorSize:m,nodes:y,cornerRadius:A=0}=e,v=Dr(e.style),b=v.technical,D=Q.useId().replace(/:/g,""),L=u==="dark"?Jr:Qr,E=b?v.paper.to:u==="dark"?"#0f172a":"#fafafa",j=b?v.ink.text:u==="dark"?"#e2e8f0":"#1e293b",R=b?v.ink.muted:u==="dark"?"#64748b":"#94a3b8",$=Q.useMemo(()=>{const O=y.map((h,C)=>({node:h,i:C})).sort((h,C)=>h.node.tier-C.node.tier||h.node.y-C.node.y||h.node.x-C.node.x),S=new Map;return O.forEach(({i:h},C)=>S.set(h,C+1)),S},[y]),W={minX:16,minY:16,maxX:x.width-16,maxY:x.height-16},[N,I]=Q.useState(new Set);Q.useEffect(()=>{a?(I(new Set),f.forEach((O,S)=>{setTimeout(()=>{I(h=>new Set([...h,S]))},S*150+100)})):I(new Set(f.map((O,S)=>S)))},[e.id,a,f.length]);const[M,ie]=Q.useState(null),[ne,q]=Q.useState(null),[T,H]=Q.useState(null),re=[...y].sort((O,S)=>{const h=f[O.tier]?.elevation||0,C=f[S.tier]?.elevation||0;if(h!==C)return h-C;const F=O.x+O.width+(O.y+O.depth);return S.x+S.width+(S.y+S.depth)-F});return d.jsx("div",{className:r,style:{display:"inline-block",...t},children:d.jsxs("svg",{width:x.width,height:x.height,style:{backgroundColor:E},onClick:()=>{o&&(H(null),q(null))},children:[d.jsxs("defs",{children:[d.jsx("pattern",{id:`grid-${e.id}`,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:d.jsx("circle",{cx:"12",cy:"12",r:"0.5",fill:u==="dark"?"#1e293b":"#e2e8f0"})}),d.jsx("filter",{id:`glow-${e.id}`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:d.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:u==="dark"?"#60a5fa":"#3b82f6",floodOpacity:"0.3"})}),d.jsxs("radialGradient",{id:`bg-${e.id}`,cx:"48%",cy:"34%",r:"82%",children:[d.jsx("stop",{offset:"0%",stopColor:u==="dark"?"#16203a":"#ffffff"}),d.jsx("stop",{offset:"55%",stopColor:u==="dark"?"#0e1526":"#f2f5f9"}),d.jsx("stop",{offset:"100%",stopColor:u==="dark"?"#080d18":"#e7ecf2"})]}),d.jsx("filter",{id:`contact-${e.id}`,x:"-60%",y:"-60%",width:"220%",height:"220%",children:d.jsx("feGaussianBlur",{stdDeviation:"5"})}),d.jsxs("linearGradient",{id:`sheen-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#ffffff",stopOpacity:"0.18"}),d.jsx("stop",{offset:"55%",stopColor:"#ffffff",stopOpacity:"0.04"}),d.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0"})]}),d.jsxs("linearGradient",{id:`shade-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#000000",stopOpacity:"0"}),d.jsx("stop",{offset:"100%",stopColor:"#000000",stopOpacity:"0.24"})]}),d.jsx("filter",{id:`label-${e.id}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:d.jsx("feDropShadow",{dx:"0",dy:"0.5",stdDeviation:"0.7",floodColor:"#000000",floodOpacity:"0.7"})})]}),b?d.jsxs(d.Fragment,{children:[d.jsx(ze,{uid:D,style:v}),d.jsx(zr,{style:v,rect:{x:0,y:0,width:x.width,height:x.height},className:""})]}):d.jsxs(d.Fragment,{children:[d.jsx("rect",{width:"100%",height:"100%",fill:`url(#bg-${e.id})`}),d.jsx("rect",{width:"100%",height:"100%",fill:`url(#grid-${e.id})`,opacity:"0.5"})]}),d.jsx("g",{transform:`translate(${p.x}, ${p.y})`,children:f.map((O,S)=>{const h=re.filter(_=>_.tier===S),C=N.has(S),F=o&&(ne===S||ne===null&&T===null&&M===S),Y=o&&(ne!==null||M!==null||T!==null),de=T?.tier===S,he=Y&&!F&&!de,P=C?0:60,oe=C?1:0,se=F&&s?{x:10,y:-34}:{x:0,y:0},Fe=F?1.03:1,Xe=w(m.width/2,m.depth/2,O.elevation),Tr=O.offset||{x:0,y:0};return d.jsxs("g",{"data-tier":S,onMouseEnter:()=>o&&ie(S),onMouseLeave:()=>o&&ie(null),onClick:_=>{o&&(_.stopPropagation(),H(null),q(G=>G===S?null:S),l?.(S))},style:{transform:`translate(${Tr.x+se.x}px, ${Tr.y+se.y}px) translate(${Xe.screenX}px, ${Xe.screenY+P}px) scale(${Fe}) translate(${-Xe.screenX}px, ${-Xe.screenY}px)`,transition:"transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",opacity:oe*(he?.35:1),filter:F?`url(#glow-${e.id})`:"none",cursor:o?"pointer":"default"},children:[b?d.jsx(ii,{width:m.width,depth:m.depth,elevation:S===0?-2:O.elevation,ink:S===0?v.ink.line:v.ink.hidden,isGround:S===0}):d.jsx(ni,{width:m.width,depth:m.depth,elevation:S===0?-2:O.elevation,color:O.floorColor||(u==="dark"?"#0f172a":"#f8fafc"),opacity:O.floorOpacity||(S===0?.95:.5),borderColor:O.borderColor,theme:u,isGround:S===0}),b&&h.map((_,G)=>{const Ce=O.elevation+5,xe=w(_.x,_.y,Ce),Z=mn(_.width,_.depth,_.height,xe.screenX,xe.screenY),z=T?.tier===S&&T?.index===G,ge=o&&T!==null&&!z;return d.jsx(Vr,{uid:D,style:v,box:Z,color:_.color,tag:$.get(y.indexOf(_)),selected:z,opacity:(_.opacity??1)*(ge?.3:1),onClick:o?()=>{if(q(null),H(Le=>Le&&Le.tier===S&&Le.index===G?null:{tier:S,index:G}),i?.(_,{tier:S,index:G}),_.link)try{window.open(_.link,"_blank")}catch{}}:void 0},`tech-${G}`)}),b&&c&&h.map((_,G)=>{const Ce=O.elevation+5,xe=w(_.x,_.y,Ce),Z=mn(_.width,_.depth,_.height,xe.screenX,xe.screenY),z=T?.tier===S&&T?.index===G,ge=o&&T!==null&&!z;return d.jsx(Zr,{style:v,box:Z,name:_.label,selected:z,opacity:ge?.3:1},`tech-label-${G}`)}),!b&&h.map((_,G)=>{const Ce=O.elevation+5,xe=w(_.x,_.y,Ce),Z=fe(_.width,_.depth,_.height,xe.screenX,xe.screenY,A),z=L[_.color]||L.slate,ge=T?.tier===S&&T?.index===G,Le=o&&T!==null&&!ge,$r=w(_.x-3,_.y-3,O.elevation),Io=fe(_.width+6,_.depth+6,0,$r.screenX,$r.screenY,A).top;return d.jsxs("g",{"data-node":`${S}-${G}`,opacity:(_.opacity??1)*(Le?.3:1),onClick:o?te=>{if(te.stopPropagation(),q(null),H(le=>le&&le.tier===S&&le.index===G?null:{tier:S,index:G}),i?.(_,{tier:S,index:G}),_.link)try{window.open(_.link,"_blank")}catch{}}:void 0,style:{cursor:o?"pointer":"default",transition:"opacity 0.3s ease-out"},children:[d.jsx("path",{d:Io,fill:"#000000",opacity:.3,filter:`url(#contact-${e.id})`}),Z.cornerBackRight?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cbr-${le}`)),Z.cornerBackLeft?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.side,z.front,te.intensity)},`cbl-${le}`)),d.jsx("path",{d:Z.left,fill:z.side}),d.jsx("path",{d:Z.left,fill:`url(#shade-${e.id})`}),d.jsx("path",{d:Z.right,fill:z.front}),d.jsx("path",{d:Z.right,fill:`url(#shade-${e.id})`}),Z.cornerFrontRight?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cfr-${le}`)),Z.cornerFrontLeft?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cfl-${le}`)),d.jsx("path",{d:Z.top,fill:z.top}),d.jsx("path",{d:Z.top,fill:`url(#sheen-${e.id})`}),d.jsx("path",{d:Z.top,fill:"none",stroke:ge?"#ffffff":"rgba(255,255,255,0.28)",strokeWidth:ge?1.4:.75,strokeLinejoin:"round"}),c&&_.label&&d.jsx(ei,{x:_.x+_.width/2,y:_.y+_.depth/2,z:Ce+_.height+2,fontSize:_.width>70?9:8,color:j,shadow:`url(#label-${e.id})`,children:_.label})]},G)}),c&&d.jsx("text",{x:w(-25,m.depth/2,O.elevation+15).screenX-35,y:w(-25,m.depth/2,O.elevation+15).screenY,fill:R,fontSize:9,fontWeight:500,fontFamily:An,opacity:b?.9:.6,style:{letterSpacing:"0.05em",textTransform:b?"uppercase":"none"},children:O.name})]},S)})}),b&&d.jsx(qr,{style:v,plate:W,rows:y.map((O,S)=>({n:$.get(S)||S+1,name:O.label,subtitle:f[O.tier]?.name,color:O.color})).sort((O,S)=>O.n-S.n),title:e.title,tally:`${String(y.length).padStart(2,"0")} CMP / ${String(f.length).padStart(2,"0")} TIER`,className:""})]})})}function ii({width:e,depth:n,elevation:r,ink:t,isGround:i}){const l=w(0,0,r),o=fe(e,n,0,l.screenX,l.screenY).top;return d.jsx("path",{d:o,fill:"none",stroke:t,strokeWidth:i?1:.7,strokeDasharray:i?void 0:"5 4",opacity:i?.9:.7})}const kn='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',ti={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},oi={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function Pe(e,n,r){const t=s=>{const u=s.replace("#","");return{r:parseInt(u.substring(0,2),16),g:parseInt(u.substring(2,4),16),b:parseInt(u.substring(4,6),16)}},i=t(e),l=t(n),o=Math.round(i.r+(l.r-i.r)*r),a=Math.round(i.g+(l.g-i.g)*r),c=Math.round(i.b+(l.b-i.b)*r);return`rgb(${o},${a},${c})`}function Cn(e){const{theme:n,canvas:r,origin:t,tiers:i,floorSize:l,nodes:o,cornerRadius:a=0}=e,c=n==="dark"?ti:oi,s=n==="dark"?"#0f172a":"#fafafa",u=n==="dark"?"#e2e8f0":"#1e293b",x=n==="dark"?"#64748b":"#94a3b8",p=[...o].sort((m,y)=>{const A=i[m.tier]?.elevation||0,v=i[y.tier]?.elevation||0;return A!==v?A-v:y.x+y.width+(y.y+y.depth)-(m.x+m.width+(m.y+m.depth))});let f=`<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" style="background:${s}">`;f+=`<defs>
6
+ <%s key={someKey} {...props} />`,Y,P,oe,P),S[P+Y]=!0)}if(P=null,F!==void 0&&(r(F),P=""+F),o(C)&&(r(C.key),P=""+C.key),"key"in C){F={};for(var se in C)se!=="key"&&(F[se]=C[se])}else F=C;return P&&a(F,typeof h=="function"?h.displayName||h.name||"Unknown":h),s(h,P,F,i(),de,he)}function x(h){p(h)?h._store&&(h._store.validated=1):typeof h=="object"&&h!==null&&h.$$typeof===W&&(h._payload.status==="fulfilled"?p(h._payload.value)&&h._payload.value._store&&(h._payload.value._store.validated=1):h._store&&(h._store.validated=1))}function p(h){return typeof h=="object"&&h!==null&&h.$$typeof===m}var f=Q,m=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),L=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),M=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=Object.prototype.hasOwnProperty,ne=Array.isArray,q=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(h){return h()}};var T,H={},re=f.react_stack_bottom_frame.bind(f,l)(),$=q(t(l)),S={};Ee.Fragment=A,Ee.jsx=function(h,C,F){var Y=1e4>M.recentlyCreatedOwnerStacks++;return u(h,C,F,!1,Y?Error("react-stack-top-frame"):re,Y?q(t(h)):$)},Ee.jsxs=function(h,C,F){var Y=1e4>M.recentlyCreatedOwnerStacks++;return u(h,C,F,!0,Y?Error("react-stack-top-frame"):re,Y?q(t(h)):$)}})()),Ee}var dn;function Nr(){return dn||(dn=1,process.env.NODE_ENV==="production"?Re.exports=Ir():Re.exports=Mr()),Re.exports}var d=Nr();const Pr=["solid","blueprint","cyanotype"],Ge='"JetBrains Mono", "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace',Dr=.78,g=e=>Math.round(e*Dr*10)/10,hn={id:"solid",name:"Solid",description:"Shaded isometric boxes",technical:!1,paper:{from:"transparent",to:"transparent",edge:"transparent",grid:"transparent",grain:0},ink:{line:"rgba(0,0,0,0.3)",hidden:"rgba(0,0,0,0.2)",hatch:"transparent",text:"#ffffff",muted:"rgba(255,255,255,0.6)",accent:"#3b82f6"},face:{top:"transparent",right:"transparent",left:"transparent"},hatchOpacity:{top:0,right:0,left:0},font:Ge,strokeWidth:.5},xn={solid:hn,blueprint:{id:"blueprint",name:"Blueprint",description:"Sepia engineering plate on parchment",technical:!0,paper:{from:"#f0e6d0",to:"#ddceac",edge:"#b09a74",grid:"#c6b48f",grain:.055},ink:{line:"#4a3826",hidden:"#96805f",hatch:"#6d563c",text:"#3b2c1d",muted:"#8a7455",accent:"#a8412a"},face:{top:"#f4ebd7",right:"#e6dabb",left:"#d6c6a2"},hatchOpacity:{top:.3,right:.55,left:.85},font:Ge,strokeWidth:1},cyanotype:{id:"cyanotype",name:"Cyanotype",description:"White linework on classic blueprint blue",technical:!0,paper:{from:"#123256",to:"#0b1f3a",edge:"#3f6d9f",grid:"#27507f",grain:.07},ink:{line:"#e6f0fb",hidden:"#78a2cc",hatch:"#a6c6e5",text:"#f2f8ff",muted:"#8fb2d6",accent:"#ffc857"},face:{top:"#1b4675",right:"#153a61",left:"#0f2b49"},hatchOpacity:{top:.28,right:.5,left:.78},font:Ge,strokeWidth:1}};function Yr(e){return xn[e]||hn}Pr.filter(e=>xn[e].technical)[0];const Br={violet:"cross",blue:"lines",sky:"lines",cyan:"dashes",emerald:"dots",amber:"dense",orange:"dense",rose:"cross",zinc:"plain",slate:"plain"};function mn(e){return Br[e||"zinc"]||"lines"}const Wr={plain:"PLAIN",lines:"HATCH-A",cross:"HATCH-X",dense:"HATCH-D",dots:"STIPPLE",dashes:"BROKEN"};function gn(e,n,r,t=0,i=0){const l=(v,b,D)=>{const L=E(v,b,D);return{x:L.screenX+t,y:L.screenY+i}},o=l(0,0,0),a=l(e,0,0),c=l(e,n,0),s=l(0,n,0),u=l(0,0,r),x=l(e,0,r),p=l(e,n,r),f=l(0,n,r),m=v=>`M ${v.map(b=>`${b.x},${b.y}`).join(" L ")} Z`,y=(v,b)=>`M ${v.x},${v.y} L ${b.x},${b.y}`,A=[o,a,c,s,u,x,p,f];return{top:m([u,x,p,f]),right:m([o,a,x,u]),left:m([o,s,f,u]),visible:[m([o,a,x,p,f,s]),y(u,x),y(u,f),y(u,o)].join(" "),hidden:[y(c,a),y(c,s),y(c,p)].join(" "),topCenter:{x:(u.x+p.x)/2,y:(u.y+p.y)/2},topApex:{x:p.x,y:p.y},minX:Math.min(...A.map(v=>v.x)),minY:Math.min(...A.map(v=>v.y)),maxX:Math.max(...A.map(v=>v.x)),maxY:Math.max(...A.map(v=>v.y))}}function Ie(e){return String(e).padStart(2,"0")}const Hr={top:["n30","p30"],right:["n30","v"],left:["p30","v"]},Ur={n30:-30,p30:30,v:90},Xr=[{key:"line",spacing:6.2,strokeWidth:.55},{key:"dense",spacing:3.1,strokeWidth:.45},{key:"dash",spacing:6.2,strokeWidth:.55,dash:"2.6 2.6"}],we=22;function yn(e,n,r){const[t,i]=Hr[r];switch(n){case"plain":return[];case"lines":return[`${e}-line-${t}`];case"cross":return[`${e}-line-${t}`,`${e}-line-${i}`];case"dense":return[`${e}-dense-${t}`];case"dashes":return[`${e}-dash-${t}`];case"dots":return[`${e}-dot`];default:return[`${e}-line-${t}`]}}const vn=e=>`${e}-paper`,bn=e=>`${e}-grain`,Gr=(e,n="line")=>`${e}-arrow-${n}`,zr=e=>[`${e}-grid-n30`,`${e}-grid-p30`];function ze({uid:e,style:n,gridTransform:r=""}){return d.jsxs("defs",{children:[Xr.flatMap(t=>Object.entries(Ur).map(([i,l])=>d.jsx("pattern",{id:`${e}-${t.key}-${i}`,width:t.spacing,height:t.spacing,patternUnits:"userSpaceOnUse",patternTransform:`rotate(${l})`,children:d.jsx("line",{x1:-1,y1:t.spacing/2,x2:t.spacing+1,y2:t.spacing/2,stroke:n.ink.hatch,strokeWidth:t.strokeWidth,strokeDasharray:t.dash})},`${t.key}-${i}`))),d.jsx("pattern",{id:`${e}-dot`,width:4.5,height:4.5,patternUnits:"userSpaceOnUse",children:d.jsx("circle",{cx:2.25,cy:2.25,r:.55,fill:n.ink.hatch})}),[{id:`${e}-grid-n30`,angle:-30},{id:`${e}-grid-p30`,angle:30}].map(({id:t,angle:i})=>d.jsx("pattern",{id:t,width:we,height:we,patternUnits:"userSpaceOnUse",patternTransform:`${r} rotate(${i})`.trim(),children:d.jsx("line",{x1:-1,y1:we/2,x2:we+1,y2:we/2,stroke:n.paper.grid,strokeWidth:.5})},t)),d.jsxs("linearGradient",{id:vn(e),x1:"0",y1:"0",x2:"0.35",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:n.paper.from}),d.jsx("stop",{offset:"100%",stopColor:n.paper.to})]}),d.jsxs("filter",{id:bn(e),x:"0%",y:"0%",width:"100%",height:"100%",children:[d.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.85",numOctaves:3,stitchTiles:"stitch"}),d.jsx("feColorMatrix",{type:"saturate",values:"0"})]}),["line","accent"].map(t=>d.jsx("marker",{id:Gr(e,t),markerWidth:"10",markerHeight:"10",refX:"8",refY:"4",orient:"auto",markerUnits:"userSpaceOnUse",children:d.jsx("path",{d:"M 1 1 L 8 4 L 1 7",fill:"none",stroke:t==="accent"?n.ink.accent:n.ink.line,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})},t))]})}function Kr({style:e,rect:n,pan:r,zoom:t=1,className:i="absolute inset-0 w-full h-full pointer-events-none"}){const l=Q.useId().replace(/:/g,""),o=r?`translate(${r.x} ${r.y}) scale(${t})`:t!==1?`scale(${t})`:"",a=n?{x:n.x,y:n.y,width:n.width,height:n.height}:{x:0,y:0,width:"100%",height:"100%"};return d.jsxs("svg",{className:i,"aria-hidden":"true",children:[d.jsx(ze,{uid:l,style:e,gridTransform:o}),d.jsx("rect",{...a,fill:`url(#${vn(l)})`}),zr(l).map(c=>d.jsx("rect",{...a,fill:`url(#${c})`,opacity:.6},c)),e.paper.grain>0&&d.jsx("rect",{...a,filter:`url(#${bn(l)})`,opacity:e.paper.grain})]})}const Me=g(10),qr=9,An=(e,n)=>e.length>n?`${e.slice(0,n-1)}…`:e;function Vr({style:e,plate:n,rows:r,title:t,tally:i,className:l="absolute inset-0 w-full h-full pointer-events-none"}){const o=Q.useId().replace(/:/g,""),a=r.slice(0,qr),c=r.length-a.length,s={x:n.minX+Me,y:n.minY+Me,width:n.maxX-n.minX-Me*2,height:n.maxY-n.minY-Me*2},u={fontFamily:e.font,letterSpacing:"0.08em"},x=g(236),p=g(13),f=g(16),m=f+Math.max(a.length,1)*p+(c>0?p:0),y=s.x+g(14),A=s.y+g(14),v=g(264),b=g(74),D=g(126),L=s.x+s.width-v-g(14),w=s.y+s.height-b-g(14);return d.jsxs("svg",{className:l,style:{overflow:"visible"},"aria-hidden":"true",children:[d.jsx(ze,{uid:o,style:e}),d.jsx("rect",{x:n.minX,y:n.minY,width:n.maxX-n.minX,height:n.maxY-n.minY,fill:"none",stroke:e.paper.edge,strokeWidth:1.4}),d.jsx("rect",{x:s.x,y:s.y,width:s.width,height:s.height,fill:"none",stroke:e.paper.edge,strokeWidth:.6,opacity:.75}),[[s.x,s.y,1,1],[s.x+s.width,s.y,-1,1],[s.x,s.y+s.height,1,-1],[s.x+s.width,s.y+s.height,-1,-1]].map(([j,I,O,W],N)=>d.jsx("path",{d:`M ${j+O*g(16)} ${I} L ${j} ${I} L ${j} ${I+W*g(16)}`,fill:"none",stroke:e.ink.line,strokeWidth:1.2},N)),a.length>0&&d.jsxs("g",{children:[d.jsx("rect",{x:y,y:A,width:x,height:m,fill:e.paper.from,fillOpacity:.55,stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:y,y1:A+f,x2:y+x,y2:A+f,stroke:e.ink.line,strokeWidth:.8}),d.jsx("text",{x:y+g(8),y:A+g(11),fill:e.ink.text,fontSize:g(8),fontWeight:600,style:u,children:"COMPONENT INDEX"}),d.jsxs("text",{x:y+x-g(8),y:A+g(11),textAnchor:"end",fill:e.ink.muted,fontSize:g(8),style:u,children:[Ie(r.length)," ITEMS"]}),a.map((j,I)=>{const O=A+f+I*p,W=mn(j.color),N=yn(o,W,"top");return d.jsxs("g",{children:[d.jsx("text",{x:y+g(8),y:O+g(9.5),fill:e.ink.muted,fontSize:g(7.5),style:u,children:Ie(j.n)}),d.jsx("rect",{x:y+g(28),y:O+g(3),width:g(14),height:g(7),fill:e.face.right,stroke:e.ink.line,strokeWidth:.4}),N.map(R=>d.jsx("rect",{x:y+g(28),y:O+g(3),width:g(14),height:g(7),fill:`url(#${R})`,opacity:.85},R)),d.jsx("text",{x:y+g(50),y:O+g(9.5),fill:e.ink.text,fontSize:g(7.5),style:u,children:An((j.name||"").toUpperCase(),18)}),d.jsx("text",{x:y+x-g(8),y:O+g(9.5),textAnchor:"end",fill:e.ink.muted,fontSize:g(7),style:u,children:Wr[W]})]},j.n)}),c>0&&d.jsx("text",{x:y+g(8),y:A+f+a.length*p+g(9.5),fill:e.ink.muted,fontSize:g(7.5),style:u,children:`+ ${c} NOT LISTED`})]}),d.jsxs("g",{children:[d.jsx("rect",{x:L,y:w,width:v,height:b,fill:e.paper.from,fillOpacity:.55,stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:L,y1:w+g(30),x2:L+v,y2:w+g(30),stroke:e.ink.line,strokeWidth:.8}),d.jsx("line",{x1:L,y1:w+g(52),x2:L+v,y2:w+g(52),stroke:e.ink.line,strokeWidth:.5}),d.jsx("line",{x1:L+D,y1:w+g(30),x2:L+D,y2:w+b,stroke:e.ink.line,strokeWidth:.5}),d.jsx("text",{x:L+g(9),y:w+g(12),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"DRAWING TITLE"}),d.jsx("text",{x:L+g(9),y:w+g(24),fill:e.ink.text,fontSize:g(10),fontWeight:600,style:u,children:An((t||"UNTITLED ASSEMBLY").toUpperCase(),26)}),d.jsx("text",{x:L+g(9),y:w+g(43),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"PROJECTION"}),d.jsx("text",{x:L+D-g(9),y:w+g(43),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"ISOMETRIC 30°"}),d.jsx("text",{x:L+g(9),y:w+g(65),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"SCALE"}),d.jsx("text",{x:L+D-g(9),y:w+g(65),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"1:1"}),d.jsx("text",{x:L+D+g(9),y:w+g(43),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"QTY"}),d.jsx("text",{x:L+v-g(9),y:w+g(43),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:i||`${Ie(r.length)} CMP`}),d.jsx("text",{x:L+D+g(9),y:w+g(65),fill:e.ink.muted,fontSize:g(6.5),style:u,children:"SHEET"}),d.jsx("text",{x:L+v-g(9),y:w+g(65),textAnchor:"end",fill:e.ink.text,fontSize:g(7),style:u,children:"1 OF 1"})]})]})}function Zr({uid:e,style:n,box:r,color:t,tag:i,selected:l=!1,opacity:o,onClick:a,onPointerDown:c}){const s=mn(t),u=l?n.ink.accent:n.ink.line,x=l?n.ink.accent:n.ink.text,p=[{face:"left",path:r.left},{face:"right",path:r.right},{face:"top",path:r.top}];return d.jsxs("g",{className:a||c?"cursor-pointer":void 0,opacity:o,onClick:a,onPointerDown:c,children:[p.map(({face:f,path:m})=>d.jsxs("g",{children:[d.jsx("path",{d:m,fill:n.face[f]}),yn(e,s,f).map(y=>d.jsx("path",{d:m,fill:`url(#${y})`,opacity:n.hatchOpacity[f]},y))]},f)),d.jsx("path",{d:r.hidden,fill:"none",stroke:n.ink.hidden,strokeWidth:n.strokeWidth*.55,strokeDasharray:"3.5 3",opacity:.85}),d.jsx("path",{d:r.visible,fill:"none",stroke:u,strokeWidth:l?n.strokeWidth*1.7:n.strokeWidth,strokeLinejoin:"round",strokeLinecap:"round"}),i!=null&&d.jsx("text",{x:r.topCenter.x,y:r.topCenter.y+g(3),textAnchor:"middle",fill:x,fontSize:g(8),fontWeight:600,fontFamily:n.font,style:{letterSpacing:"0.1em"},pointerEvents:"none",children:Ie(i)})]})}function Jr({style:e,box:n,name:r,subtitle:t,selected:i=!1,opacity:l}){const o=i?e.ink.accent:e.ink.line,a=i?e.ink.accent:e.ink.text,c=(r||"").toUpperCase(),s=(t||"").toUpperCase(),u=n.minY-g(11),x=u-g(4),p=s?u-g(15):u-g(4),f=Math.max(c.length*g(5.6),s.length*g(4.4),g(24));return d.jsxs("g",{pointerEvents:"none",opacity:l,children:[d.jsx("line",{x1:n.topCenter.x,y1:n.topCenter.y-g(6),x2:n.topCenter.x,y2:u,stroke:o,strokeWidth:e.strokeWidth*.6}),d.jsx("line",{x1:n.topCenter.x-f/2,y1:u,x2:n.topCenter.x+f/2,y2:u,stroke:o,strokeWidth:e.strokeWidth*.6}),d.jsx("text",{x:n.topCenter.x,y:p,textAnchor:"middle",fill:a,fontSize:g(9.5),fontWeight:600,fontFamily:e.font,stroke:e.paper.from,strokeWidth:g(3),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.12em"},children:c}),s&&d.jsx("text",{x:n.topCenter.x,y:x,textAnchor:"middle",fill:e.ink.muted,fontSize:g(7.5),fontFamily:e.font,stroke:e.paper.from,strokeWidth:g(2.5),paintOrder:"stroke",strokeLinejoin:"round",style:{letterSpacing:"0.1em"},children:s})]})}const kn='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',Qr={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},ei={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function Ne(e,n,r){const t=s=>{const u=s.replace("#","");return{r:parseInt(u.substring(0,2),16),g:parseInt(u.substring(2,4),16),b:parseInt(u.substring(4,6),16)}},i=t(e),l=t(n),o=Math.round(i.r+(l.r-i.r)*r),a=Math.round(i.g+(l.g-i.g)*r),c=Math.round(i.b+(l.b-i.b)*r);return`rgb(${o},${a},${c})`}function ni({x:e,y:n,z:r,children:t,fontSize:i=8,color:l="#1e293b",shadow:o}){const a=E(e,n,r);return d.jsx("g",{transform:`translate(${a.screenX}, ${a.screenY})`,filter:o,children:d.jsx("g",{transform:"matrix(0.866, -0.5, 0.866, 0.5, 0, 0)",children:d.jsx("text",{x:0,y:0,textAnchor:"middle",fill:l,fontSize:i,fontWeight:600,fontFamily:kn,style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:t})})})}function ri({width:e,depth:n,elevation:r,color:t,opacity:i,borderColor:l,theme:o,isGround:a}){const s=fe(e,n,a?8:2,0,0),u=E(0,0,r);return d.jsxs("g",{transform:`translate(${u.screenX}, ${u.screenY})`,children:[a&&d.jsx("g",{transform:"translate(4, 4)",opacity:.2,children:d.jsx("path",{d:s.top,fill:"#000"})}),d.jsx("path",{d:s.top,fill:t,opacity:i}),a&&d.jsxs(d.Fragment,{children:[d.jsx("path",{d:s.left,fill:o==="dark"?"#0f172a":"#cbd5e1",opacity:.8}),d.jsx("path",{d:s.right,fill:o==="dark"?"#1e293b":"#94a3b8",opacity:.8})]}),d.jsx("path",{d:s.top,fill:"none",stroke:l||(o==="dark"?"#475569":"#94a3b8"),strokeWidth:a?1.5:.75,opacity:a?1:.6})]})}function ii({config:e,options:n={},className:r,style:t,onNodeClick:i,onLayerClick:l}){const{interactive:o=!0,animate:a=!0,showLabels:c=!0,expandOnHover:s=!0}=n,{theme:u,canvas:x,origin:p,tiers:f,floorSize:m,nodes:y,cornerRadius:A=0}=e,v=Yr(e.style),b=v.technical,D=Q.useId().replace(/:/g,""),L=u==="dark"?Qr:ei,w=b?v.paper.to:u==="dark"?"#0f172a":"#fafafa",j=b?v.ink.text:u==="dark"?"#e2e8f0":"#1e293b",I=b?v.ink.muted:u==="dark"?"#64748b":"#94a3b8",O=Q.useMemo(()=>{const $=y.map((h,C)=>({node:h,i:C})).sort((h,C)=>h.node.tier-C.node.tier||h.node.y-C.node.y||h.node.x-C.node.x),S=new Map;return $.forEach(({i:h},C)=>S.set(h,C+1)),S},[y]),W={minX:16,minY:16,maxX:x.width-16,maxY:x.height-16},[N,R]=Q.useState(new Set);Q.useEffect(()=>{a?(R(new Set),f.forEach(($,S)=>{setTimeout(()=>{R(h=>new Set([...h,S]))},S*150+100)})):R(new Set(f.map(($,S)=>S)))},[e.id,a,f.length]);const[M,ie]=Q.useState(null),[ne,q]=Q.useState(null),[T,H]=Q.useState(null),re=[...y].sort(($,S)=>{const h=f[$.tier]?.elevation||0,C=f[S.tier]?.elevation||0;if(h!==C)return h-C;const F=$.x+$.width+($.y+$.depth);return S.x+S.width+(S.y+S.depth)-F});return d.jsx("div",{className:r,style:{display:"inline-block",...t},children:d.jsxs("svg",{width:x.width,height:x.height,style:{backgroundColor:w},onClick:()=>{o&&(H(null),q(null))},children:[d.jsxs("defs",{children:[d.jsx("pattern",{id:`grid-${e.id}`,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:d.jsx("circle",{cx:"12",cy:"12",r:"0.5",fill:u==="dark"?"#1e293b":"#e2e8f0"})}),d.jsx("filter",{id:`glow-${e.id}`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:d.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:u==="dark"?"#60a5fa":"#3b82f6",floodOpacity:"0.3"})}),d.jsxs("radialGradient",{id:`bg-${e.id}`,cx:"48%",cy:"34%",r:"82%",children:[d.jsx("stop",{offset:"0%",stopColor:u==="dark"?"#16203a":"#ffffff"}),d.jsx("stop",{offset:"55%",stopColor:u==="dark"?"#0e1526":"#f2f5f9"}),d.jsx("stop",{offset:"100%",stopColor:u==="dark"?"#080d18":"#e7ecf2"})]}),d.jsx("filter",{id:`contact-${e.id}`,x:"-60%",y:"-60%",width:"220%",height:"220%",children:d.jsx("feGaussianBlur",{stdDeviation:"5"})}),d.jsxs("linearGradient",{id:`sheen-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#ffffff",stopOpacity:"0.18"}),d.jsx("stop",{offset:"55%",stopColor:"#ffffff",stopOpacity:"0.04"}),d.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0"})]}),d.jsxs("linearGradient",{id:`shade-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[d.jsx("stop",{offset:"0%",stopColor:"#000000",stopOpacity:"0"}),d.jsx("stop",{offset:"100%",stopColor:"#000000",stopOpacity:"0.24"})]}),d.jsx("filter",{id:`label-${e.id}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:d.jsx("feDropShadow",{dx:"0",dy:"0.5",stdDeviation:"0.7",floodColor:"#000000",floodOpacity:"0.7"})})]}),b?d.jsxs(d.Fragment,{children:[d.jsx(ze,{uid:D,style:v}),d.jsx(Kr,{style:v,rect:{x:0,y:0,width:x.width,height:x.height},className:""})]}):d.jsxs(d.Fragment,{children:[d.jsx("rect",{width:"100%",height:"100%",fill:`url(#bg-${e.id})`}),d.jsx("rect",{width:"100%",height:"100%",fill:`url(#grid-${e.id})`,opacity:"0.5"})]}),d.jsx("g",{transform:`translate(${p.x}, ${p.y})`,children:f.map(($,S)=>{const h=re.filter(_=>_.tier===S),C=N.has(S),F=o&&(ne===S||ne===null&&T===null&&M===S),Y=o&&(ne!==null||M!==null||T!==null),de=T?.tier===S,he=Y&&!F&&!de,P=C?0:60,oe=C?1:0,se=F&&s?{x:10,y:-34}:{x:0,y:0},Fe=F?1.03:1,Xe=E(m.width/2,m.depth/2,$.elevation),Or=$.offset||{x:0,y:0};return d.jsxs("g",{"data-tier":S,onMouseEnter:()=>o&&ie(S),onMouseLeave:()=>o&&ie(null),onClick:_=>{o&&(_.stopPropagation(),H(null),q(G=>G===S?null:S),l?.(S))},style:{transform:`translate(${Or.x+se.x}px, ${Or.y+se.y}px) translate(${Xe.screenX}px, ${Xe.screenY+P}px) scale(${Fe}) translate(${-Xe.screenX}px, ${-Xe.screenY}px)`,transition:"transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",opacity:oe*(he?.35:1),filter:F?`url(#glow-${e.id})`:"none",cursor:o?"pointer":"default"},children:[b?d.jsx(ti,{width:m.width,depth:m.depth,elevation:S===0?-2:$.elevation,ink:S===0?v.ink.line:v.ink.hidden,isGround:S===0}):d.jsx(ri,{width:m.width,depth:m.depth,elevation:S===0?-2:$.elevation,color:$.floorColor||(u==="dark"?"#0f172a":"#f8fafc"),opacity:$.floorOpacity||(S===0?.95:.5),borderColor:$.borderColor,theme:u,isGround:S===0}),b&&h.map((_,G)=>{const Ce=$.elevation+5,xe=E(_.x,_.y,Ce),Z=gn(_.width,_.depth,_.height,xe.screenX,xe.screenY),z=T?.tier===S&&T?.index===G,ge=o&&T!==null&&!z;return d.jsx(Zr,{uid:D,style:v,box:Z,color:_.color,tag:O.get(y.indexOf(_)),selected:z,opacity:(_.opacity??1)*(ge?.3:1),onClick:o?()=>{if(q(null),H(Le=>Le&&Le.tier===S&&Le.index===G?null:{tier:S,index:G}),i?.(_,{tier:S,index:G}),_.link)try{window.open(_.link,"_blank")}catch{}}:void 0},`tech-${G}`)}),b&&c&&h.map((_,G)=>{const Ce=$.elevation+5,xe=E(_.x,_.y,Ce),Z=gn(_.width,_.depth,_.height,xe.screenX,xe.screenY),z=T?.tier===S&&T?.index===G,ge=o&&T!==null&&!z;return d.jsx(Jr,{style:v,box:Z,name:_.label,selected:z,opacity:ge?.3:1},`tech-label-${G}`)}),!b&&h.map((_,G)=>{const Ce=$.elevation+5,xe=E(_.x,_.y,Ce),Z=fe(_.width,_.depth,_.height,xe.screenX,xe.screenY,A),z=L[_.color]||L.slate,ge=T?.tier===S&&T?.index===G,Le=o&&T!==null&&!ge,$r=E(_.x-3,_.y-3,$.elevation),Io=fe(_.width+6,_.depth+6,0,$r.screenX,$r.screenY,A).top;return d.jsxs("g",{"data-node":`${S}-${G}`,opacity:(_.opacity??1)*(Le?.3:1),onClick:o?te=>{if(te.stopPropagation(),q(null),H(le=>le&&le.tier===S&&le.index===G?null:{tier:S,index:G}),i?.(_,{tier:S,index:G}),_.link)try{window.open(_.link,"_blank")}catch{}}:void 0,style:{cursor:o?"pointer":"default",transition:"opacity 0.3s ease-out"},children:[d.jsx("path",{d:Io,fill:"#000000",opacity:.3,filter:`url(#contact-${e.id})`}),Z.cornerBackRight?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cbr-${le}`)),Z.cornerBackLeft?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.side,z.front,te.intensity)},`cbl-${le}`)),d.jsx("path",{d:Z.left,fill:z.side}),d.jsx("path",{d:Z.left,fill:`url(#shade-${e.id})`}),d.jsx("path",{d:Z.right,fill:z.front}),d.jsx("path",{d:Z.right,fill:`url(#shade-${e.id})`}),Z.cornerFrontRight?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cfr-${le}`)),Z.cornerFrontLeft?.map((te,le)=>d.jsx("path",{d:te.path,fill:Ne(z.front,z.side,te.intensity)},`cfl-${le}`)),d.jsx("path",{d:Z.top,fill:z.top}),d.jsx("path",{d:Z.top,fill:`url(#sheen-${e.id})`}),d.jsx("path",{d:Z.top,fill:"none",stroke:ge?"#ffffff":"rgba(255,255,255,0.28)",strokeWidth:ge?1.4:.75,strokeLinejoin:"round"}),c&&_.label&&d.jsx(ni,{x:_.x+_.width/2,y:_.y+_.depth/2,z:Ce+_.height+2,fontSize:_.width>70?9:8,color:j,shadow:`url(#label-${e.id})`,children:_.label})]},G)}),c&&d.jsx("text",{x:E(-25,m.depth/2,$.elevation+15).screenX-35,y:E(-25,m.depth/2,$.elevation+15).screenY,fill:I,fontSize:9,fontWeight:500,fontFamily:kn,opacity:b?.9:.6,style:{letterSpacing:"0.05em",textTransform:b?"uppercase":"none"},children:$.name})]},S)})}),b&&d.jsx(Vr,{style:v,plate:W,rows:y.map(($,S)=>({n:O.get(S)||S+1,name:$.label,subtitle:f[$.tier]?.name,color:$.color})).sort(($,S)=>$.n-S.n),title:e.title,tally:`${String(y.length).padStart(2,"0")} CMP / ${String(f.length).padStart(2,"0")} TIER`,className:""})]})})}function ti({width:e,depth:n,elevation:r,ink:t,isGround:i}){const l=E(0,0,r),o=fe(e,n,0,l.screenX,l.screenY).top;return d.jsx("path",{d:o,fill:"none",stroke:t,strokeWidth:i?1:.7,strokeDasharray:i?void 0:"5 4",opacity:i?.9:.7})}const Cn='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',oi={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},li={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function Pe(e,n,r){const t=s=>{const u=s.replace("#","");return{r:parseInt(u.substring(0,2),16),g:parseInt(u.substring(2,4),16),b:parseInt(u.substring(4,6),16)}},i=t(e),l=t(n),o=Math.round(i.r+(l.r-i.r)*r),a=Math.round(i.g+(l.g-i.g)*r),c=Math.round(i.b+(l.b-i.b)*r);return`rgb(${o},${a},${c})`}function Sn(e){const{theme:n,canvas:r,origin:t,tiers:i,floorSize:l,nodes:o,cornerRadius:a=0}=e,c=n==="dark"?oi:li,s=n==="dark"?"#0f172a":"#fafafa",u=n==="dark"?"#e2e8f0":"#1e293b",x=n==="dark"?"#64748b":"#94a3b8",p=[...o].sort((m,y)=>{const A=i[m.tier]?.elevation||0,v=i[y.tier]?.elevation||0;return A!==v?A-v:y.x+y.width+(y.y+y.depth)-(m.x+m.width+(m.y+m.depth))});let f=`<svg xmlns="http://www.w3.org/2000/svg" width="${r.width}" height="${r.height}" style="background:${s}">`;f+=`<defs>
7
7
  <pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
8
8
  <circle cx="12" cy="12" r="0.5" fill="${n==="dark"?"#1e293b":"#e2e8f0"}"/>
9
9
  </pattern>
@@ -16,36 +16,36 @@ React keys must be passed directly to JSX without using spread:
16
16
  <linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
17
17
  <linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
18
18
  <filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
19
- </defs>`,f+='<rect width="100%" height="100%" fill="url(#bg)"/>',f+='<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>',f+=`<g transform="translate(${t.x},${t.y})">`;for(let m=0;m<i.length;m++){const y=i[m],A=p.filter($=>$.tier===m),v=y.offset||{x:0,y:0};f+=`<g transform="translate(${v.x},${v.y})">`;const b=m===0?8:2,D=fe(l.width,l.depth,b,0,0),L=w(0,0,m===0?-2:y.elevation),E=y.floorColor||(n==="dark"?"#0f172a":"#f8fafc"),j=y.floorOpacity||(m===0?.95:.5);f+=`<g transform="translate(${L.screenX},${L.screenY})">`,m===0&&(f+=`<g transform="translate(4,4)" opacity="0.2"><path d="${D.top}" fill="#000"/></g>`),f+=`<path d="${D.top}" fill="${E}" opacity="${j}"/>`,m===0&&(f+=`<path d="${D.left}" fill="${n==="dark"?"#0f172a":"#cbd5e1"}" opacity="0.8"/>`,f+=`<path d="${D.right}" fill="${n==="dark"?"#1e293b":"#94a3b8"}" opacity="0.8"/>`),f+=`<path d="${D.top}" fill="none" stroke="${y.borderColor||(n==="dark"?"#475569":"#94a3b8")}" stroke-width="${m===0?1.5:.75}" opacity="${m===0?1:.6}"/>`,f+="</g>";for(const $ of A){const W=y.elevation+5,N=w($.x,$.y,W),I=fe($.width,$.depth,$.height,N.screenX,N.screenY,a),M=c[$.color]||c.slate,ie=$.opacity??1;f+=`<g opacity="${ie}">`;const ne=w($.x-3,$.y-3,y.elevation),q=fe($.width+6,$.depth+6,0,ne.screenX,ne.screenY,a).top;if(f+=`<path d="${q}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,I.cornerBackRight)for(const T of I.cornerBackRight)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(I.cornerBackLeft)for(const T of I.cornerBackLeft)f+=`<path d="${T.path}" fill="${Pe(M.side,M.front,T.intensity)}"/>`;if(f+=`<path d="${I.left}" fill="${M.side}"/>`,f+=`<path d="${I.left}" fill="url(#shade)"/>`,f+=`<path d="${I.right}" fill="${M.front}"/>`,f+=`<path d="${I.right}" fill="url(#shade)"/>`,I.cornerFrontRight)for(const T of I.cornerFrontRight)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(I.cornerFrontLeft)for(const T of I.cornerFrontLeft)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(f+=`<path d="${I.top}" fill="${M.top}"/>`,f+=`<path d="${I.top}" fill="url(#sheen)"/>`,f+=`<path d="${I.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`,$.label){const T=w($.x+$.width/2,$.y+$.depth/2,W+$.height+2),H=$.width>70?9:8;f+=`<g transform="translate(${T.screenX},${T.screenY})" filter="url(#labelshadow)">`,f+='<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">',f+=`<text x="0" y="0" text-anchor="middle" fill="${u}" font-size="${H}" font-weight="600" font-family='${kn}' style="text-transform:uppercase;letter-spacing:0.06em">${$.label}</text>`,f+="</g></g>"}f+="</g>"}const R=w(-25,l.depth/2,y.elevation+15);f+=`<text x="${R.screenX-35}" y="${R.screenY}" fill="${x}" font-size="9" font-weight="500" font-family='${kn}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`,f+="</g>"}return f+="</g></svg>",f}function li(e,n){e.innerHTML=Cn(n)}function Sn(e){return typeof e>"u"||e===null}function ai(e){return typeof e=="object"&&e!==null}function ci(e){return Array.isArray(e)?e:Sn(e)?[]:[e]}function si(e,n){var r,t,i,l;if(n)for(l=Object.keys(n),r=0,t=l.length;r<t;r+=1)i=l[r],e[i]=n[i];return e}function fi(e,n){var r="",t;for(t=0;t<n;t+=1)r+=e;return r}function ui(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var pi=Sn,di=ai,hi=ci,xi=fi,mi=ui,gi=si,U={isNothing:pi,isObject:di,toArray:hi,repeat:xi,isNegativeZero:mi,extend:gi};function wn(e,n){var r="",t=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
19
+ </defs>`,f+='<rect width="100%" height="100%" fill="url(#bg)"/>',f+='<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>',f+=`<g transform="translate(${t.x},${t.y})">`;for(let m=0;m<i.length;m++){const y=i[m],A=p.filter(O=>O.tier===m),v=y.offset||{x:0,y:0};f+=`<g transform="translate(${v.x},${v.y})">`;const b=m===0?8:2,D=fe(l.width,l.depth,b,0,0),L=E(0,0,m===0?-2:y.elevation),w=y.floorColor||(n==="dark"?"#0f172a":"#f8fafc"),j=y.floorOpacity||(m===0?.95:.5);f+=`<g transform="translate(${L.screenX},${L.screenY})">`,m===0&&(f+=`<g transform="translate(4,4)" opacity="0.2"><path d="${D.top}" fill="#000"/></g>`),f+=`<path d="${D.top}" fill="${w}" opacity="${j}"/>`,m===0&&(f+=`<path d="${D.left}" fill="${n==="dark"?"#0f172a":"#cbd5e1"}" opacity="0.8"/>`,f+=`<path d="${D.right}" fill="${n==="dark"?"#1e293b":"#94a3b8"}" opacity="0.8"/>`),f+=`<path d="${D.top}" fill="none" stroke="${y.borderColor||(n==="dark"?"#475569":"#94a3b8")}" stroke-width="${m===0?1.5:.75}" opacity="${m===0?1:.6}"/>`,f+="</g>";for(const O of A){const W=y.elevation+5,N=E(O.x,O.y,W),R=fe(O.width,O.depth,O.height,N.screenX,N.screenY,a),M=c[O.color]||c.slate,ie=O.opacity??1;f+=`<g opacity="${ie}">`;const ne=E(O.x-3,O.y-3,y.elevation),q=fe(O.width+6,O.depth+6,0,ne.screenX,ne.screenY,a).top;if(f+=`<path d="${q}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,R.cornerBackRight)for(const T of R.cornerBackRight)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(R.cornerBackLeft)for(const T of R.cornerBackLeft)f+=`<path d="${T.path}" fill="${Pe(M.side,M.front,T.intensity)}"/>`;if(f+=`<path d="${R.left}" fill="${M.side}"/>`,f+=`<path d="${R.left}" fill="url(#shade)"/>`,f+=`<path d="${R.right}" fill="${M.front}"/>`,f+=`<path d="${R.right}" fill="url(#shade)"/>`,R.cornerFrontRight)for(const T of R.cornerFrontRight)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(R.cornerFrontLeft)for(const T of R.cornerFrontLeft)f+=`<path d="${T.path}" fill="${Pe(M.front,M.side,T.intensity)}"/>`;if(f+=`<path d="${R.top}" fill="${M.top}"/>`,f+=`<path d="${R.top}" fill="url(#sheen)"/>`,f+=`<path d="${R.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`,O.label){const T=E(O.x+O.width/2,O.y+O.depth/2,W+O.height+2),H=O.width>70?9:8;f+=`<g transform="translate(${T.screenX},${T.screenY})" filter="url(#labelshadow)">`,f+='<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">',f+=`<text x="0" y="0" text-anchor="middle" fill="${u}" font-size="${H}" font-weight="600" font-family='${Cn}' style="text-transform:uppercase;letter-spacing:0.06em">${O.label}</text>`,f+="</g></g>"}f+="</g>"}const I=E(-25,l.depth/2,y.elevation+15);f+=`<text x="${I.screenX-35}" y="${I.screenY}" fill="${x}" font-size="9" font-weight="500" font-family='${Cn}' opacity="0.6" style="letter-spacing:0.05em">${y.name}</text>`,f+="</g>"}return f+="</g></svg>",f}function ai(e,n){e.innerHTML=Sn(n)}function En(e){return typeof e>"u"||e===null}function ci(e){return typeof e=="object"&&e!==null}function si(e){return Array.isArray(e)?e:En(e)?[]:[e]}function fi(e,n){var r,t,i,l;if(n)for(l=Object.keys(n),r=0,t=l.length;r<t;r+=1)i=l[r],e[i]=n[i];return e}function ui(e,n){var r="",t;for(t=0;t<n;t+=1)r+=e;return r}function pi(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var di=En,hi=ci,xi=si,mi=ui,gi=pi,yi=fi,U={isNothing:di,isObject:hi,toArray:xi,repeat:mi,isNegativeZero:gi,extend:yi};function wn(e,n){var r="",t=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
20
20
 
21
- `+e.mark.snippet),t+" "+r):t}function _e(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=wn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_e.prototype=Object.create(Error.prototype),_e.prototype.constructor=_e,_e.prototype.toString=function(n){return this.name+": "+wn(this,n)};var V=_e;function Ke(e,n,r,t,i){var l="",o="",a=Math.floor(i/2)-1;return t-n>a&&(l=" ... ",n=t-a+l.length),r-t>a&&(o=" ...",r=t+a-o.length),{str:l+e.slice(n,r).replace(/\t/g,"→")+o,pos:t-n+l.length}}function qe(e,n){return U.repeat(" ",n-e.length)+e}function yi(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,t=[0],i=[],l,o=-1;l=r.exec(e.buffer);)i.push(l.index),t.push(l.index+l[0].length),e.position<=l.index&&o<0&&(o=t.length-2);o<0&&(o=t.length-1);var a="",c,s,u=Math.min(e.line+n.linesAfter,i.length).toString().length,x=n.maxLength-(n.indent+u+3);for(c=1;c<=n.linesBefore&&!(o-c<0);c++)s=Ke(e.buffer,t[o-c],i[o-c],e.position-(t[o]-t[o-c]),x),a=U.repeat(" ",n.indent)+qe((e.line-c+1).toString(),u)+" | "+s.str+`
21
+ `+e.mark.snippet),t+" "+r):t}function _e(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=wn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}_e.prototype=Object.create(Error.prototype),_e.prototype.constructor=_e,_e.prototype.toString=function(n){return this.name+": "+wn(this,n)};var V=_e;function Ke(e,n,r,t,i){var l="",o="",a=Math.floor(i/2)-1;return t-n>a&&(l=" ... ",n=t-a+l.length),r-t>a&&(o=" ...",r=t+a-o.length),{str:l+e.slice(n,r).replace(/\t/g,"→")+o,pos:t-n+l.length}}function qe(e,n){return U.repeat(" ",n-e.length)+e}function vi(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,t=[0],i=[],l,o=-1;l=r.exec(e.buffer);)i.push(l.index),t.push(l.index+l[0].length),e.position<=l.index&&o<0&&(o=t.length-2);o<0&&(o=t.length-1);var a="",c,s,u=Math.min(e.line+n.linesAfter,i.length).toString().length,x=n.maxLength-(n.indent+u+3);for(c=1;c<=n.linesBefore&&!(o-c<0);c++)s=Ke(e.buffer,t[o-c],i[o-c],e.position-(t[o]-t[o-c]),x),a=U.repeat(" ",n.indent)+qe((e.line-c+1).toString(),u)+" | "+s.str+`
22
22
  `+a;for(s=Ke(e.buffer,t[o],i[o],e.position,x),a+=U.repeat(" ",n.indent)+qe((e.line+1).toString(),u)+" | "+s.str+`
23
23
  `,a+=U.repeat("-",n.indent+u+3+s.pos)+`^
24
24
  `,c=1;c<=n.linesAfter&&!(o+c>=i.length);c++)s=Ke(e.buffer,t[o+c],i[o+c],e.position-(t[o]-t[o+c]),x),a+=U.repeat(" ",n.indent)+qe((e.line+c+1).toString(),u)+" | "+s.str+`
25
- `;return a.replace(/\n$/,"")}var vi=yi,bi=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ai=["scalar","sequence","mapping"];function ki(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(t){n[String(t)]=r})}),n}function Ci(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(bi.indexOf(r)===-1)throw new V('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=ki(n.styleAliases||null),Ai.indexOf(this.kind)===-1)throw new V('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var X=Ci;function En(e,n){var r=[];return e[n].forEach(function(t){var i=r.length;r.forEach(function(l,o){l.tag===t.tag&&l.kind===t.kind&&l.multi===t.multi&&(i=o)}),r[i]=t}),r}function Si(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function t(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(n=0,r=arguments.length;n<r;n+=1)arguments[n].forEach(t);return e}function Ve(e){return this.extend(e)}Ve.prototype.extend=function(n){var r=[],t=[];if(n instanceof X)t.push(n);else if(Array.isArray(n))t=t.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(r=r.concat(n.implicit)),n.explicit&&(t=t.concat(n.explicit));else throw new V("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(l){if(!(l instanceof X))throw new V("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new V("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new V("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),t.forEach(function(l){if(!(l instanceof X))throw new V("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ve.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(t),i.compiledImplicit=En(i,"implicit"),i.compiledExplicit=En(i,"explicit"),i.compiledTypeMap=Si(i.compiledImplicit,i.compiledExplicit),i};var _n=Ve,Tn=new X("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),$n=new X("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),On=new X("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),jn=new _n({explicit:[Tn,$n,On]});function wi(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function Ei(){return null}function _i(e){return e===null}var Fn=new X("tag:yaml.org,2002:null",{kind:"scalar",resolve:wi,construct:Ei,predicate:_i,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Ti(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function $i(e){return e==="true"||e==="True"||e==="TRUE"}function Oi(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Ln=new X("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ti,construct:$i,predicate:Oi,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function ji(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Fi(e){return 48<=e&&e<=55}function Li(e){return 48<=e&&e<=57}function Ii(e){if(e===null)return!1;var n=e.length,r=0,t=!1,i;if(!n)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===n)return!0;if(i=e[++r],i==="b"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;t=!0}return t&&i!=="_"}if(i==="x"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(!ji(e.charCodeAt(r)))return!1;t=!0}return t&&i!=="_"}if(i==="o"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(!Fi(e.charCodeAt(r)))return!1;t=!0}return t&&i!=="_"}}if(i==="_")return!1;for(;r<n;r++)if(i=e[r],i!=="_"){if(!Li(e.charCodeAt(r)))return!1;t=!0}return!(!t||i==="_")}function Ri(e){var n=e,r=1,t;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),t=n[0],(t==="-"||t==="+")&&(t==="-"&&(r=-1),n=n.slice(1),t=n[0]),n==="0")return 0;if(t==="0"){if(n[1]==="b")return r*parseInt(n.slice(2),2);if(n[1]==="x")return r*parseInt(n.slice(2),16);if(n[1]==="o")return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function Mi(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!U.isNegativeZero(e)}var In=new X("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ii,construct:Ri,predicate:Mi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ni=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Pi(e){return!(e===null||!Ni.test(e)||e[e.length-1]==="_")}function Di(e){var n,r;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var Yi=/^[-+]?[0-9]+e/;function Bi(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(U.isNegativeZero(e))return"-0.0";return r=e.toString(10),Yi.test(r)?r.replace("e",".e"):r}function Wi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||U.isNegativeZero(e))}var Rn=new X("tag:yaml.org,2002:float",{kind:"scalar",resolve:Pi,construct:Di,predicate:Wi,represent:Bi,defaultStyle:"lowercase"}),Mn=jn.extend({implicit:[Fn,Ln,In,Rn]}),Nn=Mn,Pn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Dn=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 Hi(e){return e===null?!1:Pn.exec(e)!==null||Dn.exec(e)!==null}function Ui(e){var n,r,t,i,l,o,a,c=0,s=null,u,x,p;if(n=Pn.exec(e),n===null&&(n=Dn.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],t=+n[2]-1,i=+n[3],!n[4])return new Date(Date.UTC(r,t,i));if(l=+n[4],o=+n[5],a=+n[6],n[7]){for(c=n[7].slice(0,3);c.length<3;)c+="0";c=+c}return n[9]&&(u=+n[10],x=+(n[11]||0),s=(u*60+x)*6e4,n[9]==="-"&&(s=-s)),p=new Date(Date.UTC(r,t,i,l,o,a,c)),s&&p.setTime(p.getTime()-s),p}function Xi(e){return e.toISOString()}var Yn=new X("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Hi,construct:Ui,instanceOf:Date,represent:Xi});function Gi(e){return e==="<<"||e===null}var Bn=new X("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Gi}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
26
- \r`;function zi(e){if(e===null)return!1;var n,r,t=0,i=e.length,l=Ze;for(r=0;r<i;r++)if(n=l.indexOf(e.charAt(r)),!(n>64)){if(n<0)return!1;t+=6}return t%8===0}function Ki(e){var n,r,t=e.replace(/[\r\n=]/g,""),i=t.length,l=Ze,o=0,a=[];for(n=0;n<i;n++)n%4===0&&n&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|l.indexOf(t.charAt(n));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function qi(e){var n="",r=0,t,i,l=e.length,o=Ze;for(t=0;t<l;t++)t%3===0&&t&&(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]),r=(r<<8)+e[t];return i=l%3,i===0?(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]):i===2?(n+=o[r>>10&63],n+=o[r>>4&63],n+=o[r<<2&63],n+=o[64]):i===1&&(n+=o[r>>2&63],n+=o[r<<4&63],n+=o[64],n+=o[64]),n}function Vi(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Wn=new X("tag:yaml.org,2002:binary",{kind:"scalar",resolve:zi,construct:Ki,predicate:Vi,represent:qi}),Zi=Object.prototype.hasOwnProperty,Ji=Object.prototype.toString;function Qi(e){if(e===null)return!0;var n=[],r,t,i,l,o,a=e;for(r=0,t=a.length;r<t;r+=1){if(i=a[r],o=!1,Ji.call(i)!=="[object Object]")return!1;for(l in i)if(Zi.call(i,l))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(l)===-1)n.push(l);else return!1}return!0}function et(e){return e!==null?e:[]}var Hn=new X("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qi,construct:et}),nt=Object.prototype.toString;function rt(e){if(e===null)return!0;var n,r,t,i,l,o=e;for(l=new Array(o.length),n=0,r=o.length;n<r;n+=1){if(t=o[n],nt.call(t)!=="[object Object]"||(i=Object.keys(t),i.length!==1))return!1;l[n]=[i[0],t[i[0]]]}return!0}function it(e){if(e===null)return[];var n,r,t,i,l,o=e;for(l=new Array(o.length),n=0,r=o.length;n<r;n+=1)t=o[n],i=Object.keys(t),l[n]=[i[0],t[i[0]]];return l}var Un=new X("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:rt,construct:it}),tt=Object.prototype.hasOwnProperty;function ot(e){if(e===null)return!0;var n,r=e;for(n in r)if(tt.call(r,n)&&r[n]!==null)return!1;return!0}function lt(e){return e!==null?e:{}}var Xn=new X("tag:yaml.org,2002:set",{kind:"mapping",resolve:ot,construct:lt}),Je=Nn.extend({implicit:[Yn,Bn],explicit:[Wn,Hn,Un,Xn]}),ue=Object.prototype.hasOwnProperty,De=1,Gn=2,zn=3,Ye=4,Qe=1,at=2,Kn=3,ct=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,st=/[\x85\u2028\u2029]/,ft=/[,\[\]\{\}]/,qn=/^(?:!|!!|![a-z\-]+!)$/i,Vn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Zn(e){return Object.prototype.toString.call(e)}function ae(e){return e===10||e===13}function me(e){return e===9||e===32}function ee(e){return e===9||e===32||e===10||e===13}function ye(e){return e===44||e===91||e===93||e===123||e===125}function ut(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function pt(e){return e===120?2:e===117?4:e===85?8:0}function dt(e){return 48<=e&&e<=57?e-48:-1}function Jn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
27
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function ht(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Qn(e,n,r){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[n]=r}for(var er=new Array(256),nr=new Array(256),ve=0;ve<256;ve++)er[ve]=Jn(ve)?1:0,nr[ve]=Jn(ve);function xt(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Je,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function rr(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=vi(r),new V(n,r)}function k(e,n){throw rr(e,n)}function Be(e,n){e.onWarning&&e.onWarning.call(null,rr(e,n))}var ir={YAML:function(n,r,t){var i,l,o;n.version!==null&&k(n,"duplication of %YAML directive"),t.length!==1&&k(n,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(t[0]),i===null&&k(n,"ill-formed argument of the YAML directive"),l=parseInt(i[1],10),o=parseInt(i[2],10),l!==1&&k(n,"unacceptable YAML version of the document"),n.version=t[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&Be(n,"unsupported YAML version of the document")},TAG:function(n,r,t){var i,l;t.length!==2&&k(n,"TAG directive accepts exactly two arguments"),i=t[0],l=t[1],qn.test(i)||k(n,"ill-formed tag handle (first argument) of the TAG directive"),ue.call(n.tagMap,i)&&k(n,'there is a previously declared suffix for "'+i+'" tag handle'),Vn.test(l)||k(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{k(n,"tag prefix is malformed: "+l)}n.tagMap[i]=l}};function pe(e,n,r,t){var i,l,o,a;if(n<r){if(a=e.input.slice(n,r),t)for(i=0,l=a.length;i<l;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||k(e,"expected valid JSON character");else ct.test(a)&&k(e,"the stream contains non-printable characters");e.result+=a}}function tr(e,n,r,t){var i,l,o,a;for(U.isObject(r)||k(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)l=i[o],ue.call(n,l)||(Qn(n,l,r[l]),t[l]=!0)}function be(e,n,r,t,i,l,o,a,c){var s,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),s=0,u=i.length;s<u;s+=1)Array.isArray(i[s])&&k(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Zn(i[s])==="[object Object]"&&(i[s]="[object Object]");if(typeof i=="object"&&Zn(i)==="[object Object]"&&(i="[object Object]"),i=String(i),n===null&&(n={}),t==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(s=0,u=l.length;s<u;s+=1)tr(e,n,l[s],r);else tr(e,n,l,r);else!e.json&&!ue.call(r,i)&&ue.call(n,i)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,k(e,"duplicated mapping key")),Qn(n,i,l),delete r[i];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):k(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function B(e,n,r){for(var t=0,i=e.input.charCodeAt(e.position);i!==0;){for(;me(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(n&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(ae(i))for(en(e),i=e.input.charCodeAt(e.position),t++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&t!==0&&e.lineIndent<r&&Be(e,"deficient indentation"),t}function We(e){var n=e.position,r;return r=e.input.charCodeAt(n),!!((r===45||r===46)&&r===e.input.charCodeAt(n+1)&&r===e.input.charCodeAt(n+2)&&(n+=3,r=e.input.charCodeAt(n),r===0||ee(r)))}function nn(e,n){n===1?e.result+=" ":n>1&&(e.result+=U.repeat(`
28
- `,n-1))}function mt(e,n,r){var t,i,l,o,a,c,s,u,x=e.kind,p=e.result,f;if(f=e.input.charCodeAt(e.position),ee(f)||ye(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),ee(i)||r&&ye(i)))return!1;for(e.kind="scalar",e.result="",l=o=e.position,a=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),ee(i)||r&&ye(i))break}else if(f===35){if(t=e.input.charCodeAt(e.position-1),ee(t))break}else{if(e.position===e.lineStart&&We(e)||r&&ye(f))break;if(ae(f))if(c=e.line,s=e.lineStart,u=e.lineIndent,B(e,!1,-1),e.lineIndent>=n){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=s,e.lineIndent=u;break}}a&&(pe(e,l,o,!1),nn(e,e.line-c),l=o=e.position,a=!1),me(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return pe(e,l,o,!1),e.result?!0:(e.kind=x,e.result=p,!1)}function gt(e,n){var r,t,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(pe(e,t,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)t=e.position,e.position++,i=e.position;else return!0;else ae(r)?(pe(e,t,i,!0),nn(e,B(e,!1,n)),t=i=e.position):e.position===e.lineStart&&We(e)?k(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);k(e,"unexpected end of the stream within a single quoted scalar")}function yt(e,n){var r,t,i,l,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=t=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return pe(e,r,e.position,!0),e.position++,!0;if(a===92){if(pe(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),ae(a))B(e,!1,n);else if(a<256&&er[a])e.result+=nr[a],e.position++;else if((o=pt(a))>0){for(i=o,l=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=ut(a))>=0?l=(l<<4)+o:k(e,"expected hexadecimal character");e.result+=ht(l),e.position++}else k(e,"unknown escape sequence");r=t=e.position}else ae(a)?(pe(e,r,t,!0),nn(e,B(e,!1,n)),r=t=e.position):e.position===e.lineStart&&We(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,t=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}function vt(e,n){var r=!0,t,i,l,o=e.tag,a,c=e.anchor,s,u,x,p,f,m=Object.create(null),y,A,v,b;if(b=e.input.charCodeAt(e.position),b===91)u=93,f=!1,a=[];else if(b===123)u=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),b=e.input.charCodeAt(++e.position);b!==0;){if(B(e,!0,n),b=e.input.charCodeAt(e.position),b===u)return e.position++,e.tag=o,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?b===44&&k(e,"expected the node content, but found ','"):k(e,"missed comma between flow collection entries"),A=y=v=null,x=p=!1,b===63&&(s=e.input.charCodeAt(e.position+1),ee(s)&&(x=p=!0,e.position++,B(e,!0,n))),t=e.line,i=e.lineStart,l=e.position,Ae(e,n,De,!1,!0),A=e.tag,y=e.result,B(e,!0,n),b=e.input.charCodeAt(e.position),(p||e.line===t)&&b===58&&(x=!0,b=e.input.charCodeAt(++e.position),B(e,!0,n),Ae(e,n,De,!1,!0),v=e.result),f?be(e,a,m,A,y,v,t,i,l):x?a.push(be(e,null,m,A,y,v,t,i,l)):a.push(y),B(e,!0,n),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}k(e,"unexpected end of the stream within a flow collection")}function bt(e,n){var r,t,i=Qe,l=!1,o=!1,a=n,c=0,s=!1,u,x;if(x=e.input.charCodeAt(e.position),x===124)t=!1;else if(x===62)t=!0;else return!1;for(e.kind="scalar",e.result="";x!==0;)if(x=e.input.charCodeAt(++e.position),x===43||x===45)Qe===i?i=x===43?Kn:at:k(e,"repeat of a chomping mode identifier");else if((u=dt(x))>=0)u===0?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?k(e,"repeat of an indentation width identifier"):(a=n+u-1,o=!0);else break;if(me(x)){do x=e.input.charCodeAt(++e.position);while(me(x));if(x===35)do x=e.input.charCodeAt(++e.position);while(!ae(x)&&x!==0)}for(;x!==0;){for(en(e),e.lineIndent=0,x=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&x===32;)e.lineIndent++,x=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),ae(x)){c++;continue}if(e.lineIndent<a){i===Kn?e.result+=U.repeat(`
25
+ `;return a.replace(/\n$/,"")}var bi=vi,Ai=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ki=["scalar","sequence","mapping"];function Ci(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(t){n[String(t)]=r})}),n}function Si(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Ai.indexOf(r)===-1)throw new V('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Ci(n.styleAliases||null),ki.indexOf(this.kind)===-1)throw new V('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var X=Si;function _n(e,n){var r=[];return e[n].forEach(function(t){var i=r.length;r.forEach(function(l,o){l.tag===t.tag&&l.kind===t.kind&&l.multi===t.multi&&(i=o)}),r[i]=t}),r}function Ei(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function t(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(n=0,r=arguments.length;n<r;n+=1)arguments[n].forEach(t);return e}function Ve(e){return this.extend(e)}Ve.prototype.extend=function(n){var r=[],t=[];if(n instanceof X)t.push(n);else if(Array.isArray(n))t=t.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(r=r.concat(n.implicit)),n.explicit&&(t=t.concat(n.explicit));else throw new V("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(l){if(!(l instanceof X))throw new V("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new V("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new V("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),t.forEach(function(l){if(!(l instanceof X))throw new V("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Ve.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(t),i.compiledImplicit=_n(i,"implicit"),i.compiledExplicit=_n(i,"explicit"),i.compiledTypeMap=Ei(i.compiledImplicit,i.compiledExplicit),i};var Tn=Ve,On=new X("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),$n=new X("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),jn=new X("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Fn=new Tn({explicit:[On,$n,jn]});function wi(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function _i(){return null}function Ti(e){return e===null}var Ln=new X("tag:yaml.org,2002:null",{kind:"scalar",resolve:wi,construct:_i,predicate:Ti,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Oi(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function $i(e){return e==="true"||e==="True"||e==="TRUE"}function ji(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Rn=new X("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Oi,construct:$i,predicate:ji,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Fi(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Li(e){return 48<=e&&e<=55}function Ri(e){return 48<=e&&e<=57}function Ii(e){if(e===null)return!1;var n=e.length,r=0,t=!1,i;if(!n)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===n)return!0;if(i=e[++r],i==="b"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;t=!0}return t&&i!=="_"}if(i==="x"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(!Fi(e.charCodeAt(r)))return!1;t=!0}return t&&i!=="_"}if(i==="o"){for(r++;r<n;r++)if(i=e[r],i!=="_"){if(!Li(e.charCodeAt(r)))return!1;t=!0}return t&&i!=="_"}}if(i==="_")return!1;for(;r<n;r++)if(i=e[r],i!=="_"){if(!Ri(e.charCodeAt(r)))return!1;t=!0}return!(!t||i==="_")}function Mi(e){var n=e,r=1,t;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),t=n[0],(t==="-"||t==="+")&&(t==="-"&&(r=-1),n=n.slice(1),t=n[0]),n==="0")return 0;if(t==="0"){if(n[1]==="b")return r*parseInt(n.slice(2),2);if(n[1]==="x")return r*parseInt(n.slice(2),16);if(n[1]==="o")return r*parseInt(n.slice(2),8)}return r*parseInt(n,10)}function Ni(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!U.isNegativeZero(e)}var In=new X("tag:yaml.org,2002:int",{kind:"scalar",resolve:Ii,construct:Mi,predicate:Ni,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Pi=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Di(e){return!(e===null||!Pi.test(e)||e[e.length-1]==="_")}function Yi(e){var n,r;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var Bi=/^[-+]?[0-9]+e/;function Wi(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(U.isNegativeZero(e))return"-0.0";return r=e.toString(10),Bi.test(r)?r.replace("e",".e"):r}function Hi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||U.isNegativeZero(e))}var Mn=new X("tag:yaml.org,2002:float",{kind:"scalar",resolve:Di,construct:Yi,predicate:Hi,represent:Wi,defaultStyle:"lowercase"}),Nn=Fn.extend({implicit:[Ln,Rn,In,Mn]}),Pn=Nn,Dn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yn=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 Ui(e){return e===null?!1:Dn.exec(e)!==null||Yn.exec(e)!==null}function Xi(e){var n,r,t,i,l,o,a,c=0,s=null,u,x,p;if(n=Dn.exec(e),n===null&&(n=Yn.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],t=+n[2]-1,i=+n[3],!n[4])return new Date(Date.UTC(r,t,i));if(l=+n[4],o=+n[5],a=+n[6],n[7]){for(c=n[7].slice(0,3);c.length<3;)c+="0";c=+c}return n[9]&&(u=+n[10],x=+(n[11]||0),s=(u*60+x)*6e4,n[9]==="-"&&(s=-s)),p=new Date(Date.UTC(r,t,i,l,o,a,c)),s&&p.setTime(p.getTime()-s),p}function Gi(e){return e.toISOString()}var Bn=new X("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ui,construct:Xi,instanceOf:Date,represent:Gi});function zi(e){return e==="<<"||e===null}var Wn=new X("tag:yaml.org,2002:merge",{kind:"scalar",resolve:zi}),Ze=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
26
+ \r`;function Ki(e){if(e===null)return!1;var n,r,t=0,i=e.length,l=Ze;for(r=0;r<i;r++)if(n=l.indexOf(e.charAt(r)),!(n>64)){if(n<0)return!1;t+=6}return t%8===0}function qi(e){var n,r,t=e.replace(/[\r\n=]/g,""),i=t.length,l=Ze,o=0,a=[];for(n=0;n<i;n++)n%4===0&&n&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|l.indexOf(t.charAt(n));return r=i%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function Vi(e){var n="",r=0,t,i,l=e.length,o=Ze;for(t=0;t<l;t++)t%3===0&&t&&(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]),r=(r<<8)+e[t];return i=l%3,i===0?(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]):i===2?(n+=o[r>>10&63],n+=o[r>>4&63],n+=o[r<<2&63],n+=o[64]):i===1&&(n+=o[r>>2&63],n+=o[r<<4&63],n+=o[64],n+=o[64]),n}function Zi(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Hn=new X("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ki,construct:qi,predicate:Zi,represent:Vi}),Ji=Object.prototype.hasOwnProperty,Qi=Object.prototype.toString;function et(e){if(e===null)return!0;var n=[],r,t,i,l,o,a=e;for(r=0,t=a.length;r<t;r+=1){if(i=a[r],o=!1,Qi.call(i)!=="[object Object]")return!1;for(l in i)if(Ji.call(i,l))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(l)===-1)n.push(l);else return!1}return!0}function nt(e){return e!==null?e:[]}var Un=new X("tag:yaml.org,2002:omap",{kind:"sequence",resolve:et,construct:nt}),rt=Object.prototype.toString;function it(e){if(e===null)return!0;var n,r,t,i,l,o=e;for(l=new Array(o.length),n=0,r=o.length;n<r;n+=1){if(t=o[n],rt.call(t)!=="[object Object]"||(i=Object.keys(t),i.length!==1))return!1;l[n]=[i[0],t[i[0]]]}return!0}function tt(e){if(e===null)return[];var n,r,t,i,l,o=e;for(l=new Array(o.length),n=0,r=o.length;n<r;n+=1)t=o[n],i=Object.keys(t),l[n]=[i[0],t[i[0]]];return l}var Xn=new X("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:it,construct:tt}),ot=Object.prototype.hasOwnProperty;function lt(e){if(e===null)return!0;var n,r=e;for(n in r)if(ot.call(r,n)&&r[n]!==null)return!1;return!0}function at(e){return e!==null?e:{}}var Gn=new X("tag:yaml.org,2002:set",{kind:"mapping",resolve:lt,construct:at}),Je=Pn.extend({implicit:[Bn,Wn],explicit:[Hn,Un,Xn,Gn]}),ue=Object.prototype.hasOwnProperty,De=1,zn=2,Kn=3,Ye=4,Qe=1,ct=2,qn=3,st=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ft=/[\x85\u2028\u2029]/,ut=/[,\[\]\{\}]/,Vn=/^(?:!|!!|![a-z\-]+!)$/i,Zn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Jn(e){return Object.prototype.toString.call(e)}function ae(e){return e===10||e===13}function me(e){return e===9||e===32}function ee(e){return e===9||e===32||e===10||e===13}function ye(e){return e===44||e===91||e===93||e===123||e===125}function pt(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function dt(e){return e===120?2:e===117?4:e===85?8:0}function ht(e){return 48<=e&&e<=57?e-48:-1}function Qn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
27
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function xt(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function er(e,n,r){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[n]=r}for(var nr=new Array(256),rr=new Array(256),ve=0;ve<256;ve++)nr[ve]=Qn(ve)?1:0,rr[ve]=Qn(ve);function mt(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Je,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ir(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=bi(r),new V(n,r)}function k(e,n){throw ir(e,n)}function Be(e,n){e.onWarning&&e.onWarning.call(null,ir(e,n))}var tr={YAML:function(n,r,t){var i,l,o;n.version!==null&&k(n,"duplication of %YAML directive"),t.length!==1&&k(n,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(t[0]),i===null&&k(n,"ill-formed argument of the YAML directive"),l=parseInt(i[1],10),o=parseInt(i[2],10),l!==1&&k(n,"unacceptable YAML version of the document"),n.version=t[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&Be(n,"unsupported YAML version of the document")},TAG:function(n,r,t){var i,l;t.length!==2&&k(n,"TAG directive accepts exactly two arguments"),i=t[0],l=t[1],Vn.test(i)||k(n,"ill-formed tag handle (first argument) of the TAG directive"),ue.call(n.tagMap,i)&&k(n,'there is a previously declared suffix for "'+i+'" tag handle'),Zn.test(l)||k(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{k(n,"tag prefix is malformed: "+l)}n.tagMap[i]=l}};function pe(e,n,r,t){var i,l,o,a;if(n<r){if(a=e.input.slice(n,r),t)for(i=0,l=a.length;i<l;i+=1)o=a.charCodeAt(i),o===9||32<=o&&o<=1114111||k(e,"expected valid JSON character");else st.test(a)&&k(e,"the stream contains non-printable characters");e.result+=a}}function or(e,n,r,t){var i,l,o,a;for(U.isObject(r)||k(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),o=0,a=i.length;o<a;o+=1)l=i[o],ue.call(n,l)||(er(n,l,r[l]),t[l]=!0)}function be(e,n,r,t,i,l,o,a,c){var s,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),s=0,u=i.length;s<u;s+=1)Array.isArray(i[s])&&k(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Jn(i[s])==="[object Object]"&&(i[s]="[object Object]");if(typeof i=="object"&&Jn(i)==="[object Object]"&&(i="[object Object]"),i=String(i),n===null&&(n={}),t==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(s=0,u=l.length;s<u;s+=1)or(e,n,l[s],r);else or(e,n,l,r);else!e.json&&!ue.call(r,i)&&ue.call(n,i)&&(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,k(e,"duplicated mapping key")),er(n,i,l),delete r[i];return n}function en(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):k(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function B(e,n,r){for(var t=0,i=e.input.charCodeAt(e.position);i!==0;){for(;me(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(n&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(ae(i))for(en(e),i=e.input.charCodeAt(e.position),t++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&t!==0&&e.lineIndent<r&&Be(e,"deficient indentation"),t}function We(e){var n=e.position,r;return r=e.input.charCodeAt(n),!!((r===45||r===46)&&r===e.input.charCodeAt(n+1)&&r===e.input.charCodeAt(n+2)&&(n+=3,r=e.input.charCodeAt(n),r===0||ee(r)))}function nn(e,n){n===1?e.result+=" ":n>1&&(e.result+=U.repeat(`
28
+ `,n-1))}function gt(e,n,r){var t,i,l,o,a,c,s,u,x=e.kind,p=e.result,f;if(f=e.input.charCodeAt(e.position),ee(f)||ye(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),ee(i)||r&&ye(i)))return!1;for(e.kind="scalar",e.result="",l=o=e.position,a=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),ee(i)||r&&ye(i))break}else if(f===35){if(t=e.input.charCodeAt(e.position-1),ee(t))break}else{if(e.position===e.lineStart&&We(e)||r&&ye(f))break;if(ae(f))if(c=e.line,s=e.lineStart,u=e.lineIndent,B(e,!1,-1),e.lineIndent>=n){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=s,e.lineIndent=u;break}}a&&(pe(e,l,o,!1),nn(e,e.line-c),l=o=e.position,a=!1),me(f)||(o=e.position+1),f=e.input.charCodeAt(++e.position)}return pe(e,l,o,!1),e.result?!0:(e.kind=x,e.result=p,!1)}function yt(e,n){var r,t,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(pe(e,t,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)t=e.position,e.position++,i=e.position;else return!0;else ae(r)?(pe(e,t,i,!0),nn(e,B(e,!1,n)),t=i=e.position):e.position===e.lineStart&&We(e)?k(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);k(e,"unexpected end of the stream within a single quoted scalar")}function vt(e,n){var r,t,i,l,o,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=t=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return pe(e,r,e.position,!0),e.position++,!0;if(a===92){if(pe(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),ae(a))B(e,!1,n);else if(a<256&&nr[a])e.result+=rr[a],e.position++;else if((o=dt(a))>0){for(i=o,l=0;i>0;i--)a=e.input.charCodeAt(++e.position),(o=pt(a))>=0?l=(l<<4)+o:k(e,"expected hexadecimal character");e.result+=xt(l),e.position++}else k(e,"unknown escape sequence");r=t=e.position}else ae(a)?(pe(e,r,t,!0),nn(e,B(e,!1,n)),r=t=e.position):e.position===e.lineStart&&We(e)?k(e,"unexpected end of the document within a double quoted scalar"):(e.position++,t=e.position)}k(e,"unexpected end of the stream within a double quoted scalar")}function bt(e,n){var r=!0,t,i,l,o=e.tag,a,c=e.anchor,s,u,x,p,f,m=Object.create(null),y,A,v,b;if(b=e.input.charCodeAt(e.position),b===91)u=93,f=!1,a=[];else if(b===123)u=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),b=e.input.charCodeAt(++e.position);b!==0;){if(B(e,!0,n),b=e.input.charCodeAt(e.position),b===u)return e.position++,e.tag=o,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;r?b===44&&k(e,"expected the node content, but found ','"):k(e,"missed comma between flow collection entries"),A=y=v=null,x=p=!1,b===63&&(s=e.input.charCodeAt(e.position+1),ee(s)&&(x=p=!0,e.position++,B(e,!0,n))),t=e.line,i=e.lineStart,l=e.position,Ae(e,n,De,!1,!0),A=e.tag,y=e.result,B(e,!0,n),b=e.input.charCodeAt(e.position),(p||e.line===t)&&b===58&&(x=!0,b=e.input.charCodeAt(++e.position),B(e,!0,n),Ae(e,n,De,!1,!0),v=e.result),f?be(e,a,m,A,y,v,t,i,l):x?a.push(be(e,null,m,A,y,v,t,i,l)):a.push(y),B(e,!0,n),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}k(e,"unexpected end of the stream within a flow collection")}function At(e,n){var r,t,i=Qe,l=!1,o=!1,a=n,c=0,s=!1,u,x;if(x=e.input.charCodeAt(e.position),x===124)t=!1;else if(x===62)t=!0;else return!1;for(e.kind="scalar",e.result="";x!==0;)if(x=e.input.charCodeAt(++e.position),x===43||x===45)Qe===i?i=x===43?qn:ct:k(e,"repeat of a chomping mode identifier");else if((u=ht(x))>=0)u===0?k(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?k(e,"repeat of an indentation width identifier"):(a=n+u-1,o=!0);else break;if(me(x)){do x=e.input.charCodeAt(++e.position);while(me(x));if(x===35)do x=e.input.charCodeAt(++e.position);while(!ae(x)&&x!==0)}for(;x!==0;){for(en(e),e.lineIndent=0,x=e.input.charCodeAt(e.position);(!o||e.lineIndent<a)&&x===32;)e.lineIndent++,x=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>a&&(a=e.lineIndent),ae(x)){c++;continue}if(e.lineIndent<a){i===qn?e.result+=U.repeat(`
29
29
  `,l?1+c:c):i===Qe&&l&&(e.result+=`
30
30
  `);break}for(t?me(x)?(s=!0,e.result+=U.repeat(`
31
31
  `,l?1+c:c)):s?(s=!1,e.result+=U.repeat(`
32
32
  `,c+1)):c===0?l&&(e.result+=" "):e.result+=U.repeat(`
33
33
  `,c):e.result+=U.repeat(`
34
- `,l?1+c:c),l=!0,o=!0,c=0,r=e.position;!ae(x)&&x!==0;)x=e.input.charCodeAt(++e.position);pe(e,r,e.position,!1)}return!0}function or(e,n){var r,t=e.tag,i=e.anchor,l=[],o,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,k(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!ee(o))));){if(a=!0,e.position++,B(e,!0,-1)&&e.lineIndent<=n){l.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Ae(e,n,zn,!1,!0),l.push(e.result),B(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>n)&&c!==0)k(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return a?(e.tag=t,e.anchor=i,e.kind="sequence",e.result=l,!0):!1}function At(e,n,r){var t,i,l,o,a,c,s=e.tag,u=e.anchor,x={},p=Object.create(null),f=null,m=null,y=null,A=!1,v=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=x),b=e.input.charCodeAt(e.position);b!==0;){if(!A&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,k(e,"tab characters must not be used in indentation")),t=e.input.charCodeAt(e.position+1),l=e.line,(b===63||b===58)&&ee(t))b===63?(A&&(be(e,x,p,f,m,null,o,a,c),f=m=y=null),v=!0,A=!0,i=!0):A?(A=!1,i=!0):k(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=t;else{if(o=e.line,a=e.lineStart,c=e.position,!Ae(e,r,Gn,!1,!0))break;if(e.line===l){for(b=e.input.charCodeAt(e.position);me(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),ee(b)||k(e,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(be(e,x,p,f,m,null,o,a,c),f=m=y=null),v=!0,A=!1,i=!1,f=e.tag,m=e.result;else if(v)k(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=u,!0}else if(v)k(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=u,!0}if((e.line===l||e.lineIndent>n)&&(A&&(o=e.line,a=e.lineStart,c=e.position),Ae(e,n,Ye,!0,i)&&(A?m=e.result:y=e.result),A||(be(e,x,p,f,m,y,o,a,c),f=m=y=null),B(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&b!==0)k(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return A&&be(e,x,p,f,m,null,o,a,c),v&&(e.tag=s,e.anchor=u,e.kind="mapping",e.result=x),v}function kt(e){var n,r=!1,t=!1,i,l,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&k(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(t=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",n=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(l=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):k(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ee(o);)o===33&&(t?k(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(n-1,e.position+1),qn.test(i)||k(e,"named tag handle cannot contain such characters"),t=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);l=e.input.slice(n,e.position),ft.test(l)&&k(e,"tag suffix cannot contain flow indicator characters")}l&&!Vn.test(l)&&k(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{k(e,"tag name is malformed: "+l)}return r?e.tag=l:ue.call(e.tagMap,i)?e.tag=e.tagMap[i]+l:i==="!"?e.tag="!"+l:i==="!!"?e.tag="tag:yaml.org,2002:"+l:k(e,'undeclared tag handle "'+i+'"'),!0}function Ct(e){var n,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&k(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!ee(r)&&!ye(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&k(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function St(e){var n,r,t;if(t=e.input.charCodeAt(e.position),t!==42)return!1;for(t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!ee(t)&&!ye(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&k(e,"name of an alias node must contain at least one character"),r=e.input.slice(n,e.position),ue.call(e.anchorMap,r)||k(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],B(e,!0,-1),!0}function Ae(e,n,r,t,i){var l,o,a,c=1,s=!1,u=!1,x,p,f,m,y,A;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=o=a=Ye===r||zn===r,t&&B(e,!0,-1)&&(s=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;kt(e)||Ct(e);)B(e,!0,-1)?(s=!0,a=l,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):a=!1;if(a&&(a=s||i),(c===1||Ye===r)&&(De===r||Gn===r?y=n:y=n+1,A=e.position-e.lineStart,c===1?a&&(or(e,A)||At(e,A,y))||vt(e,y)?u=!0:(o&&bt(e,y)||gt(e,y)||yt(e,y)?u=!0:St(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&k(e,"alias node should not have any properties")):mt(e,y,De===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=a&&or(e,A))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&k(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),x=0,p=e.implicitTypes.length;x<p;x+=1)if(m=e.implicitTypes[x],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ue.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,f=e.typeMap.multi[e.kind||"fallback"],x=0,p=f.length;x<p;x+=1)if(e.tag.slice(0,f[x].tag.length)===f[x].tag){m=f[x];break}m||k(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&k(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function wt(e){var n=e.position,r,t,i,l=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(B(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(l=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!ee(o);)o=e.input.charCodeAt(++e.position);for(t=e.input.slice(r,e.position),i=[],t.length<1&&k(e,"directive name must not be less than one character in length");o!==0;){for(;me(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ae(o));break}if(ae(o))break;for(r=e.position;o!==0&&!ee(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}o!==0&&en(e),ue.call(ir,t)?ir[t](e,t,i):Be(e,'unknown document directive "'+t+'"')}if(B(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,B(e,!0,-1)):l&&k(e,"directives end mark is expected"),Ae(e,e.lineIndent-1,Ye,!1,!0),B(e,!0,-1),e.checkLineBreaks&&st.test(e.input.slice(n,e.position))&&Be(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&We(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,B(e,!0,-1));return}if(e.position<e.length-1)k(e,"end of the stream or a document separator is expected");else return}function lr(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
35
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new xt(e,n),t=e.indexOf("\0");for(t!==-1&&(r.position=t,k(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)wt(r);return r.documents}function Et(e,n,r){n!==null&&typeof n=="object"&&typeof r>"u"&&(r=n,n=null);var t=lr(e,r);if(typeof n!="function")return t;for(var i=0,l=t.length;i<l;i+=1)n(t[i])}function _t(e,n){var r=lr(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new V("expected a single document in the stream, but found more")}}var Tt=Et,$t=_t,ar={loadAll:Tt,load:$t},cr=Object.prototype.toString,sr=Object.prototype.hasOwnProperty,rn=65279,Ot=9,Te=10,jt=13,Ft=32,Lt=33,It=34,tn=35,Rt=37,Mt=38,Nt=39,Pt=42,fr=44,Dt=45,He=58,Yt=61,Bt=62,Wt=63,Ht=64,ur=91,pr=93,Ut=96,dr=123,Xt=124,hr=125,K={};K[0]="\\0",K[7]="\\a",K[8]="\\b",K[9]="\\t",K[10]="\\n",K[11]="\\v",K[12]="\\f",K[13]="\\r",K[27]="\\e",K[34]='\\"',K[92]="\\\\",K[133]="\\N",K[160]="\\_",K[8232]="\\L",K[8233]="\\P";var Gt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],zt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Kt(e,n){var r,t,i,l,o,a,c;if(n===null)return{};for(r={},t=Object.keys(n),i=0,l=t.length;i<l;i+=1)o=t[i],a=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&sr.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[o]=a;return r}function qt(e){var n,r,t;if(n=e.toString(16).toUpperCase(),e<=255)r="x",t=2;else if(e<=65535)r="u",t=4;else if(e<=4294967295)r="U",t=8;else throw new V("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+U.repeat("0",t-n.length)+n}var Vt=1,$e=2;function Zt(e){this.schema=e.schema||Je,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=U.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Kt(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?$e:Vt,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function xr(e,n){for(var r=U.repeat(" ",n),t=0,i=-1,l="",o,a=e.length;t<a;)i=e.indexOf(`
34
+ `,l?1+c:c),l=!0,o=!0,c=0,r=e.position;!ae(x)&&x!==0;)x=e.input.charCodeAt(++e.position);pe(e,r,e.position,!1)}return!0}function lr(e,n){var r,t=e.tag,i=e.anchor,l=[],o,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,k(e,"tab characters must not be used in indentation")),!(c!==45||(o=e.input.charCodeAt(e.position+1),!ee(o))));){if(a=!0,e.position++,B(e,!0,-1)&&e.lineIndent<=n){l.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Ae(e,n,Kn,!1,!0),l.push(e.result),B(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>n)&&c!==0)k(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return a?(e.tag=t,e.anchor=i,e.kind="sequence",e.result=l,!0):!1}function kt(e,n,r){var t,i,l,o,a,c,s=e.tag,u=e.anchor,x={},p=Object.create(null),f=null,m=null,y=null,A=!1,v=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=x),b=e.input.charCodeAt(e.position);b!==0;){if(!A&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,k(e,"tab characters must not be used in indentation")),t=e.input.charCodeAt(e.position+1),l=e.line,(b===63||b===58)&&ee(t))b===63?(A&&(be(e,x,p,f,m,null,o,a,c),f=m=y=null),v=!0,A=!0,i=!0):A?(A=!1,i=!0):k(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=t;else{if(o=e.line,a=e.lineStart,c=e.position,!Ae(e,r,zn,!1,!0))break;if(e.line===l){for(b=e.input.charCodeAt(e.position);me(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),ee(b)||k(e,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(be(e,x,p,f,m,null,o,a,c),f=m=y=null),v=!0,A=!1,i=!1,f=e.tag,m=e.result;else if(v)k(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=u,!0}else if(v)k(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=u,!0}if((e.line===l||e.lineIndent>n)&&(A&&(o=e.line,a=e.lineStart,c=e.position),Ae(e,n,Ye,!0,i)&&(A?m=e.result:y=e.result),A||(be(e,x,p,f,m,y,o,a,c),f=m=y=null),B(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&b!==0)k(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return A&&be(e,x,p,f,m,null,o,a,c),v&&(e.tag=s,e.anchor=u,e.kind="mapping",e.result=x),v}function Ct(e){var n,r=!1,t=!1,i,l,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&k(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(r=!0,o=e.input.charCodeAt(++e.position)):o===33?(t=!0,i="!!",o=e.input.charCodeAt(++e.position)):i="!",n=e.position,r){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(l=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):k(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!ee(o);)o===33&&(t?k(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(n-1,e.position+1),Vn.test(i)||k(e,"named tag handle cannot contain such characters"),t=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);l=e.input.slice(n,e.position),ut.test(l)&&k(e,"tag suffix cannot contain flow indicator characters")}l&&!Zn.test(l)&&k(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{k(e,"tag name is malformed: "+l)}return r?e.tag=l:ue.call(e.tagMap,i)?e.tag=e.tagMap[i]+l:i==="!"?e.tag="!"+l:i==="!!"?e.tag="tag:yaml.org,2002:"+l:k(e,'undeclared tag handle "'+i+'"'),!0}function St(e){var n,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&k(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!ee(r)&&!ye(r);)r=e.input.charCodeAt(++e.position);return e.position===n&&k(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function Et(e){var n,r,t;if(t=e.input.charCodeAt(e.position),t!==42)return!1;for(t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!ee(t)&&!ye(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&k(e,"name of an alias node must contain at least one character"),r=e.input.slice(n,e.position),ue.call(e.anchorMap,r)||k(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],B(e,!0,-1),!0}function Ae(e,n,r,t,i){var l,o,a,c=1,s=!1,u=!1,x,p,f,m,y,A;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=o=a=Ye===r||Kn===r,t&&B(e,!0,-1)&&(s=!0,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)),c===1)for(;Ct(e)||St(e);)B(e,!0,-1)?(s=!0,a=l,e.lineIndent>n?c=1:e.lineIndent===n?c=0:e.lineIndent<n&&(c=-1)):a=!1;if(a&&(a=s||i),(c===1||Ye===r)&&(De===r||zn===r?y=n:y=n+1,A=e.position-e.lineStart,c===1?a&&(lr(e,A)||kt(e,A,y))||bt(e,y)?u=!0:(o&&At(e,y)||yt(e,y)||vt(e,y)?u=!0:Et(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&k(e,"alias node should not have any properties")):gt(e,y,De===r)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=a&&lr(e,A))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&k(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),x=0,p=e.implicitTypes.length;x<p;x+=1)if(m=e.implicitTypes[x],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ue.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,f=e.typeMap.multi[e.kind||"fallback"],x=0,p=f.length;x<p;x+=1)if(e.tag.slice(0,f[x].tag.length)===f[x].tag){m=f[x];break}m||k(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&k(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):k(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||u}function wt(e){var n=e.position,r,t,i,l=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(B(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(l=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!ee(o);)o=e.input.charCodeAt(++e.position);for(t=e.input.slice(r,e.position),i=[],t.length<1&&k(e,"directive name must not be less than one character in length");o!==0;){for(;me(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!ae(o));break}if(ae(o))break;for(r=e.position;o!==0&&!ee(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}o!==0&&en(e),ue.call(tr,t)?tr[t](e,t,i):Be(e,'unknown document directive "'+t+'"')}if(B(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,B(e,!0,-1)):l&&k(e,"directives end mark is expected"),Ae(e,e.lineIndent-1,Ye,!1,!0),B(e,!0,-1),e.checkLineBreaks&&ft.test(e.input.slice(n,e.position))&&Be(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&We(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,B(e,!0,-1));return}if(e.position<e.length-1)k(e,"end of the stream or a document separator is expected");else return}function ar(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
35
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new mt(e,n),t=e.indexOf("\0");for(t!==-1&&(r.position=t,k(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)wt(r);return r.documents}function _t(e,n,r){n!==null&&typeof n=="object"&&typeof r>"u"&&(r=n,n=null);var t=ar(e,r);if(typeof n!="function")return t;for(var i=0,l=t.length;i<l;i+=1)n(t[i])}function Tt(e,n){var r=ar(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new V("expected a single document in the stream, but found more")}}var Ot=_t,$t=Tt,cr={loadAll:Ot,load:$t},sr=Object.prototype.toString,fr=Object.prototype.hasOwnProperty,rn=65279,jt=9,Te=10,Ft=13,Lt=32,Rt=33,It=34,tn=35,Mt=37,Nt=38,Pt=39,Dt=42,ur=44,Yt=45,He=58,Bt=61,Wt=62,Ht=63,Ut=64,pr=91,dr=93,Xt=96,hr=123,Gt=124,xr=125,K={};K[0]="\\0",K[7]="\\a",K[8]="\\b",K[9]="\\t",K[10]="\\n",K[11]="\\v",K[12]="\\f",K[13]="\\r",K[27]="\\e",K[34]='\\"',K[92]="\\\\",K[133]="\\N",K[160]="\\_",K[8232]="\\L",K[8233]="\\P";var zt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Kt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function qt(e,n){var r,t,i,l,o,a,c;if(n===null)return{};for(r={},t=Object.keys(n),i=0,l=t.length;i<l;i+=1)o=t[i],a=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&fr.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[o]=a;return r}function Vt(e){var n,r,t;if(n=e.toString(16).toUpperCase(),e<=255)r="x",t=2;else if(e<=65535)r="u",t=4;else if(e<=4294967295)r="U",t=8;else throw new V("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+U.repeat("0",t-n.length)+n}var Zt=1,Oe=2;function Jt(e){this.schema=e.schema||Je,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=U.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=qt(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Oe:Zt,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function mr(e,n){for(var r=U.repeat(" ",n),t=0,i=-1,l="",o,a=e.length;t<a;)i=e.indexOf(`
36
36
  `,t),i===-1?(o=e.slice(t),t=a):(o=e.slice(t,i+1),t=i+1),o.length&&o!==`
37
37
  `&&(l+=r),l+=o;return l}function on(e,n){return`
38
- `+U.repeat(" ",e.indent*n)}function Jt(e,n){var r,t,i;for(r=0,t=e.implicitTypes.length;r<t;r+=1)if(i=e.implicitTypes[r],i.resolve(n))return!0;return!1}function Ue(e){return e===Ft||e===Ot}function Oe(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function mr(e){return Oe(e)&&e!==rn&&e!==jt&&e!==Te}function gr(e,n,r){var t=mr(e),i=t&&!Ue(e);return(r?t:t&&e!==fr&&e!==ur&&e!==pr&&e!==dr&&e!==hr)&&e!==tn&&!(n===He&&!i)||mr(n)&&!Ue(n)&&e===tn||n===He&&i}function Qt(e){return Oe(e)&&e!==rn&&!Ue(e)&&e!==Dt&&e!==Wt&&e!==He&&e!==fr&&e!==ur&&e!==pr&&e!==dr&&e!==hr&&e!==tn&&e!==Mt&&e!==Pt&&e!==Lt&&e!==Xt&&e!==Yt&&e!==Bt&&e!==Nt&&e!==It&&e!==Rt&&e!==Ht&&e!==Ut}function eo(e){return!Ue(e)&&e!==He}function je(e,n){var r=e.charCodeAt(n),t;return r>=55296&&r<=56319&&n+1<e.length&&(t=e.charCodeAt(n+1),t>=56320&&t<=57343)?(r-55296)*1024+t-56320+65536:r}function yr(e){var n=/^\n* /;return n.test(e)}var vr=1,ln=2,br=3,Ar=4,ke=5;function no(e,n,r,t,i,l,o,a){var c,s=0,u=null,x=!1,p=!1,f=t!==-1,m=-1,y=Qt(je(e,0))&&eo(je(e,e.length-1));if(n||o)for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=je(e,c),!Oe(s))return ke;y=y&&gr(s,u,a),u=s}else{for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=je(e,c),s===Te)x=!0,f&&(p=p||c-m-1>t&&e[m+1]!==" ",m=c);else if(!Oe(s))return ke;y=y&&gr(s,u,a),u=s}p=p||f&&c-m-1>t&&e[m+1]!==" "}return!x&&!p?y&&!o&&!i(e)?vr:l===$e?ke:ln:r>9&&yr(e)?ke:o?l===$e?ke:ln:p?Ar:br}function ro(e,n,r,t,i){e.dump=(function(){if(n.length===0)return e.quotingType===$e?'""':"''";if(!e.noCompatMode&&(Gt.indexOf(n)!==-1||zt.test(n)))return e.quotingType===$e?'"'+n+'"':"'"+n+"'";var l=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),a=t||e.flowLevel>-1&&r>=e.flowLevel;function c(s){return Jt(e,s)}switch(no(n,a,e.indent,o,c,e.quotingType,e.forceQuotes&&!t,i)){case vr:return n;case ln:return"'"+n.replace(/'/g,"''")+"'";case br:return"|"+kr(n,e.indent)+Cr(xr(n,l));case Ar:return">"+kr(n,e.indent)+Cr(xr(io(n,o),l));case ke:return'"'+to(n)+'"';default:throw new V("impossible error: invalid scalar style")}})()}function kr(e,n){var r=yr(e)?String(n):"",t=e[e.length-1]===`
38
+ `+U.repeat(" ",e.indent*n)}function Qt(e,n){var r,t,i;for(r=0,t=e.implicitTypes.length;r<t;r+=1)if(i=e.implicitTypes[r],i.resolve(n))return!0;return!1}function Ue(e){return e===Lt||e===jt}function $e(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==rn||65536<=e&&e<=1114111}function gr(e){return $e(e)&&e!==rn&&e!==Ft&&e!==Te}function yr(e,n,r){var t=gr(e),i=t&&!Ue(e);return(r?t:t&&e!==ur&&e!==pr&&e!==dr&&e!==hr&&e!==xr)&&e!==tn&&!(n===He&&!i)||gr(n)&&!Ue(n)&&e===tn||n===He&&i}function eo(e){return $e(e)&&e!==rn&&!Ue(e)&&e!==Yt&&e!==Ht&&e!==He&&e!==ur&&e!==pr&&e!==dr&&e!==hr&&e!==xr&&e!==tn&&e!==Nt&&e!==Dt&&e!==Rt&&e!==Gt&&e!==Bt&&e!==Wt&&e!==Pt&&e!==It&&e!==Mt&&e!==Ut&&e!==Xt}function no(e){return!Ue(e)&&e!==He}function je(e,n){var r=e.charCodeAt(n),t;return r>=55296&&r<=56319&&n+1<e.length&&(t=e.charCodeAt(n+1),t>=56320&&t<=57343)?(r-55296)*1024+t-56320+65536:r}function vr(e){var n=/^\n* /;return n.test(e)}var br=1,ln=2,Ar=3,kr=4,ke=5;function ro(e,n,r,t,i,l,o,a){var c,s=0,u=null,x=!1,p=!1,f=t!==-1,m=-1,y=eo(je(e,0))&&no(je(e,e.length-1));if(n||o)for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=je(e,c),!$e(s))return ke;y=y&&yr(s,u,a),u=s}else{for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=je(e,c),s===Te)x=!0,f&&(p=p||c-m-1>t&&e[m+1]!==" ",m=c);else if(!$e(s))return ke;y=y&&yr(s,u,a),u=s}p=p||f&&c-m-1>t&&e[m+1]!==" "}return!x&&!p?y&&!o&&!i(e)?br:l===Oe?ke:ln:r>9&&vr(e)?ke:o?l===Oe?ke:ln:p?kr:Ar}function io(e,n,r,t,i){e.dump=(function(){if(n.length===0)return e.quotingType===Oe?'""':"''";if(!e.noCompatMode&&(zt.indexOf(n)!==-1||Kt.test(n)))return e.quotingType===Oe?'"'+n+'"':"'"+n+"'";var l=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),a=t||e.flowLevel>-1&&r>=e.flowLevel;function c(s){return Qt(e,s)}switch(ro(n,a,e.indent,o,c,e.quotingType,e.forceQuotes&&!t,i)){case br:return n;case ln:return"'"+n.replace(/'/g,"''")+"'";case Ar:return"|"+Cr(n,e.indent)+Sr(mr(n,l));case kr:return">"+Cr(n,e.indent)+Sr(mr(to(n,o),l));case ke:return'"'+oo(n)+'"';default:throw new V("impossible error: invalid scalar style")}})()}function Cr(e,n){var r=vr(e)?String(n):"",t=e[e.length-1]===`
39
39
  `,i=t&&(e[e.length-2]===`
40
40
  `||e===`
41
41
  `),l=i?"+":t?"":"-";return r+l+`
42
- `}function Cr(e){return e[e.length-1]===`
43
- `?e.slice(0,-1):e}function io(e,n){for(var r=/(\n+)([^\n]*)/g,t=(function(){var s=e.indexOf(`
44
- `);return s=s!==-1?s:e.length,r.lastIndex=s,Sr(e.slice(0,s),n)})(),i=e[0]===`
42
+ `}function Sr(e){return e[e.length-1]===`
43
+ `?e.slice(0,-1):e}function to(e,n){for(var r=/(\n+)([^\n]*)/g,t=(function(){var s=e.indexOf(`
44
+ `);return s=s!==-1?s:e.length,r.lastIndex=s,Er(e.slice(0,s),n)})(),i=e[0]===`
45
45
  `||e[0]===" ",l,o;o=r.exec(e);){var a=o[1],c=o[2];l=c[0]===" ",t+=a+(!i&&!l&&c!==""?`
46
- `:"")+Sr(c,n),i=l}return t}function Sr(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,t,i=0,l,o=0,a=0,c="";t=r.exec(e);)a=t.index,a-i>n&&(l=o>i?o:a,c+=`
46
+ `:"")+Er(c,n),i=l}return t}function Er(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,t,i=0,l,o=0,a=0,c="";t=r.exec(e);)a=t.index,a-i>n&&(l=o>i?o:a,c+=`
47
47
  `+e.slice(i,l),i=l+1),o=a;return c+=`
48
48
  `,e.length-i>n&&o>i?c+=e.slice(i,o)+`
49
- `+e.slice(o+1):c+=e.slice(i),c.slice(1)}function to(e){for(var n="",r=0,t,i=0;i<e.length;r>=65536?i+=2:i++)r=je(e,i),t=K[r],!t&&Oe(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||qt(r);return n}function oo(e,n,r){var t="",i=e.tag,l,o,a;for(l=0,o=r.length;l<o;l+=1)a=r[l],e.replacer&&(a=e.replacer.call(r,String(l),a)),(ce(e,n,a,!1,!1)||typeof a>"u"&&ce(e,n,null,!1,!1))&&(t!==""&&(t+=","+(e.condenseFlow?"":" ")),t+=e.dump);e.tag=i,e.dump="["+t+"]"}function wr(e,n,r,t){var i="",l=e.tag,o,a,c;for(o=0,a=r.length;o<a;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(ce(e,n+1,c,!0,!0,!1,!0)||typeof c>"u"&&ce(e,n+1,null,!0,!0,!1,!0))&&((!t||i!=="")&&(i+=on(e,n)),e.dump&&Te===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=l,e.dump=i||"[]"}function lo(e,n,r){var t="",i=e.tag,l=Object.keys(r),o,a,c,s,u;for(o=0,a=l.length;o<a;o+=1)u="",t!==""&&(u+=", "),e.condenseFlow&&(u+='"'),c=l[o],s=r[c],e.replacer&&(s=e.replacer.call(r,c,s)),ce(e,n,c,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ce(e,n,s,!1,!1)&&(u+=e.dump,t+=u));e.tag=i,e.dump="{"+t+"}"}function ao(e,n,r,t){var i="",l=e.tag,o=Object.keys(r),a,c,s,u,x,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new V("sortKeys must be a boolean or a function");for(a=0,c=o.length;a<c;a+=1)p="",(!t||i!=="")&&(p+=on(e,n)),s=o[a],u=r[s],e.replacer&&(u=e.replacer.call(r,s,u)),ce(e,n+1,s,!0,!0,!0)&&(x=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,x&&(e.dump&&Te===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,x&&(p+=on(e,n)),ce(e,n+1,u,!0,x)&&(e.dump&&Te===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=l,e.dump=i||"{}"}function Er(e,n,r){var t,i,l,o,a,c;for(i=r?e.explicitTypes:e.implicitTypes,l=0,o=i.length;l<o;l+=1)if(a=i[l],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof n=="object"&&n instanceof a.instanceOf)&&(!a.predicate||a.predicate(n))){if(r?a.multi&&a.representName?e.tag=a.representName(n):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,cr.call(a.represent)==="[object Function]")t=a.represent(n,c);else if(sr.call(a.represent,c))t=a.represent[c](n,c);else throw new V("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=t}return!0}return!1}function ce(e,n,r,t,i,l,o){e.tag=null,e.dump=r,Er(e,r,!1)||Er(e,r,!0);var a=cr.call(e.dump),c=t,s;t&&(t=e.flowLevel<0||e.flowLevel>n);var u=a==="[object Object]"||a==="[object Array]",x,p;if(u&&(x=e.duplicates.indexOf(r),p=x!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(i=!1),p&&e.usedDuplicates[x])e.dump="*ref_"+x;else{if(u&&p&&!e.usedDuplicates[x]&&(e.usedDuplicates[x]=!0),a==="[object Object]")t&&Object.keys(e.dump).length!==0?(ao(e,n,e.dump,i),p&&(e.dump="&ref_"+x+e.dump)):(lo(e,n,e.dump),p&&(e.dump="&ref_"+x+" "+e.dump));else if(a==="[object Array]")t&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?wr(e,n-1,e.dump,i):wr(e,n,e.dump,i),p&&(e.dump="&ref_"+x+e.dump)):(oo(e,n,e.dump),p&&(e.dump="&ref_"+x+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&ro(e,e.dump,n,l,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new V("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function co(e,n){var r=[],t=[],i,l;for(an(e,r,t),i=0,l=t.length;i<l;i+=1)n.duplicates.push(r[t[i]]);n.usedDuplicates=new Array(l)}function an(e,n,r){var t,i,l;if(e!==null&&typeof e=="object")if(i=n.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(n.push(e),Array.isArray(e))for(i=0,l=e.length;i<l;i+=1)an(e[i],n,r);else for(t=Object.keys(e),i=0,l=t.length;i<l;i+=1)an(e[t[i]],n,r)}function so(e,n){n=n||{};var r=new Zt(n);r.noRefs||co(e,r);var t=e;return r.replacer&&(t=r.replacer.call({"":t},"",t)),ce(r,0,t,!0,!0)?r.dump+`
50
- `:""}var fo=so,uo={dump:fo};function cn(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var po=X,ho=_n,xo=jn,mo=Mn,go=Nn,yo=Je,vo=ar.load,bo=ar.loadAll,Ao=uo.dump,ko=V,Co={binary:Wn,float:Rn,map:On,null:Fn,pairs:Un,set:Xn,timestamp:Yn,bool:Ln,int:In,merge:Bn,omap:Hn,seq:$n,str:Tn},So=cn("safeLoad","load"),wo=cn("safeLoadAll","loadAll"),Eo=cn("safeDump","dump"),_o={Type:po,Schema:ho,FAILSAFE_SCHEMA:xo,JSON_SCHEMA:mo,CORE_SCHEMA:go,DEFAULT_SCHEMA:yo,load:vo,loadAll:bo,dump:Ao,YAMLException:ko,types:Co,safeLoad:So,safeLoadAll:wo,safeDump:Eo};function To(e){const n=e.match(/^(\d+)x(\d+)x(\d+)$/);return n?{width:parseInt(n[1],10),depth:parseInt(n[2],10),height:parseInt(n[3],10)}:null}function _r(e){const n=e.match(/^(\d+)x(\d+)$/);return n?{width:parseInt(n[1],10),height:parseInt(n[2],10)}:null}function $o(e){const n=e.match(/^(-?\d+),(-?\d+)$/);return n?{x:parseInt(n[1],10),y:parseInt(n[2],10)}:null}function Oo(e){const n=e.match(/^(.+?)\s*@\s*(\d+)$/);return n?{name:n[1].trim(),elevation:parseInt(n[2],10)}:null}function jo(e,n,r){let t={};const i=e.match(/\{([^}]+)\}\s*$/);if(i){const f=i[1].split(/\s+/);for(const m of f){const[y,A]=m.split("=");if(y&&A){const v=parseFloat(A);t[y]=isNaN(v)?A:v}}e=e.replace(/\{[^}]+\}\s*$/,"").trim()}const l=e.trim().split(/\s+/);if(l.length<4)return null;const o=l[0],a=l[1],c=l[2],s=l[3],u=$o(c),x=To(s);if(!u||!x)return null;const p=r[a]||a;return{tier:n,label:o,color:p,x:u.x,y:u.y,width:x.width,depth:x.depth,height:x.height,...t}}function Fo(e){const n=_o.load(e);let r={width:1100,height:700};if(typeof n.canvas=="string"){const p=_r(n.canvas);p&&(r=p)}else n.canvas&&typeof n.canvas=="object"&&(r=n.canvas);let t={width:400,depth:280};if(typeof n.floor=="string"){const p=_r(n.floor);p&&(t={width:p.width,depth:p.height})}else n.floor&&typeof n.floor=="object"&&(t=n.floor);let i={x:r.width/2,y:r.height-80};n.origin&&typeof n.origin=="object"&&(i=n.origin);const l={};if(n.colors&&typeof n.colors=="object")for(const[p,f]of Object.entries(n.colors))l[p]=f;const o=[],a={dark:["#0f172a","#1e293b","#334155","#475569"],light:["#f1f5f9","#e0f2fe","#dbeafe","#ede9fe"]},c={dark:["#334155","#475569","#64748b","#94a3b8"],light:["#94a3b8","#7dd3fc","#93c5fd","#c4b5fd"]},s=n.theme||"dark";Array.isArray(n.tiers)&&n.tiers.forEach((p,f)=>{if(typeof p=="string"){const m=Oo(p);m&&o.push({name:m.name,elevation:m.elevation,floorColor:a[s][f]||a[s][0],floorOpacity:f===0?.95:.7-f*.1,borderColor:c[s][f]||c[s][0]})}else if(p&&typeof p=="object"){const m=p;o.push({name:m.name||`Tier ${f}`,elevation:m.elevation||f*150,floorColor:m.floorColor||a[s][f],floorOpacity:m.floorOpacity??(f===0?.95:.7-f*.1),borderColor:m.borderColor||c[s][f]})}});const u=[];if(n.nodes&&typeof n.nodes=="object"&&!Array.isArray(n.nodes)){const p=n.nodes;for(const[f,m]of Object.entries(p)){const y=parseInt(f,10);if(!(isNaN(y)||!Array.isArray(m))){for(const A of m)if(typeof A=="string"){const v=jo(A,y,l);v&&u.push(v)}else if(A&&typeof A=="object"){const v=A;u.push({tier:y,label:v.label||"",color:l[v.color]||v.color||"slate",x:v.x||0,y:v.y||0,width:v.width||100,depth:v.depth||80,height:v.height||40,opacity:v.opacity,blur:v.blur,translucent:v.translucent})}}}}const x=[];if(Array.isArray(n.pillars)){for(const p of n.pillars)if(typeof p=="string"){const f=p.match(/^(-?\d+),(-?\d+)\s+(\d+)->(\d+)$/);f&&x.push({x:parseInt(f[1],10),y:parseInt(f[2],10),fromTier:parseInt(f[3],10),toTier:parseInt(f[4],10)})}else if(p&&typeof p=="object"){const f=p;x.push({x:f.x||0,y:f.y||0,fromTier:f.fromTier||0,toTier:f.toTier||1})}}return{title:n.title||"Untitled",style:n.style||void 0,description:n.description||"",theme:s,canvas:r,origin:i,cornerRadius:n.corner??n.cornerRadius??14,tiers:o,floorSize:t,nodes:u,pillars:x.length>0?x:void 0}}function Lo(e){const n=[];n.push(`title: ${e.title}`),e.description&&n.push(`description: ${e.description}`),n.push(`theme: ${e.theme}`),e.style&&e.style!=="solid"&&n.push(`style: ${e.style}`),n.push(`canvas: ${e.canvas.width}x${e.canvas.height}`),n.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`),e.cornerRadius&&n.push(`corner: ${e.cornerRadius}`),n.push("");const r={};e.nodes.forEach(i=>{r[i.color]=(r[i.color]||0)+1});const t=Object.entries(r).filter(([,i])=>i>=2).map(([i])=>i);return t.length>0&&(n.push("colors:"),t.forEach(i=>{const l=i.slice(0,3);n.push(` ${l}: &${l} ${i}`)}),n.push("")),n.push("tiers:"),e.tiers.forEach(i=>{n.push(` - ${i.name} @ ${i.elevation}`)}),n.push(""),n.push("nodes:"),e.tiers.forEach((i,l)=>{const o=e.nodes.filter(a=>a.tier===l);o.length!==0&&(n.push(` ${l}: # ${i.name}`),o.forEach(a=>{let c=a.color;t.includes(a.color)&&(c=`*${a.color.slice(0,3)}`);const s=[];a.opacity!==void 0&&s.push(`opacity=${a.opacity}`),a.blur!==void 0&&s.push(`blur=${a.blur}`),a.translucent&&s.push("translucent=true");const u=s.length>0?` { ${s.join(" ")} }`:"",x=`${a.width}x${a.depth}x${a.height}`,p=`${a.x},${a.y}`,f=a.label.padEnd(12),m=c.padEnd(8);n.push(` - ${f} ${m} ${p.padEnd(8)} ${x}${u}`)}))}),e.pillars&&e.pillars.length>0&&(n.push(""),n.push("pillars:"),e.pillars.forEach(i=>{n.push(` - ${i.x},${i.y} ${i.fromTier}->${i.toTier}`)})),n.join(`
51
- `)}J.ArcDiagram=ri,J.configToYaml=Lo,J.getColorShading=Lr,J.isoBox=fe,J.isoToScreen=w,J.parseYamlConfig=Fo,J.renderToElement=li,J.renderToString=Cn,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
49
+ `+e.slice(o+1):c+=e.slice(i),c.slice(1)}function oo(e){for(var n="",r=0,t,i=0;i<e.length;r>=65536?i+=2:i++)r=je(e,i),t=K[r],!t&&$e(r)?(n+=e[i],r>=65536&&(n+=e[i+1])):n+=t||Vt(r);return n}function lo(e,n,r){var t="",i=e.tag,l,o,a;for(l=0,o=r.length;l<o;l+=1)a=r[l],e.replacer&&(a=e.replacer.call(r,String(l),a)),(ce(e,n,a,!1,!1)||typeof a>"u"&&ce(e,n,null,!1,!1))&&(t!==""&&(t+=","+(e.condenseFlow?"":" ")),t+=e.dump);e.tag=i,e.dump="["+t+"]"}function wr(e,n,r,t){var i="",l=e.tag,o,a,c;for(o=0,a=r.length;o<a;o+=1)c=r[o],e.replacer&&(c=e.replacer.call(r,String(o),c)),(ce(e,n+1,c,!0,!0,!1,!0)||typeof c>"u"&&ce(e,n+1,null,!0,!0,!1,!0))&&((!t||i!=="")&&(i+=on(e,n)),e.dump&&Te===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=l,e.dump=i||"[]"}function ao(e,n,r){var t="",i=e.tag,l=Object.keys(r),o,a,c,s,u;for(o=0,a=l.length;o<a;o+=1)u="",t!==""&&(u+=", "),e.condenseFlow&&(u+='"'),c=l[o],s=r[c],e.replacer&&(s=e.replacer.call(r,c,s)),ce(e,n,c,!1,!1)&&(e.dump.length>1024&&(u+="? "),u+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ce(e,n,s,!1,!1)&&(u+=e.dump,t+=u));e.tag=i,e.dump="{"+t+"}"}function co(e,n,r,t){var i="",l=e.tag,o=Object.keys(r),a,c,s,u,x,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new V("sortKeys must be a boolean or a function");for(a=0,c=o.length;a<c;a+=1)p="",(!t||i!=="")&&(p+=on(e,n)),s=o[a],u=r[s],e.replacer&&(u=e.replacer.call(r,s,u)),ce(e,n+1,s,!0,!0,!0)&&(x=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,x&&(e.dump&&Te===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,x&&(p+=on(e,n)),ce(e,n+1,u,!0,x)&&(e.dump&&Te===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=l,e.dump=i||"{}"}function _r(e,n,r){var t,i,l,o,a,c;for(i=r?e.explicitTypes:e.implicitTypes,l=0,o=i.length;l<o;l+=1)if(a=i[l],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof n=="object"&&n instanceof a.instanceOf)&&(!a.predicate||a.predicate(n))){if(r?a.multi&&a.representName?e.tag=a.representName(n):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,sr.call(a.represent)==="[object Function]")t=a.represent(n,c);else if(fr.call(a.represent,c))t=a.represent[c](n,c);else throw new V("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=t}return!0}return!1}function ce(e,n,r,t,i,l,o){e.tag=null,e.dump=r,_r(e,r,!1)||_r(e,r,!0);var a=sr.call(e.dump),c=t,s;t&&(t=e.flowLevel<0||e.flowLevel>n);var u=a==="[object Object]"||a==="[object Array]",x,p;if(u&&(x=e.duplicates.indexOf(r),p=x!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&n>0)&&(i=!1),p&&e.usedDuplicates[x])e.dump="*ref_"+x;else{if(u&&p&&!e.usedDuplicates[x]&&(e.usedDuplicates[x]=!0),a==="[object Object]")t&&Object.keys(e.dump).length!==0?(co(e,n,e.dump,i),p&&(e.dump="&ref_"+x+e.dump)):(ao(e,n,e.dump),p&&(e.dump="&ref_"+x+" "+e.dump));else if(a==="[object Array]")t&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?wr(e,n-1,e.dump,i):wr(e,n,e.dump,i),p&&(e.dump="&ref_"+x+e.dump)):(lo(e,n,e.dump),p&&(e.dump="&ref_"+x+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&io(e,e.dump,n,l,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new V("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function so(e,n){var r=[],t=[],i,l;for(an(e,r,t),i=0,l=t.length;i<l;i+=1)n.duplicates.push(r[t[i]]);n.usedDuplicates=new Array(l)}function an(e,n,r){var t,i,l;if(e!==null&&typeof e=="object")if(i=n.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(n.push(e),Array.isArray(e))for(i=0,l=e.length;i<l;i+=1)an(e[i],n,r);else for(t=Object.keys(e),i=0,l=t.length;i<l;i+=1)an(e[t[i]],n,r)}function fo(e,n){n=n||{};var r=new Jt(n);r.noRefs||so(e,r);var t=e;return r.replacer&&(t=r.replacer.call({"":t},"",t)),ce(r,0,t,!0,!0)?r.dump+`
50
+ `:""}var uo=fo,po={dump:uo};function cn(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var ho=X,xo=Tn,mo=Fn,go=Nn,yo=Pn,vo=Je,bo=cr.load,Ao=cr.loadAll,ko=po.dump,Co=V,So={binary:Hn,float:Mn,map:jn,null:Ln,pairs:Xn,set:Gn,timestamp:Bn,bool:Rn,int:In,merge:Wn,omap:Un,seq:$n,str:On},Eo=cn("safeLoad","load"),wo=cn("safeLoadAll","loadAll"),_o=cn("safeDump","dump"),To={Type:ho,Schema:xo,FAILSAFE_SCHEMA:mo,JSON_SCHEMA:go,CORE_SCHEMA:yo,DEFAULT_SCHEMA:vo,load:bo,loadAll:Ao,dump:ko,YAMLException:Co,types:So,safeLoad:Eo,safeLoadAll:wo,safeDump:_o};function Oo(e){const n=e.match(/^(\d+)x(\d+)x(\d+)$/);return n?{width:parseInt(n[1],10),depth:parseInt(n[2],10),height:parseInt(n[3],10)}:null}function Tr(e){const n=e.match(/^(\d+)x(\d+)$/);return n?{width:parseInt(n[1],10),height:parseInt(n[2],10)}:null}function $o(e){const n=e.match(/^(-?\d+),(-?\d+)$/);return n?{x:parseInt(n[1],10),y:parseInt(n[2],10)}:null}function jo(e){const n=e.match(/^(.+?)\s*@\s*(\d+)$/);return n?{name:n[1].trim(),elevation:parseInt(n[2],10)}:null}function Fo(e,n,r){const t={},i=e.match(/\{([^}]+)\}\s*$/);if(i){const f=i[1].split(/\s+/);for(const m of f){const[y,A]=m.split("=");if(y&&A){const v=parseFloat(A);t[y]=isNaN(v)?A:v}}e=e.replace(/\{[^}]+\}\s*$/,"").trim()}const l=e.trim().split(/\s+/);if(l.length<4)return null;const o=l[0],a=l[1],c=l[2],s=l[3],u=$o(c),x=Oo(s);if(!u||!x)return null;const p=r[a]||a;return{tier:n,label:o,color:p,x:u.x,y:u.y,width:x.width,depth:x.depth,height:x.height,...t}}function Lo(e){const n=To.load(e);let r={width:1100,height:700};if(typeof n.canvas=="string"){const p=Tr(n.canvas);p&&(r=p)}else n.canvas&&typeof n.canvas=="object"&&(r=n.canvas);let t={width:400,depth:280};if(typeof n.floor=="string"){const p=Tr(n.floor);p&&(t={width:p.width,depth:p.height})}else n.floor&&typeof n.floor=="object"&&(t=n.floor);let i={x:r.width/2,y:r.height-80};n.origin&&typeof n.origin=="object"&&(i=n.origin);const l={};if(n.colors&&typeof n.colors=="object")for(const[p,f]of Object.entries(n.colors))l[p]=f;const o=[],a={dark:["#0f172a","#1e293b","#334155","#475569"],light:["#f1f5f9","#e0f2fe","#dbeafe","#ede9fe"]},c={dark:["#334155","#475569","#64748b","#94a3b8"],light:["#94a3b8","#7dd3fc","#93c5fd","#c4b5fd"]},s=n.theme||"dark";Array.isArray(n.tiers)&&n.tiers.forEach((p,f)=>{if(typeof p=="string"){const m=jo(p);m&&o.push({name:m.name,elevation:m.elevation,floorColor:a[s][f]||a[s][0],floorOpacity:f===0?.95:.7-f*.1,borderColor:c[s][f]||c[s][0]})}else if(p&&typeof p=="object"){const m=p;o.push({name:m.name||`Tier ${f}`,elevation:m.elevation||f*150,floorColor:m.floorColor||a[s][f],floorOpacity:m.floorOpacity??(f===0?.95:.7-f*.1),borderColor:m.borderColor||c[s][f]})}});const u=[];if(n.nodes&&typeof n.nodes=="object"&&!Array.isArray(n.nodes)){const p=n.nodes;for(const[f,m]of Object.entries(p)){const y=parseInt(f,10);if(!(isNaN(y)||!Array.isArray(m))){for(const A of m)if(typeof A=="string"){const v=Fo(A,y,l);v&&u.push(v)}else if(A&&typeof A=="object"){const v=A;u.push({tier:y,label:v.label||"",color:l[v.color]||v.color||"slate",x:v.x||0,y:v.y||0,width:v.width||100,depth:v.depth||80,height:v.height||40,opacity:v.opacity,blur:v.blur,translucent:v.translucent})}}}}const x=[];if(Array.isArray(n.pillars)){for(const p of n.pillars)if(typeof p=="string"){const f=p.match(/^(-?\d+),(-?\d+)\s+(\d+)->(\d+)$/);f&&x.push({x:parseInt(f[1],10),y:parseInt(f[2],10),fromTier:parseInt(f[3],10),toTier:parseInt(f[4],10)})}else if(p&&typeof p=="object"){const f=p;x.push({x:f.x||0,y:f.y||0,fromTier:f.fromTier||0,toTier:f.toTier||1})}}return{title:n.title||"Untitled",style:n.style||void 0,description:n.description||"",theme:s,canvas:r,origin:i,cornerRadius:n.corner??n.cornerRadius??14,tiers:o,floorSize:t,nodes:u,pillars:x.length>0?x:void 0}}function Ro(e){const n=[];n.push(`title: ${e.title}`),e.description&&n.push(`description: ${e.description}`),n.push(`theme: ${e.theme}`),e.style&&e.style!=="solid"&&n.push(`style: ${e.style}`),n.push(`canvas: ${e.canvas.width}x${e.canvas.height}`),n.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`),e.cornerRadius&&n.push(`corner: ${e.cornerRadius}`),n.push("");const r={};e.nodes.forEach(i=>{r[i.color]=(r[i.color]||0)+1});const t=Object.entries(r).filter(([,i])=>i>=2).map(([i])=>i);return t.length>0&&(n.push("colors:"),t.forEach(i=>{const l=i.slice(0,3);n.push(` ${l}: &${l} ${i}`)}),n.push("")),n.push("tiers:"),e.tiers.forEach(i=>{n.push(` - ${i.name} @ ${i.elevation}`)}),n.push(""),n.push("nodes:"),e.tiers.forEach((i,l)=>{const o=e.nodes.filter(a=>a.tier===l);o.length!==0&&(n.push(` ${l}: # ${i.name}`),o.forEach(a=>{let c=a.color;t.includes(a.color)&&(c=`*${a.color.slice(0,3)}`);const s=[];a.opacity!==void 0&&s.push(`opacity=${a.opacity}`),a.blur!==void 0&&s.push(`blur=${a.blur}`),a.translucent&&s.push("translucent=true");const u=s.length>0?` { ${s.join(" ")} }`:"",x=`${a.width}x${a.depth}x${a.height}`,p=`${a.x},${a.y}`,f=a.label.padEnd(12),m=c.padEnd(8);n.push(` - ${f} ${m} ${p.padEnd(8)} ${x}${u}`)}))}),e.pillars&&e.pillars.length>0&&(n.push(""),n.push("pillars:"),e.pillars.forEach(i=>{n.push(` - ${i.x},${i.y} ${i.fromTier}->${i.toTier}`)})),n.join(`
51
+ `)}J.ArcDiagram=ii,J.configToYaml=Ro,J.getColorShading=Rr,J.isoBox=fe,J.isoToScreen=E,J.parseYamlConfig=Lo,J.renderToElement=ai,J.renderToString=Sn,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));