website-and-documentation/static/js/likec4-doc-webcomponent.js

676 lines
2.8 MiB
JavaScript
Raw Normal View History

feat(docs): add comprehensive documentation platform architecture and guides Created a complete documentation system for new documentors, including interactive architecture diagrams and step-by-step guides for all documentation workflows. New LikeC4 architecture project (resources/doc-likec4/): - Created documentation-platform.c4 model with 252 lines covering: * Actors: documentor, reviewer, CI system, edge platform * Tools: Hugo, LikeC4, Git, VS Code, markdownlint, htmltest * Processes: local development, testing, CI/CD pipeline * Repositories: git repo, cloudlet registry - Defined 6 comprehensive views: * overview: Complete documentation platform ecosystem * localDevelopment: Local writing and preview workflow * cicdPipeline: Automated testing and validation * deploymentFlow: From commit to production * fullWorkflow: End-to-end documentation lifecycle * testingCapabilities: Quality assurance toolchain New documentation pages (content/en/docs/documentation/): - _index.md: Overview and introduction for new documentors - local-development.md: Setting up local environment, live preview - testing.md: Running markdown, HTML, and link validation - cicd.md: Understanding automated CI/CD pipeline - publishing.md: Deployment to Edge Connect Munich cloudlet - quick-reference.md: Command reference and common tasks Hugo shortcode for embedding LikeC4 diagrams: - Created layouts/shortcodes/likec4-view.html - Supports loading state with animated indicator - Graceful error handling for missing views - Automatic shadow DOM checking to ensure webcomponent loaded - Usage: {{< likec4-view view="viewId" project="projectName" >}} Supporting documentation: - resources/LIKEC4-REGENERATION.md: Guide for regenerating webcomponents - All diagrams are interactive and explorable in the browser - Views include zoom, pan, and element inspection This implementation provides: 1. Self-documenting documentation platform ("meta-documentation") 2. Visual learning for complex workflows via interactive diagrams 3. Clear separation of concerns (6 focused views vs 1 overwhelming diagram) 4. Onboarding path for new team members 5. Living architecture documentation that evolves with the platform All new documentation passes markdown linting and builds successfully.
2025-11-07 11:50:58 +01:00
var LikeC4Views=(function(F2){"use strict";/* prettier-ignore-start */
/* eslint-disable */
/******************************************************************************
* This file was generated
* DO NOT EDIT MANUALLY!
******************************************************************************/
function w0e(e,r){for(var n=0;n<r.length;n++){const o=r[n];if(typeof o!="string"&&!Array.isArray(o)){for(const a in o)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(o,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>o[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function vD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H2={exports:{}},f0={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xD;function k0e(){if(xD)return f0;xD=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:o,key:s,ref:a!==void 0?a:null,props:i}}return f0.Fragment=r,f0.jsx=n,f0.jsxs=n,f0}var wD;function _0e(){return wD||(wD=1,H2.exports=k0e()),H2.exports}var b=_0e(),U2={exports:{}},jt={};/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var kD;function E0e(){if(kD)return jt;kD=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function p(F){return F===null||typeof F!="object"?null:(F=h&&F[h]||F["@@iterator"],typeof F=="function"?F:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function w(F,J,Q){this.props=F,this.context=J,this.refs=x,this.updater=Q||g}w.prototype.isReactComponent={},w.prototype.setState=function(F,J){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,J,"setState")},w.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function k(){}k.prototype=w.prototype;function C(F,J,Q){this.props=F,this.context=J,this.refs=x,this.updater=Q||g}var _=C.prototype=new k;_.constructor=C,y(_,w.prototype),_.isPureReactComponent=!0;var T=Array.isArray,A={H:null,A:null,T:null,S:null,V:null},N=Object.prototype.hasOwnProperty;function $(F,J,Q,z,W,G){return Q=G.ref,{$$typeof:e,type:F,key:J,ref:Q!==void 0?Q:null,props:G}}function R(F,J){return $(F.type,J,void 0,void 0,void 0,F.props)}function M(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function O(F){var J={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(Q){return J[Q]})}var B=/\/+/g;function I(F,J){return typeof F=="object"&&F!==null&&F.key!=null?O(""+F.key):J.toString(36)}function Y(){}function D(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(Y,Y):(F.status="pending",F.then(function(J){F.status==="pending"&&(F.status="fulfilled",F.value=J)},function(J){F.status==="pending"&&(F.status="rejected",F.reason=J)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function V(F,J,Q,z,W){var G=typeof F;(G==="undefined"||G==="boolean")&&(F=null);var Z=!1;if(F===null)Z=!0;else switch(G){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(F.$$typeof){case e:case r:Z=!0;break;case d:return Z=F._init,V(Z(F._payload),J,Q,z,W)}}if(Z)return W=W(F),Z=z===""?"."+I(F,0):z,T(W)?(Q="",Z!=null&&(Q=Z.replace(B,"$&/")+"/"),V(W,J,Q,"",function(re){return re})):W!=null&&(M(W)&&(W=R(W,Q+(W.key==null||F&&F.key===W.key?"":(""+W.key).replace(B,"$&/")+"/")+Z)),J.push(W)),1;Z=0;var oe=z===""?".":z+":";if(T(F))for(var ee=0;ee<F.length;ee++)z=F[ee],G=oe+I(z,ee),Z+=V(z,J,Q,G,W);else if(ee=p(F),typeof ee=="function")for(F=ee.call(F),ee=0;!(z=F.next()).done;)z=z.value,G=oe+I(z,ee++),Z+=V(z,J,Q,G,W);else if(G==="object"){if(typeof F.then=="function")return V(D(F),J,Q,z,W);throw J=String(F),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Z}function L(F,J,Q){if(F==null)return F;var z=[],W=0;return V(F,z,"","",function(G){return J.call(Q,G,W++)}),z}function U(F){if(F._status===-1){var J=F._result;J=J(),J.then(function(Q){(F._status===0||F._status===-1)&&(F._status=1,F._result=Q)},function(Q){(F._status===0||F._status===-1)&&(F._status=2,F._result=Q)}),F._status===-1&&(F._status=0,F._result=J)}if(F._status===1)return F._result.default;throw F._result}var q=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.e
* @license React
* react-dom.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ED;function S0e(){if(ED)return _o;ED=1;var e=V2();function r(c){var u="https://react.dev/errors/"+c;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var o={d:{f:n,r:function(){throw Error(r(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(c,u,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,children:c,containerInfo:u,implementation:d}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,u){if(c==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return _o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,_o.createPortal=function(c,u){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(r(299));return i(c,u,null,d)},_o.flushSync=function(c){var u=s.T,d=o.p;try{if(s.T=null,o.p=2,c)return c()}finally{s.T=u,o.p=d,o.d.f()}},_o.preconnect=function(c,u){typeof c=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,o.d.C(c,u))},_o.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},_o.preinit=function(c,u){if(typeof c=="string"&&u&&typeof u.as=="string"){var d=u.as,h=l(d,u.crossOrigin),p=typeof u.integrity=="string"?u.integrity:void 0,g=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;d==="style"?o.d.S(c,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:g}):d==="script"&&o.d.X(c,{crossOrigin:h,integrity:p,fetchPriority:g,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},_o.preinitModule=function(c,u){if(typeof c=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var d=l(u.as,u.crossOrigin);o.d.M(c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&o.d.M(c)},_o.preload=function(c,u){if(typeof c=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var d=u.as,h=l(d,u.crossOrigin);o.d.L(c,d,{crossOrigin:h,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},_o.preloadModule=function(c,u){if(typeof c=="string")if(u){var d=l(u.as,u.crossOrigin);o.d.m(c,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else o.d.m(c)},_o.requestFormReset=function(c){o.d.r(c)},_o.unstable_batchedUpdates=function(c,u){return c(u)},_o.useFormState=function(c,u,d){return s.H.useFormState(c,u,d)},_o.useFormStatus=function(){return s.H.useHostTransitionStatus()},_o.version="19.1.1",_o}var SD;function CD(){if(SD)return q2.exports;SD=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),q2.exports=S0e(),q2.exports}var ji=CD();const TD=vD(ji);function C0e(e,r,n){let o=a=>e(a,...r);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:r})}function ba(e,r,n){let o=e.length-r.length;if(o===0)return e(...r);if(o===1)return C0e(e,r,n);throw Error("Wrong number of arguments")}function Ef(...e){return ba(T0e,e)}const T0e=(e,r)=>e.length>=r;function mt(e,r){if(typeof e>"u"||e==null){const n=typeof r=="function"?r():r;throw new Error(n??`Expected defined value, but received ${e}`)}return e}function nt(e,
* @license
*
* The APCA contrast prediction algorithm is based of the formulas published
* in the APCA-1.0.98G specification by Myndex. The specification is available at:
* https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg
*
* Note that the APCA implementation is still beta, so please update to
* future versions of chroma.js when they become available.
*
* You can read more about the APCA Readability Criterion at
* https://readtech.org/ARC/
*/const YD=.027,J1e=5e-4,eye=.1,WD=1.14,Gv=.022,XD=1.414,tye=(e,r)=>{e=new je(e),r=new je(r),e.alpha()<1&&(e=Tf(r,e,e.alpha(),"rgb"));const n=GD(...e.rgb()),o=GD(...r.rgb()),a=n>=Gv?n:n+Math.pow(Gv-n,XD),i=o>=Gv?o:o+Math.pow(Gv-o,XD),s=Math.pow(i,.56)-Math.pow(a,.57),l=Math.pow(i,.65)-Math.pow(a,.62),c=Math.abs(i-a)<J1e?0:a<i?s*WD:l*WD;return(Math.abs(c)<eye?0:c>0?c-YD:c+YD)*100};function GD(e,r,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(r/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:Ol,pow:fn,min:rye,max:nye,atan2:KD,abs:ZD,cos:Kv,sin:QD,exp:oye,PI:JD}=Math;function aye(e,r,n=1,o=1,a=1){var i=function(z){return 360*z/(2*JD)},s=function(z){return 2*JD*z/360};e=new je(e),r=new je(r);const[l,c,u]=Array.from(e.lab()),[d,h,p]=Array.from(r.lab()),g=(l+d)/2,y=Ol(fn(c,2)+fn(u,2)),x=Ol(fn(h,2)+fn(p,2)),w=(y+x)/2,k=.5*(1-Ol(fn(w,7)/(fn(w,7)+fn(25,7)))),C=c*(1+k),_=h*(1+k),T=Ol(fn(C,2)+fn(u,2)),A=Ol(fn(_,2)+fn(p,2)),N=(T+A)/2,$=i(KD(u,C)),R=i(KD(p,_)),M=$>=0?$:$+360,O=R>=0?R:R+360,B=ZD(M-O)>180?(M+O+360)/2:(M+O)/2,I=1-.17*Kv(s(B-30))+.24*Kv(s(2*B))+.32*Kv(s(3*B+6))-.2*Kv(s(4*B-63));let Y=O-M;Y=ZD(Y)<=180?Y:O<=M?Y+360:Y-360,Y=2*Ol(T*A)*QD(s(Y)/2);const D=d-l,V=A-T,L=1+.015*fn(g-50,2)/Ol(20+fn(g-50,2)),U=1+.045*N,q=1+.015*N*I,X=30*oye(-fn((B-275)/25,2)),J=-(2*Ol(fn(N,7)/(fn(N,7)+fn(25,7))))*QD(2*s(X)),Q=Ol(fn(D/(n*L),2)+fn(V/(o*U),2)+fn(Y/(a*q),2)+J*(V/(o*U))*(Y/(a*q)));return nye(0,rye(100,Q))}function iye(e,r,n="lab"){e=new je(e),r=new je(r);const o=e.get(n),a=r.get(n);let i=0;for(let s in o){const l=(o[s]||0)-(a[s]||0);i+=l*l}return Math.sqrt(i)}const sye=(...e)=>{try{return new je(...e),!0}catch{return!1}},lye={cool(){return Xv([Tt.hsl(180,1,.9),Tt.hsl(250,.7,.4)])},hot(){return Xv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},c4={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221
* @version 1.4.0
* @date 2015-10-26
* @stability 3 - Stable
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
* @license MIT License
*/var e=function(r,n){var o,a,i=1,s=0,l=0,c=String.alphabet;function u(d,h,p){if(p){for(o=h;p=u(d,o),p<76&&p>65;)++o;return+d.slice(h-1,o)}return p=c&&c.indexOf(d.charAt(h)),p>-1?p+76:(p=d.charCodeAt(h)||0,p<45||p>127?p:p<46?65:p<48?p-1:p<58?p+18:p<65?p-11:p<91?p+11:p<97?p-37:p<123?p+5:p-63)}if((r+="")!=(n+="")){for(;i;)if(a=u(r,s++),i=u(n,l++),a<76&&i<76&&a>66&&i>66&&(a=u(r,s,s),i=u(n,l,s=o),l=o),a!=i)return a<i?-1:1}return 0};try{v4.exports=e}catch{String.naturalCompare=e}return v4.exports}var Fye=Bye();const NL=tx(Fye);function rx(e,r){return e===r?0:Vc(e)?Vc(r)?NL(e,r):1:Vc(r)?-1:0}function RL(e=".",r=!1){return(n,o)=>{if(n===o)return 0;if(!n)return-1;if(!o)return 1;const a=n.split(e),i=o.split(e),s=Math.min(a.length,i.length);for(let c=0;c<s;c++){const u=a[c],d=i[c],h=NL(u,d);if(h!==0)return h}const l=a.length-i.length;return r?-1*l:l}}function x4(e){return e!=null&&typeof e=="string"}function nx(e){const r=e.lastIndexOf(".");return r>0?e.slice(0,r):null}function g0(e){const r=e.lastIndexOf(".");return r>0?e.slice(r+1):e}const y0=e=>x4(e)?e:e.id;function Un(e,r){const n=y0(e);return r?y0(r).startsWith(n+"."):o=>{const a=y0(o);return n.startsWith(a+".")}}function $L(e,r){if(!r)return a=>$L(e,a);const n=y0(e),o=y0(r);return n===o||o.startsWith(n+".")||n.startsWith(o+".")}function PL(e,r){return n=>Un(e,n)}function ox(e){return(x4(e)?e:e.id).split(".").length}function b0(e,r){const n=e.split(".");if(n.length<2)return null;const o=r.split(".");if(o.length<2)return null;let a=[];for(let i=0;i<Math.min(n.length,o.length)-1&&n[i]===o[i];i++)a.push(n[i]);return a.length===0?null:a.join(".")}function bd(e){const r=e.split(".");return r.pop(),r.length===0?[]:r.reduce((n,o,a)=>a===0?(n.push(o),n):(n.unshift(`${n[0]}.${o}`),n),[])}function Hye(e,r){let n=r;for(const o of e)Un(o,n)&&(n=o);return n!==r?n:null}function qc(e){const r=[],n=[...e];let o;for(;o=n.shift();){let a;for(;a=Hye(n,o);)r.push(n.splice(n.indexOf(a),1)[0]);r.push(o)}return r}function ML(e,r){if(!e||x4(e)){const o=e??"asc";return a=>ML(a,o)}const n=r==="desc"?-1:1;return e.map(o=>({item:o,fqn:o.id.split(".")})).sort((o,a)=>{if(o.fqn.length!==a.fqn.length)return(o.fqn.length-a.fqn.length)*n;for(let i=0;i<o.fqn.length;i++){const s=rx(o.fqn[i],a.fqn[i]);if(s!==0)return s}return 0}).map(({item:o})=>o)}var ax={},OL;function Uye(){return OL||(OL=1,ax.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",ax.SYMBOL_SUPPORT=typeof Symbol<"u"),ax}var w4,DL;function Vye(){if(DL)return w4;DL=1;function e(r){if(typeof r!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=r}return typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var r=arguments,n=r.length,o=0;return new e(function(){return o>=n?{done:!0}:{done:!1,value:r[o++]}})},e.empty=function(){var r=new e(function(){return{done:!0}});return r},e.fromSequence=function(r){var n=0,o=r.length;return new e(function(){return n>=o?{done:!0}:{done:!1,value:r[n++]}})},e.is=function(r){return r instanceof e?!0:typeof r=="object"&&r!==null&&typeof r.next=="function"},w4=e,w4}var k4,LL;function qye(){if(LL)return k4;LL=1;var e=Uye(),r=e.ARRAY_BUFFER_SUPPORT,n=e.SYMBOL_SUPPORT;return k4=function(a,i){var s,l,c,u,d;if(!a)throw new Error("obliterator/forEach: invalid iterable.");if(typeof i!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(a)||r&&ArrayBuffer.isView(a)||typeof a=="string"||a.toString()==="[object Arguments]"){for(c=0,u=a.length;c<u;c++)i(a[c],c);return}if(typeof a.forEach=="function"){a.forEach(i);return}if(n&&Symbol.iterator in a&&typeof a.next!="function"&&(a=a[Symbol.iterator]()),typeof a.next=="function"){for(s=a,c=0;d=s.next(),d.done!==!0;)i(d.value,c),c++;return}for(l in a)a.hasOwnProperty(l)&&i(a[l],l)},k4}var _4,IL;function Yye(){if(IL)return _4;IL=1;var e=Vye(),r=qye();function n(){this.clear()}return n.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},n.prototype.enqueue=function(o){return this.items.push(o),++this.size},n.prototype.dequeue=function(){if(this.size){var o=this.items[this
`,r);return o===-1?n:n===-1||n+1===o?o:n<o?n:o}const kd={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},dI={}.hasOwnProperty,vbe=Object.prototype;function xbe(e,r){const n=r||{};return D4({file:n.file||void 0,location:!1,schema:n.space==="svg"?E0:dx,verbose:n.verbose||!1},e)}function D4(e,r){let n;switch(r.nodeName){case"#comment":{const o=r;return n={type:"comment",value:o.data},hx(e,o,n),n}case"#document":case"#document-fragment":{const o=r,a="mode"in o?o.mode==="quirks"||o.mode==="limited-quirks":!1;if(n={type:"root",children:hI(e,r.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=bbe(i),l=s.toPoint(0),c=s.toPoint(i.length);n.position={start:l,end:c}}return n}case"#documentType":{const o=r;return n={type:"doctype"},hx(e,o,n),n}case"#text":{const o=r;return n={type:"text",value:o.value},hx(e,o,n),n}default:return n=wbe(e,r),n}}function hI(e,r){let n=-1;const o=[];for(;++n<r.length;){const a=D4(e,r[n]);o.push(a)}return o}function wbe(e,r){const n=e.schema;e.schema=r.namespaceURI===kd.svg?E0:dx;let o=-1;const a={};for(;++o<r.attrs.length;){const l=r.attrs[o],c=(l.prefix?l.prefix+":":"")+l.name;dI.call(vbe,c)||(a[c]=l.value)}const s=(e.schema.space==="svg"?ybe:gbe)(r.tagName,a,hI(e,r.childNodes));if(hx(e,r,s),s.tagName==="template"){const l=r,c=l.sourceCodeLocation,u=c&&c.startTag&&If(c.startTag),d=c&&c.endTag&&If(c.endTag),h=D4(e,l.content);u&&d&&e.file&&(h.position={start:u.end,end:d.start}),s.content=h}return e.schema=n,s}function hx(e,r,n){if("sourceCodeLocation"in r&&r.sourceCodeLocation&&e.file){const o=kbe(e,n,r.sourceCodeLocation);o&&(e.location=!0,n.position=o)}}function kbe(e,r,n){const o=If(n);if(r.type==="element"){const a=r.children[r.children.length-1];if(o&&!n.endTag&&a&&a.position&&a.position.end&&(o.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)dI.call(n.attrs,s)&&(i[M4(e.schema,s).property]=If(n.attrs[s]));n.startTag;const l=If(n.startTag),c=n.endTag?If(n.endTag):void 0,u={opening:l};c&&(u.closing=c),u.properties=i,r.data={position:u}}}return o}function If(e){const r=fI({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=fI({line:e.endLine,column:e.endCol,offset:e.endOffset});return r||n?{start:r,end:n}:void 0}function fI(e){return e.line&&e.column?e:void 0}class S0{constructor(r,n,o){this.property=r,this.normal=n,o&&(this.space=o)}}S0.prototype.property={},S0.prototype.normal={},S0.prototype.space=null;function pI(e,r){const n={},o={};let a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(o,e[a].normal);return new S0(n,o,r)}function L4(e){return e.toLowerCase()}class Qa{constructor(r,n){this.property=r,this.attribute=n}}Qa.prototype.space=null,Qa.prototype.boolean=!1,Qa.prototype.booleanish=!1,Qa.prototype.overloadedBoolean=!1,Qa.prototype.number=!1,Qa.prototype.commaSeparated=!1,Qa.prototype.spaceSeparated=!1,Qa.prototype.commaOrSpaceSeparated=!1,Qa.prototype.mustUseProperty=!1,Qa.prototype.defined=!1;let _be=0;const Dt=_d(),gn=_d(),mI=_d(),Ue=_d(),Er=_d(),zf=_d(),xa=_d();function _d(){return 2**++_be}const I4={__proto__:null,boolean:Dt,booleanish:gn,commaOrSpaceSeparated:xa,commaSeparated:zf,number:Ue,overloadedBoolean:mI,spaceSeparated:Er},z4=Object.keys(I4);class j4 extends Qa{constructor(r,n,o,a){let i=-1;if(super(r,n),gI(this,"space",a),typeof o=="number")for(;++i<z4.length;){const s=z4[i];gI(this,z4[i],(o&I4[s])===I4[s])}}}j4.prototype.defined=!0;function gI(e,r,n){n&&(e[r]=n)}const Ebe={}.hasOwnProperty;function jf(e){const r={},n={};let o;for(o in e.properties)if(Ebe.call(e.properties,o)){const a=e.properties[o],i=new j4(o,e.transform(e.attributes||{},o),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(i.mustUseProperty=!0),r[o]=i,n[L4(o)]=o,n[L4(i.attribute)]=o}return new S0(r,n,e.space)}const yI=jf({space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()},properties:{xLinkActuate:nu
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function I3e(e,r,n,o){const a=o.schema,i=a.space==="svg"?!1:o.settings.omitOptionalTags;let s=a.space==="svg"?o.settings.closeEmptyElements:o.settings.voids.includes(e.tagName.toLowerCase());const l=[];let c;a.space==="html"&&e.tagName==="svg"&&(o.schema=E0);const u=z3e(o,e.properties),d=o.all(a.space==="html"&&e.tagName==="template"?e.content:e);return o.schema=a,d&&(s=!1),(u||!i||!$3e(e,r,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(a.space==="svg"||o.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!o.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(d),!s&&(!i||!oS(e,r,n))&&l.push("</"+e.tagName+">"),l.join("")}function z3e(e,r){const n=[];let o=-1,a;if(r){for(a in r)if(r[a]!==null&&r[a]!==void 0){const i=j3e(e,a,r[a]);i&&n.push(i)}}for(;++o<n.length;){const i=e.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&i!=='"'&&i!=="'"&&(n[o]+=" ")}return n.join("")}function j3e(e,r,n){const o=M4(e.schema,r),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let s=e.quote,l;if(o.overloadedBoolean&&(n===o.attribute||n==="")?n=!0:(o.boolean||o.overloadedBoolean)&&(typeof n!="string"||n===o.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Vf(o.attribute,Object.assign({},e.settings.characterReferences,{subset:Tx.name[a][i]}));return n===!0||(n=Array.isArray(n)?(o.commaSeparated?oI:sI)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(l=Vf(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Tx.unquoted[a][i]}))),l!==n&&(e.settings.quoteSmart&&Cx(n,s)>Cx(n,e.alternative)&&(s=e.alternative),l=s+Vf(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Tx.single:Tx.double)[a][i],attribute:!0}))+s),c+(l&&"="+l))}const B3e=["<","&"];function jz(e,r,n,o){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Vf(e.value,Object.assign({},o.settings.characterReferences,{subset:B3e}))}function F3e(e,r,n,o){return o.settings.allowDangerousHtml?e.value:jz(e,r,n,o)}function H3e(e,r,n,o){return o.all(e)}const U3e=B4("type",{invalid:V3e,unknown:q3e,handlers:{comment:p3e,doctype:m3e,element:I3e,raw:F3e,root:H3e,text:jz}});function V3e(e){throw new Error("Expected node, not `"+e+"`")}function q3e(e){const r=e;throw new Error("Cannot compile unknown node `"+r.type+"`")}const Y3e={},W3e={},X3e=[];function G3e(e,r){const n=r||Y3e,o=n.quote||'"',a=o==='"'?"'":'"';if(o!=='"'&&o!=="'")throw new Error("Invalid quote `"+o+"`, expected `'` or `\"`");return{one:K3e,all:Z3e,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||TI,characterReferences:n.characterReferences||W3e,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?E0:dx,quote:o,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function K3e(e,r,n){return U3e(e,r,n,this)}function Z3e(e){const r=[],n=e&&e.children||X3e;let o=-1;for(;++o<n.length;)r[o]=this.one(n[o],o,e);return r.join("")}function Q3e(e){const r=this,n={...r.data("settings"),...e};r.compiler=o;function o(a){return G3e(a,n)}}const Fo=Kc(/[A-Za-z]/),Co=Kc(/[\dA-Za-z]/),J3e=Kc(/[#-'*+\--9=?A-Z^-~]/);function Ax(e){return e!==null&&(e<32||e===127)}const iS=Kc
`:" ")+i.indentLines(i.containerFlow(o,l.current()),r?Hz:Rke))),u(),c}}function Rke(e,r,n){return r===0?e:Hz(e,r,n)}function Hz(e,r,n){return(n?"":" ")+e}const $ke=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Uz.peek=Lke;function Pke(){return{canContainEols:["delete"],enter:{strikethrough:Oke},exit:{strikethrough:Dke}}}function Mke(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$ke}],handlers:{delete:Uz}}}function Oke(e){this.enter({type:"delete",children:[]},e)}function Dke(e){this.exit(e)}function Uz(e,r,n,o){const a=n.createTracker(o),i=n.enter("strikethrough");let s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function Lke(){return"~"}function Ike(e){return e.length}function zke(e,r){const n=r||{},o=(n.align||[]).concat(),a=n.stringLength||Ike,i=[],s=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const x=[],w=[];let k=-1;for(e[d].length>u&&(u=e[d].length);++k<e[d].length;){const C=jke(e[d][k]);if(n.alignDelimiters!==!1){const _=a(C);w[k]=_,(c[k]===void 0||_>c[k])&&(c[k]=_)}x.push(C)}s[d]=x,l[d]=w}let h=-1;if(typeof o=="object"&&"length"in o)for(;++h<u;)i[h]=Vz(o[h]);else{const x=Vz(o);for(;++h<u;)i[h]=x}h=-1;const p=[],g=[];for(;++h<u;){const x=i[h];let w="",k="";x===99?(w=":",k=":"):x===108?w=":":x===114&&(k=":");let C=n.alignDelimiters===!1?1:Math.max(1,c[h]-w.length-k.length);const _=w+"-".repeat(C)+k;n.alignDelimiters!==!1&&(C=w.length+C+k.length,C>c[h]&&(c[h]=C),g[h]=C),p[h]=_}s.splice(1,0,p),l.splice(1,0,g),d=-1;const y=[];for(;++d<s.length;){const x=s[d],w=l[d];h=-1;const k=[];for(;++h<u;){const C=x[h]||"";let _="",T="";if(n.alignDelimiters!==!1){const A=c[h]-(w[h]||0),N=i[h];N===114?_=" ".repeat(A):N===99?A%2?(_=" ".repeat(A/2+.5),T=" ".repeat(A/2-.5)):(_=" ".repeat(A/2),T=_):T=" ".repeat(A)}n.delimiterStart!==!1&&!h&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||h)&&k.push(" "),n.alignDelimiters!==!1&&k.push(_),k.push(C),n.alignDelimiters!==!1&&k.push(T),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&k.push("|")}y.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return y.join(`
`)}function jke(e){return e==null?"":String(e)}function Vz(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function Bke(e,r,n,o){const a=n.enter("blockquote"),i=n.createTracker(o);i.move("> "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),Fke);return a(),s}function Fke(e,r,n){return">"+(n?"":" ")+e}function Hke(e,r){return qz(e,r.inConstruct,!0)&&!qz(e,r.notInConstruct,!1)}function qz(e,r,n){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return n;let o=-1;for(;++o<r.length;)if(e.includes(r[o]))return!0;return!1}function Yz(e,r,n,o){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
`&&Hke(n.stack,n.unsafe[a]))return/[ \t]/.test(o.before)?"":" ";return`\\
`}function Uke(e,r){const n=String(e);let o=n.indexOf(r),a=o,i=0,s=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===a?++i>s&&(s=i):i=1,a=o+r.length,o=n.indexOf(r,a);return s}function Vke(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function qke(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Yke(e,r,n,o){const a=qke(n),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(Vke(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(i,Wke);return h(),p}const l=n.createTracker(o),c=a.repeat(Math.max(Uke(i,a)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${s}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
`,encode:["`"],...l.current()})),h()}return d+=l.move(`
`),i&&(d+=l.move(i+`
`)),d+=l.move(c),u(),d}function Wke(e,r,n){return(n?"":" ")+e}function uS(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Xke(e,r,n,o){const a=uS(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(o);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),s(),u}function Gke(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function z0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function qf(e){if(e===null||xr(e)||Td(e))return 1;if(Nx(e))return 2}function Rx(e,r,n){const o=qf(e),a=qf(r);return o===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Wz.peek=Kke;function Wz(e,r,n,o){const a=Gke(n),i=n.enter("emphasis"),s=n.createTracker(o),l=s.move(a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const u=c.charCodeAt(0),d=Rx(o.before.charCodeAt(o.before.length-1),u,a);d.inside&&(c=z0(u)+c.slice(1));const h=c.charCodeAt(c.length-1),p=Rx(o.after.charCodeAt(0),h,a);p.inside&&(c=c.slice(0,-1)+z0(h));const g=s.move(a);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},l+c+g}function Kke(e,r,n){return n.options.emphasis||"*"}const Zke={};function $x(e,r){const n=r||Zke,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Xz(e,o,a)}function Xz(e,r,n){if(Qke(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Gz(e.children,r,n)}return Array.isArray(e)?Gz(e,r,n):""}function Gz(e,r,n){const o=[];let a=-1;for(;++a<e.length;)o[a]=Xz(e[a],r,n);return o.join("")}function Qke(e){return!!(e&&typeof e=="object")}function Jke(e,r){let n=!1;return eS(e,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return n=!0,J4}),!!((!e.depth||e.depth<3)&&$x(e)&&(r.options.setext||n))}function e_e(e,r,n,o){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(o);if(Jke(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
`,after:`
`});return h(),d(),p+`
`+(a===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
`))+1))}const s="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
`,...i.current()});return/^[\t ]/.test(u)&&(u=z0(u.charCodeAt(0))+u.slice(1)),u=u?s+" "+u:s,n.options.closeAtx&&(u+=" "+s),c(),l(),u}Kz.peek=t_e;function Kz(e){return e.value||""}function t_e(){return"<"}Zz.peek=r_e;function Zz(e,r,n,o){const a=uS(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(o);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),u+=c.move(")"),s(),u}function r_e(){return"!"}Qz.peek=n_e;function Qz(e,r,n,o){const a=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function n_e(){return"!"}Jz.peek=o_e;function Jz(e,r,n){let o=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(o);)a+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i<n.unsafe.length;){const s=n.unsafe[i],l=n.compilePattern(s);let c;if(s.atBreak)for(;c=l.exec(o);){let u=c.index;o.charCodeAt(u)===10&&o.charCodeAt(u-1)===13&&u--,o=o.slice(0,u)+" "+o.slice(c.index+1)}}return a+o+a}function o_e(){return"`"}function ej(e,r){const n=$x(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tj.peek=a_e;function tj(e,r,n,o){const a=uS(n),i=a==='"'?"Quote":"Apostrophe",s=n.createTracker(o);let l,c;if(ej(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=s.move(" "+a),u+=s.move(n.safe(e.title,{before:u,after:a,...s.current()})),u+=s.move(a),c()),u+=s.move(")"),l(),u}function a_e(e,r,n){return ej(e,n)?"<":"["}rj.peek=i_e;function rj(e,r,n,o){const a=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function i_e(){return"["}function dS(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function s_e(e){const r=dS(e),n=e.options.bulletOther;if(!n)return r==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+n+"`) to be different");return n}function l_e(e){const r=e.options.bulletOrdered||".";if(r!=="."
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"",Popf:"",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"",ThinSpace:"",Tilde:"",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:c,tableRow:l}};function s(g,y,x,w){return u(d(g,x,w),g.align)}function l(g,y,x,w){const k=h(g,x,w),C=u([k]);return C.slice(0,C.indexOf(`
`))}function c(g,y,x,w){const k=x.enter("tableCell"),C=x.enter("phrasing"),_=x.containerPhrasing(g,{...w,before:i,after:i});return C(),k(),_}function u(g,y){return zke(g,{align:y,alignDelimiters:o,padding:n,stringLength:a})}function d(g,y,x){const w=g.children;let k=-1;const C=[],_=y.enter("table");for(;++k<w.length;)C[k]=h(w[k],y,x);return _(),C}function h(g,y,x){const w=g.children;let k=-1;const C=[],_=y.enter("tableRow");for(;++k<w.length;)C[k]=c(w[k],g,y,x);return _(),C}function p(g,y,x){let w=aj.inlineCode(g,y,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function $_e(){return{exit:{taskListCheckValueChecked:cj,taskListCheckValueUnchecked:cj,paragraph:M_e}}}function P_e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:O_e}}}function cj(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function M_e(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const a=r.children;let i=-1,s;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){s=l;break}}s===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function O_e(e,r,n,o){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",l=n.createTracker(o);i&&l.move(s);let c=aj.listItem(e,r,n,{...o,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+s}}function D_e(){return[ske(),Ake(),Pke(),E_e(),$_e()]}function L_e(e){return{extensions:[lke(),Nke(e),Mke(),R_e(e),P_e()]}}function wa(e,r,n,o){const a=e.length;let i=0,s;if(r<0?r=-r>a?0:a+r:r=r>a?a:r,n=n>0?n:0,o.length<1e4)s=Array.from(o),s.unshift(r,n),e.splice(...s);else for(n&&e.splice(r,n);i<o.length;)s=o.slice(i,i+1e4),s.unshift(r,0),e.splice(...s),i+=1e4,r+=1e4}function ei(e,r){return e.length>0?(wa(e,e.length,0,r),e):r}const uj={}.hasOwnProperty;function dj(e){const r={};let n=-1;for(;++n<e.length;)I_e(r,e[n]);return r}function I_e(e,r){let n;for(n in r){const a=(uj.call(e,n)?e[n]:void 0)||(e[n]={}),i=r[n];let s;if(i)for(s in i){uj.call(a,s)||(a[s]=[]);const l=i[s];z_e(a[s],Array.isArray(l)?l:l?[l]:[])}}}function z_e(e,r){let n=-1;const o=[];for(;++n<r.length;)(r[n].add==="after"?e:o).push(r[n]);wa(e,0,0,o)}const j_e={tokenize:q_e,partial:!0},hj={tokenize:Y_e,partial:!0},fj={tokenize:W_e,partial:!0},pj={tokenize:X_e,partial:!0},B_e={tokenize:G_e,partial:!0},mj={name:"wwwAutolink",tokenize:U_e,previous:yj},gj={name:"protocolAutolink",tokenize:V_e,previous:bj},jl={name:"emailAutolink",tokenize:H_e,previous:vj},Ys={};function F_e(){return{text:Ys}}let Ad=48;for(;Ad<123;)Ys[Ad]=jl,Ad++,Ad===58?Ad=65:Ad===91&&(Ad=97);Ys[43]=jl,Ys[45]=jl,Ys[46]=jl,Ys[95]=jl,Ys[72]=[jl,gj],Ys[104]=[jl,gj],Ys[87]=[jl,mj],Ys[119]=[jl,mj];function H_e(e,r,n){const o=this;let a,i;return s;function s(h){return!pS(h)||!vj.call(o,o.previous)||mS(o.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return pS(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(B_e,d,u)(h):h===45||h===95||Co(h)?(i=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),a=!0,c}function d(h){return i&&a&&Fo(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(h)):n(h)}}function U_e(e,r,n){const o=this;return a;function a(s){return s!==87&&s!==119||!yj.call(o,o.previous)||mS(o.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(j_e,e.attempt(hj,e.attempt(fj,i),n),n)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(s)}}function V_e(e,r,n){const o=this;let a="",i=!1;return s;function s(h){return(h===72||h===104)&&bj.call(o,o.previous)&&!mS(o.events)?(e.enter("literalAutolink"),e.enter(
`;break}case-3:{s=`\r
`;break}case-2:{s=r?" ":" ";break}case-1:{if(!r&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,o.push(s)}return o.join("")}function G5e(e){const o={constructs:dj([q5e,...(e||{}).extensions||[]]),content:a(O5e),defined:[],document:a(L5e),flow:a(j5e),lazy:{},string:a(H5e),text:a(U5e)};return o;function a(i){return s;function s(l){return Y5e(o,i,l)}}}function K5e(e){for(;!Cj(e););return e}const Lj=/[\0\t\n\r]/g;function Z5e(){let e=1,r="",n=!0,o;return a;function a(i,s,l){const c=[];let u,d,h,p,g;for(i=r+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),h=0,r="",n&&(i.charCodeAt(0)===65279&&h++,n=void 0);h<i.length;){if(Lj.lastIndex=h,u=Lj.exec(i),p=u&&u.index!==void 0?u.index:i.length,g=i.charCodeAt(p),!u){r=i.slice(h);break}if(g===10&&h===p&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),h<p&&(c.push(i.slice(h,p)),e+=p-h),g){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:o=!0,e=1}h=p+1}return l&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}function H0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ij(e.position):"start"in e||"end"in e?Ij(e):"line"in e||"column"in e?xS(e):""}function xS(e){return zj(e&&e.line)+":"+zj(e&&e.column)}function Ij(e){return xS(e&&e.start)+"-"+xS(e&&e.end)}function zj(e){return e&&typeof e=="number"?e:1}const jj={}.hasOwnProperty;function Bj(e,r,n){return typeof r!="string"&&(n=r,r=void 0),Q5e(n)(K5e(G5e(n).document().write(Z5e()(e,r,!0))))}function Q5e(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Qe),autolinkProtocol:M,autolinkEmail:M,atxHeading:i(De),blockQuote:i(he),characterEscape:M,characterReference:M,codeFenced:i(Ce),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Ce,s),codeText:i(ce,s),codeTextData:M,data:M,codeFlowValue:M,definition:i(de),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(be),hardBreakEscape:i(Ge),hardBreakTrailing:i(Ge),htmlFlow:i(Xe,s),htmlFlowData:M,htmlText:i(Xe,s),htmlTextData:M,image:i(_t),label:s,link:i(Qe),listItem:i(Ke),listItemValue:p,listOrdered:i(St,h),listUnordered:i(St),paragraph:i(We),reference:z,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(De),strong:i(lt),thematicBreak:i(Pn)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:re,autolinkProtocol:ee,blockQuote:c(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:Z,characterReference:oe,codeFenced:c(w),codeFencedFence:x,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:O,codeIndented:c(k),codeText:c(V),codeTextData:O,data:O,definition:c(),definitionDestinationString:T,definitionLabelString:C,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(I),hardBreakTrailing:c(I),htmlFlow:c(Y),htmlFlowData:O,htmlText:c(D),htmlTextData:O,image:c(U),label:X,labelText:q,lineEnding:B,link:c(L),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:W,resourceDestinationString:F,resourceTitleString:J,resource:Q,setextHeading:c(R),setextHeadingLineSequence:$,setextHeadingText:N,strong:c(),thematicBreak:c()}};Fj(r,(e||{}).mdastExtensions||[]);const n={};return o;function o(_e){let we={type:"root",children:[]};const rt={stack:[we],tokenStack:[],config:r,enter:l,exit:u,buffer:s,resume:d,data:n},at=[];let $t=-1;for(;++$t<_e.length;)if(_e[$t][1].type==="listOrdered"||_e[$t][1].type==="listUnordered")if(_e[$t][0]==="enter")at.push($t);else{const Wr=at.pop();$t=a(_e,Wr,$t)}for($t=-1;++$t<_e.length;){const Wr=r[_e[$t][0]];jj.call(Wr,_e[$t][1].type)&&Wr[_e[$t][1].type].call(Object.assign({sliceSerialize:_e[$t][2].sliceSerialize},rt),_e[$t][1])}if(rt.tokenStack.length>0){const Wr=rt.tokenStack[rt.tokenStack.length-1];(Wr[1]||Hj).call(rt,void 0,Wr[0])}for(we.position={start:Zc(_e.length>0?_e[0][1].start:{line:1,column:1,offset:0}),end:Zc(_e.length>0?_e[_e.length-2][1].end:{line:1,column:1,offset:0})},$t=-1;++
`}]}function n2e(e,r){const n=r.value?r.value+`
`:"",o={};r.lang&&(o.className=["language-"+r.lang]);let a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return r.meta&&(a.data={meta:r.meta}),e.patch(r,a),a=e.applyData(r,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(r,a),a}function o2e(e,r){const n={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function a2e(e,r){const n={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function i2e(e,r){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),a=Yf(o.toLowerCase()),i=e.footnoteOrder.indexOf(o);let s,l=e.footnoteCounts.get(o);l===void 0?(l=0,e.footnoteOrder.push(o),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(o,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(r,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(r,u),e.applyData(r,u)}function s2e(e,r){const n={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function l2e(e,r){if(e.options.allowDangerousHtml){const n={type:"raw",value:r.value};return e.patch(r,n),e.applyData(r,n)}}function Uj(e,r){const n=r.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const a=e.all(r),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=o:a.push({type:"text",value:o}),a}function c2e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Uj(e,r);const a={src:Yf(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(r,i),e.applyData(r,i)}function u2e(e,r){const n={src:Yf(r.url)};r.alt!==null&&r.alt!==void 0&&(n.alt=r.alt),r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(r,o),e.applyData(r,o)}function d2e(e,r){const n={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(r,o),e.applyData(r,o)}function h2e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return Uj(e,r);const a={href:Yf(o.url||"")};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"a",properties:a,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function f2e(e,r){const n={href:Yf(r.url)};r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"a",properties:n,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function p2e(e,r,n){const o=e.all(r),a=n?m2e(n):Vj(r),i={},s=[];if(typeof r.checked=="boolean"){const d=o[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},o.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<o.length;){const d=o[l];(a||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!a?s.push(...d.children):s.push(d)}const c=o[o.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:i,children:s};return e.patch(r,u),e.applyData(r,u)}function m2e(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const n=e.children;let o=-1;for(;!r&&++o<n.length;)r=Vj(n[o])}return r}function Vj(e){const r=e.spread;return r??e.children.length>1}function g2e(e,r){const n={},o=e.all(r);let a=-1;for(typeof r.start=="number"&&r.start!==1&&(n.start=r.start);++a<o.length;){const s=o[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:r.ordered?"ol":"ul",properties:n,children:e.wrap(o,!0)};return e.patch(r,i),e.applyData(r,i)}function y2e(e,r){const n={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function b2e(e,r){const n={type:"root",children:e.wrap(e.all(r))};return e.patch(r,n),e.applyData(r,n)}function v2e(e,r){const n={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function x2e(e,r){const n=e.all(r),o=n.shift(),a=[];if(o){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(r.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=zl(r.children[1]),c=kx(r.children[r.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(r,i),e.applyData(r,i)}function w2e(e,r,n){const o=n?n.children:void 0,i=(o?o.indexOf(r):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:r.children.length;let c=-1;const u=[];for(;++c<l;){const h=r.children[c],p={},g=s?s[c]:void 0;g&&(p.align=g);let y={type:"element",tagName:i,properties:p,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),u.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(r,d),e.applyData(r,d)}function k2e(e,r){const n={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}const qj=9,Yj=32;function _2e(e){const r=String(e),n=/\r?\n|\r/g;let o=n.exec(r),a=0;const i=[];for(;o;)i.push(Wj(r.slice(a,o.index),a>0,!0),o[0]),a=o.index+o[0].length,o=n.exec(r);return i.push(Wj(r.slice(a),a>0,!1)),i.join("")}function Wj(e,r,n){let o=0,a=e.length;if(r){let i=e.codePointAt(o);for(;i===qj||i===Yj;)o++,i=e.codePointAt(o)}if(n){let i=e.codePointAt(a-1);for(;i===qj||i===Yj;)a--,i=e.codePointAt(a-1)}return a>o?e.slice(o,a):""}function E2e(e,r){const n={type:"text",value:_2e(String(r.value))};return e.patch(r,n),e.applyData(r,n)}function S2e(e,r){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,n),e.applyData(r,n)}const C2e={blockquote:t2e,break:r2e,code:n2e,delete:o2e,emphasis:a2e,footnoteReference:i2e,heading:s2e,html:l2e,imageReference:c2e,image:u2e,inlineCode:d2e,linkReference:h2e,link:f2e,listItem:p2e,list:g2e,paragraph:y2e,root:b2e,strong:v2e,table:x2e,tableCell:k2e,tableRow:w2e,text:E2e,thematicBreak:S2e,toml:Dx,yaml:Dx,definition:Dx,footnoteDefinition:Dx};function Dx(){}function T2e(e,r){const n=[{type:"text",value:"↩"}];return r>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),n}function A2e(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function N2e(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||T2e,o=e.options.footnoteBackLabel||A2e,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),p=Yf(h.toLowerCase());let g=0;const y=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++g<=x;){y.length>0&&y.push({type:"text",value:" "});let C=typeof n=="string"?n
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
`}]}}const wS={}.hasOwnProperty,R2e={};function $2e(e,r){const n=r||R2e,o=new Map,a=new Map,i=new Map,s={...C2e,...n.handlers},l={all:u,applyData:M2e,definitionById:o,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:P2e,wrap:D2e};return eS(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?o:a,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),l;function c(d,h){const p=d.type,g=l.handlers[p];if(wS.call(l.handlers,p)&&g)return g(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:x,...w}=d,k=xd(w);return k.children=l.all(d),k}return xd(d)}return(l.options.unknownHandler||O2e)(l,d,h)}function u(d){const h=[];if("children"in d){const p=d.children;let g=-1;for(;++g<p.length;){const y=l.one(p[g],d);if(y){if(g&&p[g-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Xj(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Xj(x.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function P2e(e,r){e.position&&(r.position=yz(e))}function M2e(e,r){let n=r;if(e&&e.data){const o=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const s="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,xd(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function O2e(e,r){const n=r.data||{},o="value"in r&&!(wS.call(n,"hProperties")||wS.call(n,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function D2e(e,r){const n=[];let o=-1;for(r&&n.push({type:"text",value:`
`});++o<e.length;)o&&n.push({type:"text",value:`
`}),n.push(e[o]);return r&&e.length>0&&n.push({type:"text",value:`
`}),n}function Xj(e){let r=0,n=e.charCodeAt(r);for(;n===9||n===32;)r++,n=e.charCodeAt(r);return e.slice(r)}function Gj(e,r){const n=$2e(e,r),o=n.one(e,void 0),a=N2e(n),i=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
`},a),i}function L2e(e,r){return e&&"run"in e?async function(n,o){const a=Gj(n,{file:o,...r});await e.run(a,o)}:function(n,o){return Gj(n,{file:o,...e||r})}}function Kj(e){if(e)throw e}var kS,Zj;function I2e(){if(Zj)return kS;Zj=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},i=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},s=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(o)return o(u,d).value}else return;return u[d]};return kS=function c(){var u,d,h,p,g,y,x=arguments[0],w=1,k=arguments.length,C=!1;for(typeof x=="boolean"&&(C=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});w<k;++w)if(u=arguments[w],u!=null)for(d in u)h=l(x,d),p=l(u,d),x!==p&&(C&&p&&(i(p)||(g=a(p)))?(g?(g=!1,y=h&&a(h)?h:[]):y=h&&i(h)?h:{},s(x,{name:d,newValue:c(C,y,p)})):typeof p<"u"&&s(x,{name:d,newValue:p}));return x},kS}var z2e=I2e();const _S=tx(z2e);function ES(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function j2e(){const e=[],r={run:n,use:o};return r;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...a);function l(c,...u){const d=e[++i];let h=-1;if(c){s(c);return}for(;++h<a.length;)(u[h]===null||u[h]===void 0)&&(u[h]=a[h]);a=u,d?B2e(d,l)(...u):s(null,...u)}}function o(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),r}}function B2e(e,r){let n;return o;function o(...s){const l=e.length>s.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(u){const d=u;if(l&&n)throw d;return a(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){n||(n=!0,r(s,...l))}function i(s){a(null,s)}}let Zo=class extends Error{constructor(r,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof r=="string"?a=r:!i.cause&&r&&(s=!0,a=r.message,i.cause=r),!i.ruleId&&!i.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?i.ruleId=o:(i.source=o.slice(0,c),i.ruleId=o.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=l?l.line:void 0,this.name=H0(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}};Zo.prototype.file="",Zo.prototype.name="",Zo.prototype.reason="",Zo.prototype.message="",Zo.prototype.stack="",Zo.prototype.column=void 0,Zo.prototype.line=void 0,Zo.prototype.ancestors=void 0,Zo.prototype.cause=void 0,Zo.prototype.fatal=void 0,Zo.prototype.place=void 0,Zo.prototype.ruleId=void 0,Zo.prototype.source=void 0;const Ws={basename:F2e,dirname:H2e,extname:U2e,join:V2e,sep:"/"};function F2e(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');U0(e);let n=0,o=-1,a=e.length,i;if(r===void 0||r.length===0||r.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1);return o<0?"
`)}reversed(r=!1){if(!r)return new ti(this.target,this.source);const[n]=jS(this.target,this.source,"directed");return n??new ti(this.target,this.source,new Set)}}const bB={asc:(e,r)=>e>r,desc:(e,r)=>e<r};function Q4e(e,r){let[n,...o]=r;if(!J4e(n)){let i=BS(...o);return e(n,i)}let a=BS(n,...o);return i=>e(i,a)}function BS(e,r,...n){let o=typeof e=="function"?e:e[0],a=typeof e=="function"?"asc":e[1],{[a]:i}=bB,s=r===void 0?void 0:BS(r,...n);return(l,c)=>{let u=o(l),d=o(c);return i(u,d)?1:i(d,u)?-1:s?.(l,c)??0}}function J4e(e){if(vB(e))return!0;if(typeof e!="object"||!Array.isArray(e))return!1;let[r,n,...o]=e;return vB(r)&&typeof n=="string"&&n in bB&&o.length===0}const vB=e=>typeof e=="function"&&e.length===1;function xB(...e){return ba(Object.entries,e)}function eSe(...e){return ba(tSe,e)}function tSe(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;if(e instanceof Map&&r instanceof Map)return rSe(e,r);if(e instanceof Set&&r instanceof Set)return nSe(e,r);let n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(let o of n){if(!Object.hasOwn(r,o))return!1;let{[o]:a}=e,{[o]:i}=r;if(a!==i||!Object.is(a,i))return!1}return!0}function rSe(e,r){if(e.size!==r.size)return!1;for(let[n,o]of e){let a=r.get(n);if(o!==a||!Object.is(o,a))return!1}return!0}function nSe(e,r){if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;return!0}function oSe(...e){return ba(aSe,e)}const aSe=e=>e.at(-1);function iSe(e,...r){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"?n=>wB(n,e,...r):wB(e,...r)}function wB(e,...r){let n=e;for(let o of r){if(n==null)return;n=n[o]}return n}function FS(...e){return ba(sSe,e)}function sSe(e,r){let n=[...e];return n.sort(r),n}function lSe(...e){return Q4e(cSe,e)}const cSe=(e,r)=>[...e].sort(r);function kB(e,r,n){return typeof r=="number"||r===void 0?o=>o.split(e,r):e.split(r,n)}function jx(...e){return ba(Object.values,e)}class Bx{constructor(r,n){this.$model=r,this.$element=n,this.id=this.$element.id,this._literalId=this.$element.id;const[o,a]=Qye(this.id);o?(this.imported={from:o,fqn:a},this.hierarchyLevel=ox(a)):(this.imported=null,this.hierarchyLevel=ox(this.id))}id;_literalId;hierarchyLevel;imported;get name(){return g0(this.id)}get parent(){return this.$model.parent(this)}get kind(){return this.$element.kind}get shape(){return this.style.shape}get color(){return this.style.color}get icon(){return this.style.icon??null}get tags(){return cr(this,Symbol.for("tags"),()=>zS([...this.$element.tags??[],...this.$model.specification.elements[this.$element.kind]?.tags??[]]))}get title(){return this.$element.title}get hasSummary(){return!!this.$element.summary&&!!this.$element.description&&!eSe(this.$element.summary,this.$element.description)}get summary(){return Kt.memoize(this,"summary",ix(this.$element))}get description(){return Kt.memoize(this,"description",sx(this.$element))}get technology(){return this.$element.technology??null}get links(){return this.$element.links??[]}get defaultView(){return cr(this,Symbol.for("defaultView"),()=>lB(this.scopedViews())??null)}get isRoot(){return this.parent===null}get style(){return cr(this,"style",()=>V0({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.$element.style}))}isAncestorOf(r){return Un(this,r)}isDescendantOf(r){return Un(r,this)}ancestors(){return this.$model.ancestors(this)}commonAncestor(r){const n=b0(this.id,r.id);return n?this.$model.element(n):null}children(){return this.$model.children(this)}descendants(r){return r?ML([...this.$model.descendants(this)],r)[Symbol.iterator]():this.$model.descendants(this)}siblings(){return this.$model.siblings(this)}*ascendingSiblings(){yield*this.siblings();for(const r of this.ancestors())yield*r.siblings()}*descendingSiblings(){for(const r of[...this.ancestors()].reverse())yield*r.sibling
`),"View title cannot contain newlines"),e.includes(ka)){const r=e.split(ka).map(n=>n.trim()).filter(n=>n.length>0);return Ef(r,1)?r:[""]}return[e.trim()]},Fx=e=>HS(e).join(ka),uSe=e=>{const r=HS(e);return Ef(r,2)?r.slice(0,-1).join(ka):null},dSe=e=>e.includes(ka)?HS(e).pop()??e:e.trim();class hSe{constructor(r){this.$model=r;const n=this.$deployments=r.$data.deployments,o=jx(n.elements);for(const a of qc(o)){const i=this.addElement(a);for(const s of i.tags)this.#l.get(s).add(i);i.isInstance()&&this.#a.get(i.element.id).add(i)}for(const a of jx(n.relations)){const i=this.addRelation(a);for(const s of i.tags)this.#l.get(s).add(i)}}#e=new Map;#t=new Map;#r=new lo(()=>new Set);#a=new lo(()=>new Set);#i=new Set;#n=new Map;#o=new lo(()=>new Set);#s=new lo(()=>new Set);#c=new lo(()=>new Set);#l=new lo(()=>new Set);#u=new Map;$deployments;get $styles(){return this.$model.$styles}element(r){if(r instanceof pB||r instanceof mB)return r;const n=fr(r);return mt(this.#e.get(n),`Element ${n} not found`)}findElement(r){return this.#e.get(r)??null}node(r){const n=this.element(r);return nt(n.isDeploymentNode(),`Element ${n.id} is not a deployment node`),n}findNode(r){const n=this.findElement(r);return n?(nt(n.isDeploymentNode(),`Element ${n?.id} is not a deployment node`),n):null}instance(r){const n=this.element(r);return nt(n.isInstance(),`Element ${n.id} is not a deployed instance`),n}findInstance(r){const n=this.findElement(r);return n?(nt(n.isInstance(),`Element ${n?.id} is not a deployed instance`),n):null}roots(){return this.#i.values()}elements(){return this.#e.values()}*nodes(){for(const r of this.#e.values())r.isDeploymentNode()&&(yield r)}*nodesOfKind(r){for(const n of this.#e.values())n.isDeploymentNode()&&n.kind===r&&(yield n)}*instances(){for(const r of this.#e.values())r.isInstance()&&(yield r)}*instancesOf(r){const n=fr(r),o=this.#a.get(n);o&&(yield*o)}deploymentRef(r){if(W0.isInsideInstanceRef(r)){const{deployment:n,element:o}=r;return R4e(this.#u,`${n}@${o}`,()=>new X4e(this.instance(n),this.$model.element(o)))}return this.element(r.deployment)}relationships(){return this.#n.values()}relationship(r){return mt(this.#n.get(fr(r)),`DeploymentRelationModel ${r} not found`)}findRelationship(r){return this.#n.get(r)??null}*views(){for(const r of this.$model.views())r.isDeploymentView()&&(yield r)}parent(r){const n=fr(r);return this.#t.get(n)||null}children(r){const n=fr(r);return this.#r.get(n)}*siblings(r){const n=fr(r),o=this.parent(r)?.children()??this.roots();for(const a of o)a.id!==n&&(yield a)}*ancestors(r){let n=fr(r),o;for(;o=this.#t.get(n);)yield o,n=o.id}*descendants(r,n="desc"){for(const o of this.children(r))n==="asc"?(yield o,yield*this.descendants(o.id)):(yield*this.descendants(o.id),yield o)}*incoming(r,n="all"){const o=fr(r);for(const a of this.#o.get(o))switch(!0){case n==="all":case(n==="direct"&&a.target.id===o):case(n==="to-descendants"&&a.target.id!==o):yield a;break}}*outgoing(r,n="all"){const o=fr(r);for(const a of this.#s.get(o))switch(!0){case n==="all":case(n==="direct"&&a.source.id===o):case(n==="from-descendants"&&a.source.id!==o):yield a;break}}addElement(r){if(this.#e.has(r.id))throw new Error(`Element ${r.id} already exists`);const n=b4e(r)?new pB(this,Object.freeze(r)):new mB(this,Object.freeze(r),this.$model.element(r.element));this.#e.set(n.id,n);const o=nx(n.id);return o?(nt(this.#e.has(o),`Parent ${o} of ${n.id} not found`),this.#t.set(n.id,this.node(o)),this.#r.get(o).add(n)):(nt(n.isDeploymentNode(),`Root element ${n.id} is not a deployment node`),this.#i.add(n)),n}addRelation(r){if(this.#n.has(r.id))throw new Error(`Relation ${r.id} already exists`);const n=new G4e(this,Object.freeze(r));this.#n.set(n.id,n),this.#o.get(n.target.id).add(n),this.#s.get(n.source.id).add(n);const o=n.boundary?.id??null;if(o)for(const a of[o,...bd(o)])this.#c.get(a).add(n);for(const a of bd(n.source.id)){if(a===o)break;this.#s.get(a).add(n)}for(const a of bd(n.target.id)){if(a===o)break;this.#o.get(a).add(n)}return n}}class _B{constructor(r,n){this.model=r,this.$relationship=n,this.source=r.element(W0.flatte
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var QSe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const yt=(e,r,n,o)=>{const a=E.forwardRef(({color:i="currentColor",size:s=24,stroke:l=2,title:c,className:u,children:d,...h},p)=>E.createElement("svg",{ref:p,...QSe[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${r}`,u].join(" "),...e==="filled"?{fill:i}:{strokeWidth:l,stroke:i},...h},[c&&E.createElement("title",{key:"svg-title"},c),...o.map(([g,y])=>E.createElement(g,y)),...Array.isArray(d)?d:[d]]));return a.displayName=`${n}`,a};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const JSe=[["path",{d:"M12 6m-7 0a7 3 0 1 0 14 0a7 3 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12",key:"svg-1"}]],zB=yt("outline","cylinder","Cylinder",JSe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const e6e=[["path",{d:"M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718z",key:"svg-0"}],["path",{d:"M9 21v-7.5",key:"svg-1"}],["path",{d:"M9 13.5l11.5 -5.5",key:"svg-2"}],["path",{d:"M3.5 11l5.5 2.5",key:"svg-3"}]],t6e=yt("outline","rectangular-prism","RectangularPrism",e6e);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const r6e=[["path",{d:"M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3",key:"svg-3"}],["path",{d:"M16.5 8.5l2.5 2.5l2.5 -2.5",key:"svg-4"}]],n6e=yt("outline","reorder","Reorder",r6e);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const o6e=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],a6e=yt("outline","user","User",o6e);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const i6e=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],s6e=yt("outline","device-mobile","DeviceMobile",i6e);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const l6e=[["path",{d:"M4 8h16",key:"svg-0"}],["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M8 4v4",key:"svg-2"}]],c6e=yt("outline","browser","Browser",l6e),ZS=E.createContext(null);function u6e({value:e,children:r}){return E.useContext(ZS)?b.jsx(b.Fragment,{children:r}):b.jsx(ZS.Provider,{value:e,children:r})}function Vx({element:e,className:r,style:n}){const o=E.useContext(ZS);if(!e||!e.icon||e.icon==="none")return null;let a;return e.icon.startsWith("http://")||e.icon.startsWith("https://")?a=b.jsx("img",{src:e.icon,alt:e.title}):o&&(a=b.jsx(o,{node:e})),a?b.jsx("div",{className:Je(r,"likec4-element-icon"),"data-likec4-icon":e.icon,style:n,children:a}):null}const d6e={browser:c6e,cylinder:zB,mobile:s6e,person:a6e,queue:n6e,rectangle:t6e,storage:zB};function h6e({element:e,className:r}){const n=b.jsx(Vx,{element:e,className:r});if(n)return n;const o=d6e[e.shape];return b.jsx("div",{className:Je(r,"likec4-shape-icon"),children:b.jsx(o,{})})}function Kf(e){const r=E.useRef(e);return r.current=e,E.useMemo(()=>Object.freeze({get current(){return r.current}}),[])}function jB(e){const r=Kf(e);E.useEffect(()=>()=>{r.current()},[])}function qx(e,r,n,o=0){const a=E.useRef(void 0),i=E.useRef(void 0),s=E.useRef(e),l=E.useRef(void 0),c=()=>{a.current&&(clearTimeout(a.current),a.current=void 0),i.current&&(clearTimeout(i.current),i.current=void 0)};return jB(c),E.useEffect(()=>{s.current=e},r),E.useMemo(()=>{const u=()=>{if(c(),!l.current)return;const h=l.current;l.current=void 0,s.current.apply(h.this,h.args)},d=function(...h){a.current&&clearTimeout(a.current),l.current={args:h,this:this},a.current=setTimeout(u,n),o>0&&!i.current&&(i.current=setTimeout(u,o))};return Object.defineProperties(d,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__debounced__${n}`}}),d},[n,o,...r])}const f6e=()=>{},Yx=typeof globalThis<"u"&&typeof navigator<"u"&&typeof document<"u";function p6e(e){const r=Kf(e),n=E.useRef(0),o=E.useCallback(()=>{Yx&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return jB(o),[E.useMemo(()=>{const a=(...i)=>{Yx&&(o(),n.current=requestAnimationFrame(()=>{r.current(...i),n.current=0}))};return Object.defineProperties(a,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__raf`}}),a},[]),o]}const m6e=(e,r)=>{if(e===r)return!0;if(e.length!==r.length)return!1;for(const[n,o]of e.entries())if(o!==r[n])return!1;return!0};function BB(e,r,n=m6e,o=E.useEffect,...a){const i=E.useRef(void 0);(i.current===void 0||Yx&&!n(i.current,r))&&(i.current=r),o(e,i.current,...a)}function g6e(e,r,n,o=0){E.useEffect(qx(e,r,n,o),r)}function FB(){const e=E.useRef(!0);return E.useEffect(()=>{e.current=!1},[]),e.current}const QS=Yx?E.useLayoutEffect:E.useEffect;function y6e(e){E.useEffect(()=>{e()},[])}function HB(e,r){const[n,o]=p6e(e);E.useEffect(()=>(n(),o),r)}const b6e=e=>(e+1)%Number.MAX_SAFE_INTEGER;function v6e(){const[,e]=E.useState(0);return E.useCallback(()=>{e(b6e)},[])}function UB(e,r){const n=FB();E.useEffect(n?f6e:e,r)}const x6e=e=>{e&&clearTimeout(e)};function Wx(e,r){const n=Kf(e),o=Kf(r),a=E.useRef(null),i=E.useCallback(()=>{x6e(a.current)},[]),s=E.useCallback(()=>{o.current!==void 0&&(i(),a.current=setTimeout(()=>{n.current()},o.current))},[]);return E.useEffect(()=>(s(),i),[r]),[i,s]}const VB=(e,r,n)=>{const o=E.useRef(void 0);return(o.current===void 0||!n(o.current,r))&&(o.current=r),E.useMemo(e,o.current)};function an(e){if(typeof e=="string"||typeof e=="number")return""+e;let r="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=an(e[n]))!==""&&(r+=(r&&" ")+o);else for(let n in e)e[n]&&(r+=(r&&" ")+n);return r}var w6e={value:()=>{}};function Xx(){for(var e=0,r=arguments.length,n={},o;e<r;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new Gx(n)}function Gx(e){this._=e}function k6e(e,r){return e.trim().split(/^|\s+/).map(function(n){var o="",a=n.indexOf(".");if(a>=0&&(o=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);retu
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var NH;function J9e(){if(NH)return M6;NH=1;var e=Gr;function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,o=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(h,p){var g=p(),y=o({inst:{value:g,getSnapshot:p}}),x=y[0].inst,w=y[1];return i(function(){x.value=g,x.getSnapshot=p,c(x)&&w({inst:x})},[h,g,p]),a(function(){return c(x)&&w({inst:x}),h(function(){c(x)&&w({inst:x})})},[h]),s(g),g}function c(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!n(h,g)}catch{return!0}}function u(h,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return M6.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,M6}var RH;function $H(){return RH||(RH=1,AH.exports=J9e()),AH.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var PH;function eAe(){if(PH)return P6;PH=1;var e=Gr,r=$H();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,a=r.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return P6.useSyncExternalStoreWithSelector=function(u,d,h,p,g){var y=i(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=l(function(){function k(N){if(!C){if(C=!0,_=N,N=p(N),g!==void 0&&x.hasValue){var $=x.value;if(g($,N))return T=$}return T=N}if($=T,o(_,N))return $;var R=p(N);return g!==void 0&&g($,R)?(_=N,$):(_=N,T=R)}var C=!1,_,T,A=h===void 0?null:h;return[function(){return k(d())},A===null?void 0:function(){return k(A())}]},[d,h,p,g]);var w=a(u,y[0],y[1]);return s(function(){x.hasValue=!0,x.value=w},[w]),c(w),w},P6}var MH;function tAe(){return MH||(MH=1,TH.exports=eAe()),TH.exports}var OH=tAe();const rAe=$6(OH),nAe={},DH=e=>{let r;const n=new Set,o=(l,c)=>{const u=typeof l=="function"?l(r):l;if(!Object.is(u,r)){const d=r;r=c??(typeof u!="object"||u===null)?u:Object.assign({},r,u),n.forEach(h=>h(r,d))}},a=()=>r,i={setState:o,getState:a,getInitialState:()=>s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(nAe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=r=e(o,a,i);return i},oAe=e=>e?DH(e):DH,{useDebugValue:aAe}=Gr,{useSyncExternalStoreWithSelector:iAe}=rAe,sAe=e=>e;function LH(e,r=sAe,n){const o=iAe(e.subscribe,e.getState,e.getServerState||e.getInitialState,r,n);return aAe(o),o}const IH=(e,r)=>{const n=oAe(e),o=(a,i=r)=>LH(n,a,i);return Object.assign(o,n),o},lAe=(e,r)=>e?IH(e,r):IH;function Nr(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[o,a]of e)if(!Object.is(a,r.get(o)))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const o of e)if(!r.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(r,o)||!Object.is(e[o],r[o]))return!1;return!0}const Cw=E.createContext(null),cAe=Cw.Provider,zH=Qs.error001();function At(e,r){const n=E.useContext(Cw);if(n===null)throw new Error(zH);return LH(n,e,r)}function pr(){const e=E.useContext(Cw);if(e===null)throw new Error(zH);return E.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const jH={display:"none"},uAe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},BH="react-flow__node-desc",FH="react-flow__edge-desc",dAe="react-flow__aria-live",hAe=e=>e.ariaLiveMessage,fAe=e=>e.ariaLabelConfig;function pAe({rfId:e}){const r=At(hAe);return b.jsx("div",{id:`${dAe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:uAe,children:r})}function mAe({rfId:e,disableKeyboardA11y:r}){const n=At(fAe);return b.jsxs(b.Fragment,{children:[b.jsx("div",{id:`${BH}-${e}`,style:jH,children:r?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),b.jsx("div",{id:`${FH}-${e}`,style:jH,children:n["edge.a11yDescription.default"]}),!r&&b.jsx(pAe,{rfId:e})]})}const ou=E.forwardRef(({position:e="top-left",children:r,className:n,style:o,...a},i)=>{const s=`${e}`.split("-");return b.jsx("div",{className:an(["react-flow__panel",n,...s]),style:o,ref:i,...a,children:r})});ou.displayName="Panel";function gAe({proOptions:e,position:r="bottom-right"}){return e?.hideAttribution?null:b.jsx(ou,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:b.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"Reac
`).replace(`
`,`
+`).split(`
`)),u=c.reduce((d,h)=>d.concat(...h),[]);return[c,u]}return[[],[]]},[e]);return E.useEffect(()=>{const c=r?.target??YH,u=r?.actInsideInputWithModifier??!0;if(e!==null){const d=g=>{if(a.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!a.current||a.current&&!u)&&tH(g))return!1;const y=XH(g.code,l);if(i.current.add(g[y]),WH(s,i.current,!1)){const x=g.composedPath?.()?.[0]||g.target,w=x?.nodeName==="BUTTON"||x?.nodeName==="A";r.preventDefault!==!1&&(a.current||!w)&&g.preventDefault(),o(!0)}},h=g=>{const y=XH(g.code,l);WH(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(g[y]),g.key==="Meta"&&i.current.clear(),a.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",h),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",h),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function WH(e,r,n){return e.filter(o=>n||o.length===r.size).some(o=>o.every(a=>r.has(a)))}function XH(e,r){return r.includes(e)?"code":"key"}const TAe=()=>{const e=pr();return E.useMemo(()=>({zoomIn:r=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomOut:r=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomTo:(r,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(r,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(r,n)=>{const{transform:[o,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:r.x??o,y:r.y??a,zoom:r.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[r,n,o]=e.getState().transform;return{x:r,y:n,zoom:o}},setCenter:async(r,n,o)=>e.getState().setCenter(r,n,o),fitBounds:async(r,n)=>{const{width:o,height:a,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=tu(r,o,a,i,s,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(r,n={})=>{const{transform:o,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return r;const{x:l,y:c}=s.getBoundingClientRect(),u={x:r.x-l,y:r.y-c},d=n.snapGrid??a,h=n.snapToGrid??i;return y1(u,o,h,d)},flowToScreenPosition:r=>{const{transform:n,domNode:o}=e.getState();if(!o)return r;const{x:a,y:i}=o.getBoundingClientRect(),s=xw(r,n);return{x:s.x+a,y:s.y+i}}}),[])};function GH(e,r){const n=[],o=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const s=o.get(i.id);s?s.push(i):o.set(i.id,[i])}for(const i of r){const s=o.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)AAe(c,l);n.push(l)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function AAe(e,r){switch(e.type){case"select":{r.selected=e.selected;break}case"position":{typeof e.position<"u"&&(r.position=e.position),typeof e.dragging<"u"&&(r.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(r.measured??={},r.measured.width=e.dimensions.width,r.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(r.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(r.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(r.resizing=e.resizing);break}}}function Aw(e,r){return GH(e,r)}function Nw(e,r){return GH(e,r)}function Fd(e,r){return{id:e,type:"select",selected:r}}function cp(e,r=new Set,n=!1){const o=[];for(const[a,i]of e){const s=r.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),o.push(Fd(i.id,s)))}return o}function KH({items:e=[],lookup:r}){const n=[],o=new Map(e.map(a=>[a.id,a]));for(const[a,i]of e.entries()){const s=r.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i.id,item:i,typ
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}zU.displayName="MiniMap",E.memo(zU);const yNe=e=>r=>e?`${Math.max(1/r.transform[2],1)}`:void 0,bNe={[lp.Line]:"right",[lp.Handle]:"bottom-right"};function vNe({nodeId:e,position:r,variant:n=lp.Handle,className:o,style:a=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:p,autoScale:g=!0,shouldResize:y,onResizeStart:x,onResize:w,onResizeEnd:k}){const C=I6(),_=typeof e=="string"?e:C,T=pr(),A=E.useRef(null),N=n===lp.Handle,$=At(E.useCallback(yNe(N&&g),[N,g]),Nr),R=E.useRef(null),M=r??bNe[n];E.useEffect(()=>{if(!(!A.current||!_))return R.current||(R.current=Q9e({domNode:A.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:B,transform:I,snapGrid:Y,snapToGrid:D,nodeOrigin:V,domNode:L}=T.getState();return{nodeLookup:B,transform:I,snapGrid:Y,snapToGrid:D,nodeOrigin:V,paneDomNode:L}},onChange:(B,I)=>{const{triggerNodeChanges:Y,nodeLookup:D,parentLookup:V,nodeOrigin:L}=T.getState(),U=[],q={x:B.x,y:B.y},X=D.get(_);if(X&&X.expandParent&&X.parentId){const F=X.origin??L,J=B.width??X.measured.width??0,Q=B.height??X.measured.height??0,z={id:X.id,parentId:X.parentId,rect:{width:J,height:Q,...QF({x:B.x??X.position.x,y:B.y??X.position.y},{width:J,height:Q},X.parentId,D,F)}},W=C6([z],D,V,L);U.push(...W),q.x=B.x?Math.max(F[0]*J,B.x):void 0,q.y=B.y?Math.max(F[1]*Q,B.y):void 0}if(q.x!==void 0&&q.y!==void 0){const F={id:_,type:"position",position:{...q}};U.push(F)}if(B.width!==void 0&&B.height!==void 0){const F={id:_,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};U.push(F)}for(const F of I){const J={...F,type:"position"};U.push(J)}Y(U)},onEnd:({width:B,height:I})=>{const Y={id:_,type:"dimensions",resizing:!1,dimensions:{width:B,height:I}};T.getState().triggerNodeChanges([Y])}})),R.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:h,resizeDirection:p,onResizeStart:x,onResize:w,onResizeEnd:k,shouldResize:y}),()=>{R.current?.destroy()}},[M,l,c,u,d,h,x,w,k,y]);const O=M.split("-");return b.jsx("div",{className:an(["react-flow__resize-control","nodrag",...O,n,o]),ref:A,style:{...a,scale:$,...s&&{[N?"backgroundColor":"borderColor"]:s}},children:i})}E.memo(vNe);const xNe=e=>e.domNode?.querySelector(".react-flow__renderer");function wNe({children:e}){const r=At(xNe);return r?ji.createPortal(e,r):null}const kNe=(e,r)=>e?.internals.positionAbsolute.x!==r?.internals.positionAbsolute.x||e?.internals.positionAbsolute.y!==r?.internals.positionAbsolute.y||e?.measured.width!==r?.measured.width||e?.measured.height!==r?.measured.height||e?.selected!==r?.selected||e?.internals.z!==r?.internals.z,_Ne=(e,r)=>{if(e.size!==r.size)return!1;for(const[n,o]of e)if(kNe(o,r.get(n)))return!1;return!0},ENe=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2],selectedNodesCount:e.nodes.filter(r=>r.selected).length});function jU({nodeId:e,children:r,className:n,style:o,isVisible:a,position:i=tt.Top,offset:s=10,align:l="center",...c}){const u=I6(),d=E.useCallback(T=>(Array.isArray(e)?e:[e||u||""]).reduce((A,N)=>{const $=T.nodeLookup.get(N);return $&&A.set($.id,$),A},new Map),[e,u]),h=At(d,_Ne),{x:p,y:g,zoom:y,selectedNodesCount:x}=At(ENe,Nr);if(!(typeof a=="boolean"?a:h.size===1&&h.values().next().value?.selected&&x===1)||!h.size)return null;const w=rp(h),k=Array.from(h.values()),C=Math.max(...k.map(T=>T.internals.z+1)),_={position:"absolute",transform:x9e(w,{x:p,y:g,zoom:y},i,s,l),zIndex:C,...o};return b.jsx(wNe,{children:b.jsx("div",{style:_,className:an(["react-flow__node-toolbar",n]),...c,"data-id":k.reduce((T,A)=>`${T}${A.id} `,"").trim(),children:r})})}var SNe=Object.getOwnPropertyNames,CNe=Object.getOwnPropertySymbols,TNe=Object.prototype.hasOwnProperty;function BU(e,r){return function(n,o,a){return e(n,o,a)&&r(n,o,a)}}function Dw(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);var
.`.concat(c$e,` {
overflow: hidden `).concat(o,`;
padding-right: `).concat(l,"px ").concat(o,`;
}
body[`).concat(pp,`] {
overflow: hidden `).concat(o,`;
overscroll-behavior: contain;
`).concat([r&&"position: relative ".concat(o,";"),n==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(o,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
}
.`).concat(Fw,` {
right: `).concat(l,"px ").concat(o,`;
}
.`).concat(Hw,` {
margin-right: `).concat(l,"px ").concat(o,`;
}
.`).concat(Fw," .").concat(Fw,` {
right: 0 `).concat(o,`;
}
.`).concat(Hw," .").concat(Hw,` {
margin-right: 0 `).concat(o,`;
}
body[`).concat(pp,`] {
`).concat(u$e,": ").concat(l,`px;
}
`)},gV=function(){var e=parseInt(document.body.getAttribute(pp)||"0",10);return isFinite(e)?e:0},N$e=function(){E.useEffect(function(){return document.body.setAttribute(pp,(gV()+1).toString()),function(){var e=gV()-1;e<=0?document.body.removeAttribute(pp):document.body.setAttribute(pp,e.toString())}},[])},R$e=function(e){var r=e.noRelative,n=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;N$e();var i=E.useMemo(function(){return C$e(a)},[a]);return E.createElement(T$e,{styles:A$e(i,!r,a,n?"":"!important")})},K6=!1;if(typeof window<"u")try{var Vw=Object.defineProperty({},"passive",{get:function(){return K6=!0,!0}});window.addEventListener("test",Vw,Vw),window.removeEventListener("test",Vw,Vw)}catch{K6=!1}var mp=K6?{passive:!1}:!1,$$e=function(e){return e.tagName==="TEXTAREA"},yV=function(e,r){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[r]!=="hidden"&&!(n.overflowY===n.overflowX&&!$$e(e)&&n[r]==="visible")},P$e=function(e){return yV(e,"overflowY")},M$e=function(e){return yV(e,"overflowX")},bV=function(e,r){var n=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=vV(e,o);if(a){var i=xV(e,o),s=i[1],l=i[2];if(s>l)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},O$e=function(e){var r=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[r,n,o]},D$e=function(e){var r=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[r,n,o]},vV=function(e,r){return e==="v"?P$e(r):M$e(r)},xV=function(e,r){return e==="v"?O$e(r):D$e(r)},L$e=function(e,r){return e==="h"&&r==="rtl"?-1:1},I$e=function(e,r,n,o,a){var i=L$e(e,window.getComputedStyle(r).direction),s=i*o,l=n.target,c=r.contains(l),u=!1,d=s>0,h=0,p=0;do{if(!l)break;var g=xV(e,l),y=g[0],x=g[1],w=g[2],k=x-w-i*y;(y||k)&&vV(e,l)&&(h+=k,p+=y);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&l!==document.body||c&&(r.contains(l)||r===l));return(d&&Math.abs(h)<1||!d&&Math.abs(p)<1)&&(u=!0),u},qw=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wV=function(e){return[e.deltaX,e.deltaY]},kV=function(e){return e&&"current"in e?e.current:e},z$e=function(e,r){return e[0]===r[0]&&e[1]===r[1]},j$e=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},B$e=0,gp=[];function F$e(e){var r=E.useRef([]),n=E.useRef([0,0]),o=E.useRef(),a=E.useState(B$e++)[0],i=E.useState(mV)[0],s=E.useRef(e);E.useEffect(function(){s.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=l$e([e.lockRef.current],(e.shards||[]).map(kV)).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=E.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var k=qw(x),C=n.current,_="deltaX"in x?x.deltaX:C[0]-k[0],T="deltaY"in x?x.deltaY:C[1]-k[1],A,N=x.target,$=Math.abs(_)>Math.abs(T)?"h":"v";if("touches"in x&&$==="h"&&N.type==="range")return!1;var R=bV($,N);if(!R)return!0;if(R?A=$:(A=$==="v"?"h":"v",R=bV($,N)),!R)return!1;if(!o.current&&"changedTouches"in x&&(_||T)&&(o.current=A),!A)return!0;var M=o.current||A;return I$e(M,w,x,M==="h"?_:T)},[]),c=E.useCallback(function(x){var w=x;if(!(!gp.length||gp[gp.length-1]!==i)){var k="deltaY"in w?wV(w):qw(w),C=r.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&z$e(A.delta,k)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var _=(s.current.shards||[]).map(kV).filter(Boolean).filter(function(A){return A.contains(w.target)}),T=_.length>0?l(w,_[0]):!s.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),u=E.useCallback(function(x,w,k,C){var _={name:x,delta:w,target:k,should:C,shadowParent:H$e(k)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(T){return T!==_})},1)},[]),d=E.useCallback(function(x){n.current=qw(x),o.current=void 0},[]),h=E.useCallback(function(x){u(x.type,wV(x),x.target,l(x,e.lockRef.current))},[]),p=E.useCallback(function(x){u(x.type,qw(x),x.target,l(x,e.lockRef.current))},[]);E.useEffect(function(){return gp.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,mp),document.addEventListener("touchmove",c,mp),document.addEventListener("touchstart",d,mp),function(){gp=gp.filter(function(x){return x!==i}),document.removeEventListener("wheel",c,mp),document.removeEventListener("touchmove",c,mp),document.removeEventListener("touchstart",d,mp)}},[]);var g=e.removeScrollBar,y=e.inert;return E.createElement(E.Fragment,null,y?E.createElement(i,{styles:j$e(a)}):null,g?E.createElement(R$e,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function H$e(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const U$e=y$e(pV,F$e);var S1=E.forwardRef(function(e,r){return E.createElement(Uw,Js({},e,{ref:r,sideCar:U$e}))});S1.classNames=Uw.classNames;function No(e){return Object.keys(e)}function Z6(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Q6(e,r){const n={...e},o=r;return Z6(e)&&Z6(r)&&Object.keys(r).forEach(a=>{Z6(o[a])&&a in e?n[a]=Q6(n[a],o[a]):n[a]=o[a]}),n}function V$e(e){return e.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}function q$e(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function J6(e){const r=q$e(e);return typeof r=="number"?r:typeof r=="string"?r.includes("calc")||r.includes("var")?r:r.includes("px")?Number(r.replace("px","")):r.includes("rem")?Number(r.replace("rem",""))*16:r.includes("em")?Number(r.replace("em",""))*16:Number(r):NaN}function _V(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function EV(e,{shouldScale:r=!1}={}){function n(o){if(o===0||o==="0")return`0${e}`;if(typeof o=="number"){const a=`${o/16}${e}`;return r?_V(a):a}if(typeof o=="string"){if(o===""||o.startsWith("calc(")||o.startsWith("clamp(")||o.includes("rgba("))return o;if(o.includes(","))return o.split(",").map(i=>n(i)).join(",");if(o.includes(" "))return o.split(" ")
${s}
${l}`}function pC({color:e,theme:r,autoContrast:n}){return(typeof n=="boolean"?n:r.autoContrast)&&uu({color:e||r.primaryColor,theme:r}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function tq(e,r){return pC({color:e.colors[e.primaryColor][R1(e,r)],theme:e,autoContrast:null})}function e3({theme:e,color:r,colorScheme:n,name:o=r,withColorValues:a=!0}){if(!e.colors[r])return{};if(n==="light"){const l=R1(e,"light"),c={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-filled)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${l})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${l===9?8:l+1})`,[`--mantine-color-${o}-light`]:wp(e.colors[r][l],.1),[`--mantine-color-${o}-light-hover`]:wp(e.colors[r][l],.12),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${l})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${l})`,[`--mantine-color-${o}-outline-hover`]:wp(e.colors[r][l],.05)};return a?{[`--mantine-color-${o}-0`]:e.colors[r][0],[`--mantine-color-${o}-1`]:e.colors[r][1],[`--mantine-color-${o}-2`]:e.colors[r][2],[`--mantine-color-${o}-3`]:e.colors[r][3],[`--mantine-color-${o}-4`]:e.colors[r][4],[`--mantine-color-${o}-5`]:e.colors[r][5],[`--mantine-color-${o}-6`]:e.colors[r][6],[`--mantine-color-${o}-7`]:e.colors[r][7],[`--mantine-color-${o}-8`]:e.colors[r][8],[`--mantine-color-${o}-9`]:e.colors[r][9],...c}:c}const i=R1(e,"dark"),s={[`--mantine-color-${o}-text`]:`var(--mantine-color-${o}-4)`,[`--mantine-color-${o}-filled`]:`var(--mantine-color-${o}-${i})`,[`--mantine-color-${o}-filled-hover`]:`var(--mantine-color-${o}-${i===9?8:i+1})`,[`--mantine-color-${o}-light`]:wp(e.colors[r][Math.max(0,i-2)],.15),[`--mantine-color-${o}-light-hover`]:wp(e.colors[r][Math.max(0,i-2)],.2),[`--mantine-color-${o}-light-color`]:`var(--mantine-color-${o}-${Math.max(i-5,0)})`,[`--mantine-color-${o}-outline`]:`var(--mantine-color-${o}-${Math.max(i-4,0)})`,[`--mantine-color-${o}-outline-hover`]:wp(e.colors[r][Math.max(i-4,0)],.05)};return a?{[`--mantine-color-${o}-0`]:e.colors[r][0],[`--mantine-color-${o}-1`]:e.colors[r][1],[`--mantine-color-${o}-2`]:e.colors[r][2],[`--mantine-color-${o}-3`]:e.colors[r][3],[`--mantine-color-${o}-4`]:e.colors[r][4],[`--mantine-color-${o}-5`]:e.colors[r][5],[`--mantine-color-${o}-6`]:e.colors[r][6],[`--mantine-color-${o}-7`]:e.colors[r][7],[`--mantine-color-${o}-8`]:e.colors[r][8],[`--mantine-color-${o}-9`]:e.colors[r][9],...s}:s}function oMe(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function kp(e,r,n){No(r).forEach(o=>Object.assign(e,{[`--mantine-${n}-${o}`]:r[o]}))}const rq=e=>{const r=R1(e,"light"),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:Ne(e.defaultRadius),o={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":tq(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text
${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
`}function nq({cssVariablesSelector:e,deduplicateCssVariables:r}){const n=ho(),o=Yd(),a=zPe(),i=aMe({theme:n,generator:a}),s=e===":root"&&r,l=s?iMe(i):i,c=nMe(l,e);return c?b.jsx("style",{"data-mantine-styles":!0,nonce:o?.(),dangerouslySetInnerHTML:{__html:`${c}${s?"":sMe(e)}`}}):null}nq.displayName="@mantine/CssVariables";function _p(e,r){const n=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,o=e!=="auto"?e:n?"dark":"light";r()?.setAttribute("data-mantine-color-scheme",o)}function lMe({manager:e,defaultColorScheme:r,getRootElement:n,forceColorScheme:o}){const a=E.useRef(null),[i,s]=E.useState(()=>e.get(r)),l=o||i,c=E.useCallback(d=>{o||(_p(d,n),s(d),e.set(d))},[e.set,l,o]),u=E.useCallback(()=>{s(r),_p(r,n),e.clear()},[e.clear,r]);return E.useEffect(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),N1(()=>{_p(e.get(r),n)},[]),E.useEffect(()=>{if(o)return _p(o,n),()=>{};o===void 0&&_p(i,n),typeof window<"u"&&"matchMedia"in window&&(a.current=window.matchMedia("(prefers-color-scheme: dark)"));const d=h=>{i==="auto"&&_p(h.matches?"dark":"light",n)};return a.current?.addEventListener("change",d),()=>a.current?.removeEventListener("change",d)},[i,o]),{colorScheme:l,setColorScheme:c,clearColorScheme:u}}function cMe({respectReducedMotion:e,getRootElement:r}){N1(()=>{e&&r()?.setAttribute("data-respect-reduced-motion","true")},[e])}function gC({theme:e,children:r,getStyleNonce:n,withStaticClasses:o=!0,withGlobalClasses:a=!0,deduplicateCssVariables:i=!0,withCssVariables:s=!0,cssVariablesSelector:l=":root",classNamesPrefix:c="mantine",colorSchemeManager:u=QPe(),defaultColorScheme:d="light",getRootElement:h=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:g,stylesTransform:y,env:x}){const{colorScheme:w,setColorScheme:k,clearColorScheme:C}=lMe({defaultColorScheme:d,forceColorScheme:g,manager:u,getRootElement:h});return cMe({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:h}),b.jsx(Zw.Provider,{value:{colorScheme:w,setColorScheme:k,clearColorScheme:C,getRootElement:h,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:p,cssVariablesSelector:l,withStaticClasses:o,stylesTransform:y,env:x},children:b.jsxs(eq,{theme:e,children:[s&&b.jsx(nq,{cssVariablesSelector:l,deduplicateCssVariables:i}),a&&b.jsx(rMe,{}),r]})})}gC.displayName="@mantine/core/MantineProvider";function yC({classNames:e,styles:r,props:n,stylesCtx:o}){const a=ho();return{resolvedClassNames:Gw({theme:a,classNames:e,props:n,stylesCtx:o||void 0}),resolvedStyles:Kw({theme:a,styles:r,props:n,stylesCtx:o||void 0})}}const uMe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function dMe({theme:e,options:r,unstyled:n}){return Ji(r?.focusable&&!n&&(e.focusClassName||uMe[e.focusRing]),r?.active&&!n&&e.activeClassName)}function hMe({selector:e,stylesCtx:r,options:n,props:o,theme:a}){return Gw({theme:a,classNames:n?.classNames,props:n?.props||o,stylesCtx:r})[e]}function oq({selector:e,stylesCtx:r,theme:n,classNames:o,props:a}){return Gw({theme:n,classNames:o,props:a,stylesCtx:r})[e]}function fMe({rootSelector:e,selector:r,className:n}){return e===r?n:void 0}function pMe({selector:e,classes:r,unstyled:n}){return n?void 0:r[e]}function mMe({themeName:e,classNamesPrefix:r,selector:n,withStaticClass:o}){return o===!1?[]:e.map(a=>`${r}-${a}-${n}`)}function gMe({themeName:e,theme:r,selector:n,props:o,stylesCtx:a}){return e.map(i=>Gw({theme:r,classNames:r.components[i]?.classNames,props:o,stylesCtx:a})?.[n])}function yMe({options:e,classes:r,selector:n,unstyled:o}){return e?.variant&&!o?r[`${n}--${e.variant}`]:void 0}function bMe({theme:e,options:r,themeName:n,selector:o,classNamesPrefix:a,classNames:i,classes:s,unstyled:l,className:c,rootSelector:u,props:d,stylesCtx:h,withStaticClasses:p,headless:g,transformedStyles:y}){return Ji(dMe({theme:e,options:r,unstyled:l||g}),gMe({theme:e,themeName:n,selector:o,props:d,stylesCtx:h}),yMe({options:r,classes:s,selector:o,unstyled:l}),oq({selector:o,stylesCtx:h,theme:e,classNames:i,props:d}),oq({selector:o,sty
--colors-likec4-tag-bg: ${r};
--colors-likec4-tag-bg-hover: color-mix(in srgb, ${r}, var(--colors-likec4-mix-color) 20%);
`;if(!Rze.includes(r))return"";let n="12";return["mint","grass","lime","yellow","amber"].includes(r)&&(n="dark-2"),`
--colors-likec4-tag-border: var(--colors-${r}-8);
--colors-likec4-tag-bg: var(--colors-${r}-9);
--colors-likec4-tag-bg-hover: var(--colors-${r}-10);
--colors-likec4-tag-text: var(--colors-${r}-${n});
`};function Pze(e,r){return!e||iu(e)?"":yn(B6(e),ERe(([n,o])=>[`:is(${r} [data-likec4-tag="${n}"]) {`,$ze(o),"}"]),oV(`
`))}function Mze({children:e,rootSelector:r}){const n=Nze().tags,o=Pze(n,r);return b.jsxs(KW.Provider,{value:n,children:[o!==""&&b.jsx(Oze,{stylesheet:o}),e]})}const Oze=E.memo(({stylesheet:e})=>{const r=Yd()?.();return b.jsx("style",{"data-likec4-tags":!0,type:"text/css",dangerouslySetInnerHTML:{__html:e},nonce:r})});function Dze(e){return E.useContext(KW)[e]??{color:"tomato"}}function ZW(){return Ta().replace("mantine-","likec4-")}var Lze="css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borde
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const Kze=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Hp=yt("outline","x","X",Kze);function BT({error:e,resetErrorBoundary:r}){const n=e instanceof Error?e.message:"Unknown error";return b.jsx(Vr,{css:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",padding:"0",backdropFilter:"blur(5px)",backgroundColor:{_dark:"[rgb(34 34 34 / 10%)]",_light:"[rgb(15 15 15/ 20%)]"},zIndex:1e3},children:b.jsxs(V3,{icon:b.jsx(Hp,{style:{width:16,height:16}}),styles:{icon:{alignSelf:"flex-start"}},color:"red",title:"Oops, something went wrong",p:"xl",withCloseButton:!1,children:[b.jsx(ta,{maw:"100%",mah:400,children:b.jsx(j3,{block:!0,children:n})}),b.jsx(Ur,{gap:"xs",mt:"xl",children:b.jsx(Zn,{color:"gray",size:"xs",variant:"light",onClick:()=>r(),children:"Reset"})})]})})}function lX(e){return b.jsx(jT,{FallbackComponent:BT,onError:(r,n)=>{console.error(r,n)},...e})}function Zze(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Qze(){const e=Zze();if(e.__xstate__)return e.__xstate__}const Jze=e=>{if(typeof window>"u")return;const r=Qze();r&&r.register(e)};class cX{constructor(r){this._process=r,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(r){const n={value:r,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const r=this._current;this._process(r.value),this._current=r.next}this._last=null}}const uX=".",eje="",dX="",tje="#",rje="*",hX="xstate.init",nje="xstate.error",G1="xstate.stop";function oje(e,r){return{type:`xstate.after.${e}.${r}`}}function FT(e,r){return{type:`xstate.done.state.${e}`,output:r}}function aje(e,r){return{type:`xstate.done.actor.${e}`,output:r,actorId:e}}function fX(e,r){return{type:`xstate.error.actor.${e}`,error:r,actorId:e}}function pX(e){return{type:hX,input:e}}function al(e){setTimeout(()=>{throw e})}const ije=typeof Symbol=="function"&&Symbol.observable||"@@observable";function mX(e,r){const n=gX(e),o=gX(r);return typeof o=="string"?typeof n=="string"?o===n:!1:typeof n=="string"?n in o:Object.keys(n).every(a=>a in o?mX(n[a],o[a]):!1)}function HT(e){if(vX(e))return e;const r=[];let n="";for(let o=0;o<e.length;o++){switch(e.charCodeAt(o)){case 92:n+=e[o+1],o++;continue;case 46:r.push(n),n="";continue}n+=e[o]}return r.push(n),r}function gX(e){if(Bje(e))return e.value;if(typeof e!="string")return e;const r=HT(e);return sje(r)}function sje(e){if(e.length===1)return e[0];const r={};let n=r;for(let o=0;o<e.length-1;o++)if(o===e.length-2)n[e[o]]=e[o+1];else{const a=n;n={},a[e[o]]=n}return r}function yX(e,r){const n={},o=Object.keys(e);for(let a=0;a<o.length;a++){const i=o[a];n[i]=r(e[i],i,e,a)}return n}function bX(e){return vX(e)?e:[e]}function Jl(e){return e===void 0?[]:bX(e)}function UT(e,r,n,o){return typeof e=="function"?e({context:r,event:n,self:o}):e}function vX(e){return Array.isArray(e)}function lje(e){return e.type.startsWith("xstate.error.actor")}function Up(e){return bX(e).map(r=>typeof r>"u"||typeof r=="string"?{target:r}:r)}function xX(e){if(!(e===void 0||e===eje))return Jl(e)}function K3(e,r,n){const o=typeof e=="object",a=o?e:void 0;return{next:(o?e.next:e)?.bind(a),error:(o?e.error:r)?.bind(a),complete:(o?e.complete:n)?.bind(a)}}function wX(e,r){return`${r}.${e}`}function VT(e,r){const n=r.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[r];const[,o,a]=n,i=e.getStateNodeById(a).config.invoke;return(Array.isArray(i)?i[o]:i).src}function kX(e,r){return`${e.sessionId}.${r}`}let cje=0;function uje(e,r){const n=new Map,o=new Map,a=new WeakMap,i=new Set,s={},{clock:l,logger:c}=r,u={schedule:(p,g,y,x,w=Math.random().toString(36).slice(2))=>{const k={source:p,target:g,event:y,delay:x,id:w,startedAt:Date.now()},C=kX(p,w);h._snapshot._scheduledEvents[C]=k;const _=l.setTimeout(()=>{delete s[C],delete h._snapsho
${i.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function TX(e){const r=xX(e.config.target);return r?{target:r.map(n=>typeof n=="string"?ek(e.parent,n):n)}:e.parent.initial}function rh(e){return e.type==="history"}function AX(e){const r=NX(e);for(const n of r)for(const o of K1(n,e))r.add(o);return r}function NX(e){const r=new Set;function n(o){if(!r.has(o)){if(r.add(o),o.type==="compound")n(o.initial.target[0]);else if(o.type==="parallel")for(const a of Wp(o))n(a)}}return n(e),r}function Xp(e,r){if(J3(r))return e.machine.getStateNodeById(r);if(!e.states)throw new Error(`Unable to retrieve child state '${r}' from '${e.id}'; no child states exist.`);const n=e.states[r];if(!n)throw new Error(`Child state '${r}' does not exist on '${e.id}'`);return n}function ek(e,r){if(typeof r=="string"&&J3(r))try{return e.machine.getStateNodeById(r)}catch{}const n=HT(r).slice();let o=e;for(;n.length;){const a=n.shift();if(!a.length)break;o=Xp(o,a)}return o}function tk(e,r){if(typeof r=="string"){const a=e.states[r];if(!a)throw new Error(`State '${r}' does not exist on '${e.id}'`);return[e,a]}const n=Object.keys(r),o=n.map(a=>Xp(e,a)).filter(Boolean);return[e.machine.root,e].concat(o,n.reduce((a,i)=>{const s=Xp(e,i);if(!s)return a;const l=tk(s,r[i]);return a.concat(l)},[]))}function Cje(e,r,n,o){const a=Xp(e,r).next(n,o);return!a||!a.length?e.next(n,o):a}function Tje(e,r,n,o){const a=Object.keys(r),i=Xp(e,a[0]),s=GT(i,r[a[0]],n,o);return!s||!s.length?e.next(n,o):s}function Aje(e,r,n,o){const a=[];for(const i of Object.keys(r)){const s=r[i];if(!s)continue;const l=Xp(e,i),c=GT(l,s,n,o);c&&a.push(...c)}return a.length?a:e.next(n,o)}function GT(e,r,n,o){return typeof r=="string"?Cje(e,r,n,o):Object.keys(r).length===1?Tje(e,r,n,o):Aje(e,r,n,o)}function Nje(e){return Object.keys(e.states).map(r=>e.states[r]).filter(r=>r.type==="history")}function bu(e,r){let n=e;for(;n.parent&&n.parent!==r;)n=n.parent;return n.parent===r}function Rje(e,r){const n=new Set(e),o=new Set(r);for(const a of n)if(o.has(a))return!0;for(const a of o)if(n.has(a))return!0;return!1}function RX(e,r,n){const o=new Set;for(const a of e){let i=!1;const s=new Set;for(const l of o)if(Rje(ZT([a],r,n),ZT([l],r,n)))if(bu(a.source,l.source))s.add(l);else{i=!0;break}if(!i){for(const l of s)o.delete(l);o.add(a)}}return Array.from(o)}function $je(e){const[r,...n]=e;for(const o of K1(r,void 0))if(n.every(a=>bu(a,o)))return o}function KT(e,r){if(!e.target)return[];const n=new Set;for(const o of e.target)if(rh(o))if(r[o.id])for(const a of r[o.id])n.add(a);else for(const a of KT(TX(o),r))n.add(a);else n.add(o);return[...n]}function $X(e,r){const n=KT(e,r);if(!n)return;if(!e.reenter&&n.every(a=>a===e.source||bu(a,e.source)))return e.source;const o=$je(n.concat(e.source));if(o)return o;if(!e.reenter)return e.source.machine.root}function ZT(e,r,n){const o=new Set;for(const a of e)if(a.target?.length){const i=$X(a,n);a.reenter&&a.source===i&&o.add(i);for(const s of r)bu(s,i)&&o.add(s)}return[...o]}function Pje(e,r){if(e.length!==r.size)return!1;for(const n of e)if(!r.has(n))return!1;return!0}function QT(e,r,n,o,a,i){if(!e.length)return r;const s=new Set(r._nodes);let l=r.historyValue;const c=RX(e,s,l);let u=r;a||([u,l]=Lje(u,o,n,c,s,l,i,n.actionExecutor)),u=Kp(u,o,n,c.flatMap(h=>h.actions),i,void 0),u=Oje(u,o,n,c,s,i,l,a);const d=[...s];u.status==="done"&&(u=Kp(u,o,n,d.sort((h,p)=>p.order-h.order).flatMap(h=>h.exit),i,void 0));try{return l===r.historyValue&&Pje(r._nodes,s)?u:nh(u,{_nodes:d,historyValue:l})}catch(h){throw h}}function Mje(e,r,n,o,a){if(o.output===void 0)return;const i=FT(a.id,a.output!==void 0&&a.parent?UT(a.output,e.context,r,n.self):void 0);return UT(o.output,e.context,i,n.self)}function Oje(e,r,n,o,a,i,s,l){let c=e;const u=new Set,d=new Set;Dje(o,s,d,u),l&&d.add(e.machine.root);const h=new Set;for(const p of[...u].sort((g,y)=>g.order-y.order)){a.add(p);const g=[];g.push(...p.entry);for(const y of p.invoke)g.push(qp(y.src,{...y,syncSnapshot:!!y.onSnapshot}));if(d.has(p)){const y=p.initial.actions;g.
${h.message}`)}if(d){a.push(...l.actions),i=l;break}}return i?[i]:void 0}get events(){return Zp(this,"events",()=>{const{states:r}=this,n=new Set(this.ownEvents);if(r)for(const o of Object.keys(r)){const a=r[o];if(a.states)for(const i of a.events)n.add(`${i}`)}return Array.from(n)})}get ownEvents(){const r=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(o=>!(!o.target&&!o.actions.length&&!o.reenter))));return Array.from(r)}}const eBe="#";class t8{constructor(r,n){this.config=r,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=r.id||"(machine)",this.implementations={actors:n?.actors??{},actions:n?.actions??{},delays:n?.delays??{},guards:n?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new ok(r,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(r){const{actions:n,guards:o,actors:a,delays:i}=this.implementations;return new t8(this.config,{actions:{...n,...r.actions},guards:{...o,...r.guards},actors:{...a,...r.actors},delays:{...i,...r.delays}})}resolveState(r){const n=jje(this.root,r.value),o=Q3(tk(this.root,n));return rk({_nodes:[...o],context:r.context||{},children:{},status:XT(o,this.root)?"done":r.status||"active",output:r.output,error:r.error,historyValue:r.historyValue},this)}transition(r,n,o){return e8(r,n,o,[]).snapshot}microstep(r,n,o){return e8(r,n,o,[]).microstates}getTransitionData(r,n){return GT(this.root,r.value,r,n)||[]}getPreInitialState(r,n,o){const{context:a}=this.config,i=rk({context:typeof a!="function"&&a?a:{},_nodes:[this.root],children:{},status:"active"},this);return typeof a=="function"?Kp(i,n,r,[et(({spawn:s,event:l,self:c})=>a({spawn:s,input:l.input,self:c}))],o,void 0):i}getInitialSnapshot(r,n){const o=pX(n),a=[],i=this.getPreInitialState(r,o,a),s=QT([{target:[...NX(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],i,r,o,!0,a),{snapshot:l}=e8(s,o,r,a);return l}start(r){Object.values(r.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(r){const n=HT(r),o=n.slice(1),a=J3(n[0])?n[0].slice(eBe.length):n[0],i=this.idMap.get(a);if(!i)throw new Error(`Child state node '#${a}' does not exist on machine '${this.id}'`);return ek(i,o)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(r,n){return Wje(r,n)}restoreSnapshot(r,n){const o={},a=r.children;Object.keys(a).forEach(h=>{const p=a[h],g=p.snapshot,y=p.src,x=typeof y=="string"?VT(this,y):y;if(!x)return;const w=Vp(x,{id:h,parent:n.self,syncSnapshot:p.syncSnapshot,snapshot:g,src:y,systemId:p.systemId});o[h]=w});function i(h,p){if(p instanceof ok)return p;try{return h.machine.getStateNodeById(p.id)}catch{}}function s(h,p){if(!p||typeof p!="object")return{};const g={};for(const y in p){const x=p[y];for(const w of x){const k=i(h,w);k&&(g[y]??=[],g[y].push(k))}}return g}const l=s(this.root,r.historyValue),c=rk({...r,children:o,_nodes:Array.from(Q3(tk(this.root,r.value))),historyValue:l},this),u=new Set;function d(h,p){if(!u.has(h)){u.add(h);for(const g in h){const y=h[g];if(y&&typeof y=="object"){if("xstate$$type"in y&&y.xstate$$type===YT){h[g]=p[y.id];continue}d(y,p)}}}}return d(c.context,o),c}}function tBe(e,r,n,o,{event:a}){const i=typeof a=="function"?a(n,o):a;return[r,{event:i},void 0]}function rBe(e,{event:r}){e.defer(()=>e.emit(r))}function ui(e){function r(n,o){}return r.type="xstate.emit",r.event=e,r.resolve=tBe,r.execute=rBe,r}let r8=(function(e){return e.Parent="#_parent",e.Internal="#_internal",e})({});function nBe(e,r,n,o,{to:a,event:i,id:s,delay:l},c){const u=r.machine.implementations.delays;if(typeof i=="string")throw
[data-motion-pop-id="${a}"] {
position: absolute !important;
width: ${u}px !important;
height: ${d}px !important;
${y}px !important;
top: ${h}px !important;
}
`),()=>{w.contains(x)&&w.removeChild(x)}},[r]),b.jsx(dUe,{isPresent:r,childRef:i,sizeRef:s,children:E.cloneElement(e,{ref:c})})}const fUe=({children:e,initial:r,isPresent:n,onExitComplete:o,custom:a,presenceAffectsLayout:i,mode:s,anchorX:l,root:c})=>{const u=um(pUe),d=E.useId();let h=!0,p=E.useMemo(()=>(h=!1,{id:d,initial:r,isPresent:n,custom:a,onExitComplete:g=>{u.set(g,!0);for(const y of u.values())if(!y)return;o&&o()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,o]);return i&&h&&(p={...p}),E.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),E.useEffect(()=>{!n&&!u.size&&o&&o()},[n]),s==="popLayout"&&(e=b.jsx(hUe,{isPresent:n,anchorX:l,root:c,children:e})),b.jsx(gk.Provider,{value:p,children:e})};function pUe(){return new Map}function HK(e=!0){const r=E.useContext(gk);if(r===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:a}=r,i=E.useId();E.useEffect(()=>{if(e)return a(i)},[e]);const s=E.useCallback(()=>e&&o&&o(i),[i,o,e]);return!n&&o?[!1,s]:[!0]}const yk=e=>e.key||"";function UK(e){const r=[];return E.Children.forEach(e,n=>{E.isValidElement(n)&&r.push(n)}),r}const Pa=({children:e,custom:r,initial:n=!0,onExitComplete:o,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1,anchorX:l="left",root:c})=>{const[u,d]=HK(s),h=E.useMemo(()=>UK(e),[e]),p=s&&!u?[]:h.map(yk),g=E.useRef(!0),y=E.useRef(h),x=um(()=>new Map),[w,k]=E.useState(h),[C,_]=E.useState(h);c9(()=>{g.current=!1,y.current=h;for(let N=0;N<C.length;N++){const $=yk(C[N]);p.includes($)?x.delete($):x.get($)!==!0&&x.set($,!1)}},[C,p.length,p.join("-")]);const T=[];if(h!==w){let N=[...h];for(let $=0;$<C.length;$++){const R=C[$],M=yk(R);p.includes(M)||(N.splice($,0,R),T.push(R))}return i==="wait"&&T.length&&(N=T),_(UK(N)),k(h),null}const{forceRender:A}=E.useContext(uy);return b.jsx(b.Fragment,{children:C.map(N=>{const $=yk(N),R=s&&!u?!1:h===C||p.includes($),M=()=>{if(x.has($))x.set($,!0);else return;let O=!0;x.forEach(B=>{B||(O=!1)}),O&&(A?.(),_(y.current),s&&d?.(),o&&o())};return b.jsx(fUe,{isPresent:R,initial:!g.current||n?void 0:!1,custom:r,presenceAffectsLayout:a,mode:i,root:c,onExitComplete:R?void 0:M,anchorX:l,children:N},$)})})},mUe=E.createContext(null);function gUe(){const e=E.useRef(!1);return c9(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function yUe(){const e=gUe(),[r,n]=E.useState(0),o=E.useCallback(()=>{e.current&&n(r+1)},[r]);return[E.useCallback(()=>Mr.postRender(o),[o]),r]}const bUe=e=>!e.isLayoutDirty&&e.willUpdate(!1);function vUe(){const e=new Set,r=new WeakMap,n=()=>e.forEach(bUe);return{add:o=>{e.add(o),r.set(o,o.addEventListener("willUpdate",n))},remove:o=>{e.delete(o);const a=r.get(o);a&&(a(),r.delete(o)),n()},dirty:n}}const VK=e=>e===!0,xUe=e=>VK(e===!0)||e==="id",dm=({children:e,id:r,inherit:n=!0})=>{const o=E.useContext(uy),a=E.useContext(mUe),[i,s]=yUe(),l=E.useRef(null),c=o.id||a;l.current===null&&(xUe(n)&&c&&(r=r?c+"-"+r:c),l.current={id:r,group:VK(n)&&o.group||vUe()});const u=E.useMemo(()=>({...l.current,forceRender:i}),[s]);return b.jsx(uy.Provider,{value:u,children:e})},u9=E.createContext({strict:!1});function d9(e){for(const r in e)lm[r]={...lm[r],...e[r]}}function wUe({children:e,features:r,strict:n=!1}){const[,o]=E.useState(!h9(r)),a=E.useRef(void 0);if(!h9(r)){const{renderer:i,...s}=r;a.current=i,d9(s)}return E.useEffect(()=>{h9(r)&&r().then(({renderer:i,...s})=>{d9(s),a.current=i,o(!0)})},[]),b.jsx(u9.Provider,{value:{renderer:a.current,strict:n},children:e})}function h9(e){return typeof e=="function"}const kUe=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function bk(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const oYe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],TQ=yt("outline","check","Check",oYe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const aYe=[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],iYe=yt("outline","copy","Copy",aYe),AQ="https://github.com/",j9=E.forwardRef(({value:e,className:r,...n},o)=>{const a=e.url.includes("://")?e.url:new window.URL(e.url,window.location.href).toString();let i=a.startsWith(AQ);return b.jsx(Gl,{ref:o,variant:"default",radius:"sm",size:"sm",tt:"none",leftSection:e.title?b.jsx(b.Fragment,{children:e.title}):null,rightSection:b.jsx(cW,{value:a,timeout:1500,children:({copy:s,copied:l})=>b.jsx(or,{className:ye({opacity:l?1:.45,transition:"fast",_hover:{opacity:1}}),tabIndex:-1,size:"20",variant:l?"light":"transparent",color:l?"teal":"gray","data-active":l,onClick:c=>{c.stopPropagation(),c.preventDefault(),s()},children:l?b.jsx(TQ,{}):b.jsx(iYe,{stroke:2.5})})}),...n,className:Je(r,"group"),classNames:{root:ye({flexWrap:"nowrap",minHeight:24,maxWidth:500,userSelect:"all",pr:"0",backgroundColor:{base:"transparent",_hover:{base:"mantine.colors.gray[1]",_dark:"mantine.colors.dark[5]"}}}),section:ye({'&:is([data-position="left"])':{color:"mantine.colors.dimmed",userSelect:"none",pointerEvents:"none",_groupHover:{color:"[var(--badge-color)]",opacity:.7}}})},children:b.jsxs(Ql.a,{href:a,target:"_blank",style:{color:"var(--badge-color)",cursor:"pointer"},css:{transition:"fast",opacity:{base:.7,_hover:1},textDecoration:{base:"none",_hover:"underline"}},children:[i&&b.jsx(nYe,{height:"12",width:"12",style:{verticalAlign:"middle",marginRight:"4px"}}),i?a.replace(AQ,""):a]})})});function NQ(){const e=E.useContext(OT);if(!e)throw new Error("No LikeC4ViewModel in context found");return e}const Tk="--_blur",Ak="--_opacity",sYe=ye({boxSizing:"border-box",margin:"0",padding:"0",position:"fixed",inset:"0",width:"100vw",height:"100vh",maxWidth:"100vw",maxHeight:"100vh",background:"transparent",border:"transparent",_backdrop:{backdropFilter:"auto",backdropBlur:`var(${Tk})`,backgroundColor:`[rgb(36 36 36 / var(${Ak}, 5%))]`}}),lYe=ye({position:"absolute",pointerEvents:"all",display:"flex",flexDirection:"column",padding:"4",gap:"lg",justifyContent:"stretch",color:"mantine.colors.text",backgroundColor:{base:"mantine.colors.body",_dark:"mantine.colors.dark[6]"},boxShadow:"md",overflow:"hidden",border:"none",backgroundImage:`
linear-gradient(180deg,
color-mix(in srgb, var(--likec4-palette-fill) 60%, transparent),
color-mix(in srgb, var(--likec4-palette-fill) 20%, transparent) 8px,
color-mix(in srgb, var(--likec4-palette-fill) 14%, transparent) 20px,
transparent 80px
),
linear-gradient(180deg, var(--likec4-palette-fill), var(--likec4-palette-fill) 4px, transparent 4px)
`,"& .react-flow__attribution":{display:"none"}}),cYe=ye({flex:0,cursor:"move"}),uYe=ye({display:"block",fontFamily:"likec4.element",fontOpticalSizing:"auto",fontStyle:"normal",fontWeight:600,fontSize:"24px",lineHeight:"xs"}),B9="40px",dYe=ye({flex:`0 0 ${B9}`,height:B9,width:B9,display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"flex-start",cursor:"move",_dark:{mixBlendMode:"hard-light"},"& :where(svg, img)":{width:"100%",height:"auto",maxHeight:"100%",pointerEvents:"none",filter:`
drop-shadow(0 0 3px rgb(0 0 0 / 10%))
drop-shadow(0 1px 8px rgb(0 0 0 / 5%))
drop-shadow(1px 1px 16px rgb(0 0 0 / 2%))
`},"& img":{objectFit:"contain"}}),Nk="--view-title-color",Rk="--icon-color",hYe=ye({width:"100%",background:"mantine.colors.body",borderRadius:"sm",padding:"[10px 8px]",transition:"fast",border:"1px dashed",borderColor:"mantine.colors.defaultBorder",[Nk]:"{colors.mantine.colors.dark[1]}",_hover:{background:"mantine.colors.defaultHover",[Rk]:"{colors.mantine.colors.dark[1]}",[Nk]:"{colors.mantine.colors.defaultColor}"},_dark:{background:"mantine.colors.dark[6]"},_light:{[Rk]:"{colors.mantine.colors.gray[6]}",[Nk]:"{colors.mantine.colors.gray[7]}",_hover:{[Rk]:"{colors.mantine.colors.gray[7]}"}},"& .mantine-ThemeIcon-root":{transition:"fast",color:`[var(${Rk}, {colors.mantine.colors.dark[2]})]`,"--ti-size":"22px",_hover:{color:"mantine.colors.defaultColor"}},"& > *":{transition:"all 130ms {easings.inOut}"},"&:hover > *":{transitionTimingFunction:"out",transform:"translateX(1.6px)"}}),fYe=ye({transition:"fast",color:`[var(${Nk}, {colors.mantine.colors.gray[7]})]`,fontSize:"15px",fontWeight:500,lineHeight:"1.4"}),pYe=ye({flex:1,display:"flex",flexDirection:"column",justifyContent:"stretch",overflow:"hidden",gap:"sm"}),mYe=ye({background:"mantine.colors.gray[1]",borderRadius:"sm",flexWrap:"nowrap",gap:"1.5",padding:"1",_dark:{background:"mantine.colors.dark[7]"}}),gYe=ye({fontSize:"xs",fontWeight:500,flexGrow:1,padding:"[6px 8px]",transition:"fast",borderRadius:"sm",color:"mantine.colors.gray[7]",_hover:{transitionTimingFunction:"out",color:"mantine.colors.defaultColor",background:"mantine.colors.gray[3]"},"&[data-active]":{transition:"none",background:"mantine.colors.white",shadow:"xs",color:"mantine.colors.defaultColor"},_dark:{color:"mantine.colors.dark[1]",_hover:{color:"mantine.colors.white",background:"mantine.colors.dark[6]"},"&:is([data-active])":{color:"mantine.colors.white",background:"mantine.colors.dark[5]"}}}),yYe=ye({flex:1,overflow:"hidden",position:"relative","&:not(:has(.mantine-ScrollArea-root))":{paddingLeft:"1",paddingRight:"1"},"& .mantine-ScrollArea-root":{width:"100%",height:"100%","& > div":{paddingLeft:"1",paddingRight:"1"}}}),bYe=ye({flex:1,display:"grid",gridTemplateColumns:"min-content 1fr",gridAutoRows:"min-content max-content",gap:"[24px 20px]",alignItems:"baseline",justifyItems:"stretch"}),vYe=ye({justifySelf:"end",textAlign:"right",userSelect:"none"}),xYe=ye({position:"absolute",width:"14px",height:"14px",border:"3.5px solid",borderColor:"mantine.colors.dark[3]",borderTop:"none",borderLeft:"none",borderRadius:"2px",bottom:"0.5",right:"0.5",transition:"fast",cursor:"se-resize",_hover:{borderWidth:"4px",borderColor:"mantine.colors.dark[1]"}}),wYe=ye({"&[data-level='1']":{marginBottom:"sm"}}),kYe=ye({cursor:"default",marginTop:"0",marginBottom:"0"}),RQ=ye({transition:"fast",color:"mantine.colors.gray[7]",_dark:{color:"mantine.colors.dark[1]"},"& > *":{transition:"fast"},_hover:{transitionTimingFunction:"out","& > :not([data-no-transform])":{transitionTimingFunction:"out",transform:"translateX(1px)"}}}),_Ye=Je(RQ),EYe=Je(RQ,ye({cursor:"pointer",width:"100%",justifyContent:"stretch",flexWrap:"nowrap",height:"36px",paddingInlineStart:"[16px]",paddingInlineEnd:"2.5",borderRadius:"sm",alignItems:"center",color:"mantine.colors.gray[7]",_dark:{color:"mantine.colors.gray.lightColor"},_hover:{background:"mantine.colors.gray.lightHover"},"& .tabler-icon":{transition:"fast",width:"90%",opacity:.65}}));/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const SYe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],F9=yt("outline","info-circle","InfoCircle",SYe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const CYe=[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0",key:"svg-1"}],["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],TYe=yt("outline","target","Target",CYe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const AYe=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}],["path",{d:"M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-4"}],["path",{d:"M16 16l-2.5 -2.5",key:"svg-5"}]],gi=yt("outline","zoom-scan","ZoomScan",AYe),NYe=({node:e})=>b.jsxs(Ur,{className:_Ye,gap:6,align:"baseline",wrap:"nowrap",children:[b.jsxs(wt,{component:"div",fz:11,c:"dimmed",children:[e.kind,":"]}),b.jsx(wt,{component:"div",fz:"sm",fw:"500",children:e.title})]}),RYe=({instance:e})=>{const r=Wt(),n=r.currentView.id,o=[...e.views()];return b.jsxs(Ur,{className:EYe,gap:4,children:[b.jsx(ci,{color:"gray",variant:"transparent",size:"xs",flex:0,children:b.jsx(TYe,{stroke:1.2})}),b.jsx(wt,{component:"div",fz:"sm",fw:"500",flex:"1 1 100%",children:e.title}),b.jsxs(Se,{onClick:cn,pos:"relative","data-no-transform":!0,flex:0,children:[o.length===0&&b.jsx(Zn,{size:"compact-xs",variant:"transparent",color:"gray",disabled:!0,children:"no views"}),o.length>0&&b.jsxs(fo,{shadow:"md",withinPortal:!1,position:"bottom-start",offset:0,closeOnClickOutside:!0,clickOutsideEvents:["pointerdown","mousedown","click"],closeOnEscape:!0,trapFocus:!0,children:[b.jsx(fo.Target,{children:b.jsxs(Zn,{size:"compact-xs",variant:"subtle",color:"gray",children:[o.length," view",o.length>1?"s":""]})}),b.jsx(fo.Dropdown,{children:o.map(a=>b.jsx(fo.Item,{px:"xs",py:4,disabled:a.id===n,leftSection:b.jsx(ci,{size:"sm",variant:"transparent",color:"gray",children:b.jsx(gi,{stroke:1.8,opacity:.65})}),styles:{itemSection:{marginInlineEnd:Ne(8)}},onClick:i=>{i.stopPropagation(),r.navigateTo(a.id)},children:a.title},a.id))})]})]})]})},$Ye=()=>{},PYe=E.memo(({elementFqn:e})=>{const r=Ho().element(e),n=[...r.deployments()],o=Y1({multiple:!1});o.setHoveredNode=$Ye;const a=E.useMemo(()=>{let i=[],s=new Map;for(const l of r.deployments()){let c={label:b.jsx(RYe,{instance:l}),value:l.id,type:"instance",children:[]};s.set(l.id,c);let u=l.parent;for(;u;){let d=s.get(u.id);if(d){d.children.push(c);break}d={label:b.jsx(NYe,{node:u}),value:u.id,type:"node",children:[c]},s.set(u.id,d),c=d,u=u.parent}!u&&!i.includes(c)&&i.push(c)}return i},[r]);return E.useEffect(()=>{o.expandAllNodes()},[a]),n.length===0?b.jsx(M3,{variant:"light",color:"gray",icon:b.jsx(F9,{}),children:"This element does not have any deployments"}):b.jsx(Bp,{levelOffset:"sm",allowRangeSelection:!1,classNames:{node:wYe,label:kYe},styles:{root:{position:"relative",width:"min-content",minWidth:300}},data:a,tree:o,renderNode:({node:i,selected:s,elementProps:l,hasChildren:c})=>b.jsx(Se,{...l,style:{...!c&&{marginBottom:Ne(4)}},children:c?b.jsx(Zn,{fullWidth:!0,color:"gray",variant:s?"transparent":"subtle",size:"xs",justify:"flex-start",styles:{root:{position:"unset",paddingInlineStart:Ne(16)}},children:i.label}):i.label})})}),MYe=()=>{},$Q=(e,r)=>{if(e===r)return!0;if(e.length!==r.length)return!1;for(const[n,o]of e.entries())if(o!==r[n]&&!Xn(o,r[n]))return!1;return!0};function $k(e,r,n,o){const a=FB();BB(a?MYe:e,r,$Q,o)}function OYe(){const e=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:1;return Ki(Math.floor(e),{min:1,max:4})}let Pk;function yi(e){return Pk??=OYe(),Pk<2?Math.round(e):Math.round(e*Pk)/Pk}function DYe(e){switch(e){case"dots":return Gi.Dots;case"lines":return Gi.Lines;case"cross":return Gi.Cross;default:Ga(e)}}function LYe({background:e}){return typeof e=="string"?b.jsx(LU,{variant:DYe(e),size:2,gap:20}):b.jsx(LU,{...e})}const ds={Compound:1,Edge:20,Element:20,Max:30},hs=.05,H9=3,Mk={default:"16px",withControls:{top:"50px",left:"16px",right:"16px",bottom:"16px"}},PQ=(e,r)=>(e.data.dimmed??!1)===r?e:{...e,data:{...e.data,dimmed:r}};function IYe(e,r){return r!==void 0?PQ(e,r):n=>PQ(n,e)}const MQ=(e,r)=>(e.data.hovered??!1)===r?e:{...e,data:{...e.data,hovered:r}};function zYe(e,r){return r!==void 0?MQ(e,r):n=>MQ(n,e)}function OQ(e,r){return DRe(e.data,r)?e:{...e,data:{...e.data,...r}}}function jYe(e,r){return r!==void 0?OQ(e,r):n=>OQ(n,e)}con
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const OWe=[["path",{d:"M8 9l4 -4l4 4",key:"svg-0"}],["path",{d:"M16 15l-4 4l-4 -4",key:"svg-1"}]],LA=yt("outline","selector","Selector",OWe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const DWe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],hh=yt("outline","chevron-right","ChevronRight",DWe),LWe=e=>{const r=e.context.layouted?.subjectExistsInScope??!1;return{subjectId:e.context.subject,viewId:e.context.viewId,scope:e.context.scope,subjectExistsInScope:r,enableSelectSubject:e.context.enableSelectSubject,enableChangeScope:e.context.enableChangeScope}},IWe=()=>{},zWe=E.memo(()=>{const e=Sy(),{subjectId:r,viewId:n,scope:o,subjectExistsInScope:a,enableSelectSubject:i,enableChangeScope:s}=Ok(LWe),l=E.useRef(null),c=E.useRef(null),u=Ho().findElement(r),d=RWe(o==="view"&&n?n:void 0),h=Y1({multiple:!1});return h.setHoveredNode=IWe,E.useEffect(()=>{bd(r).reverse().forEach(p=>{h.expand(p)}),h.select(r)},[r]),b.jsxs(Ur,{ref:l,gap:"xs",pos:"relative",children:[i&&b.jsxs(Ur,{gap:4,wrap:"nowrap",children:[b.jsx(Se,{fz:"xs",fw:"500",style:{whiteSpace:"nowrap",userSelect:"none"},children:"Relationships of"}),b.jsx(Se,{pos:"relative",children:b.jsxs(mr,{position:"bottom-start",shadow:"md",keepMounted:!1,withinPortal:!1,closeOnClickOutside:!0,clickOutsideEvents:["pointerdown","mousedown","click"],offset:4,onOpen:()=>{setTimeout(()=>{c.current?.querySelector(`[data-value="${r}"]`)?.scrollIntoView({behavior:"instant",block:"nearest"})},100)},children:[b.jsx(pu,{children:b.jsx(Zn,{size:"xs",variant:"default",maw:250,rightSection:b.jsx(LA,{size:16}),children:b.jsx(wt,{fz:"xs",fw:"500",truncate:!0,children:u?.title??"???"})})}),b.jsx(Xl,{p:0,miw:250,maw:400,children:b.jsx(ta,{scrollbars:"y",type:"never",viewportRef:c,className:FJ,children:b.jsx(Bp,{allowRangeSelection:!1,selectOnClick:!1,tree:h,data:d,classNames:MWe,levelOffset:8,styles:{root:{maxWidth:400,overflow:"hidden"},label:{paddingTop:5,paddingBottom:6}},renderNode:({node:p,selected:g,expanded:y,elementProps:x,hasChildren:w})=>b.jsxs(Ur,{gap:2,wrap:"nowrap",...x,py:"3",children:[b.jsx(or,{variant:"subtle",size:18,c:"dimmed",style:{visibility:w?"visible":"hidden"},children:b.jsx(hh,{stroke:3.5,style:{transition:"transform 150ms ease",transform:`rotate(${y?"90deg":"0"})`,width:"80%"}})}),b.jsx(Se,{flex:"1 1 100%",w:"100%",onClick:k=>{k.stopPropagation(),h.select(p.value),h.expand(p.value),e.navigateTo(p.value)},children:b.jsx(wt,{fz:"sm",fw:g?"600":"400",truncate:"end",children:p.label})})]})})})})]})})]}),s&&b.jsxs(Ur,{gap:4,wrap:"nowrap",children:[i&&b.jsx(Se,{fz:"xs",fw:"500",...!a&&{c:"dimmed"},style:{whiteSpace:"nowrap",userSelect:"none"},children:"Scope"}),b.jsx("div",{children:b.jsx(po,{color:"orange",label:b.jsxs(b.Fragment,{children:["This element does not exist in the current view",o==="view"&&b.jsxs(b.Fragment,{children:[b.jsx("br",{}),"Scope is set to global"]})]}),position:"bottom-start",disabled:a,portalProps:{target:l.current},children:b.jsx(U1,{flex:"1 0 auto",size:"xs",withItemsBorders:!1,value:o,styles:{label:{paddingLeft:8,paddingRight:8}},onChange:p=>{e.changeScope(p)},data:[{label:"Global",value:"global"},{label:b.jsx("span",{children:"Current view"}),value:"view",disabled:!a}]})})})]})]})}),zk=(e,r)=>Math.abs(e-r)<2.5,jWe=(e,r)=>e.id===r.id&&ut(e.selected??!1,r.selected??!1)&&ut(e.animated??!1,r.animated??!1)&&ut(e.source,r.source)&&ut(e.sourceHandleId??null,r.sourceHandleId??null)&&ut(e.sourcePosition,r.sourcePosition)&&ut(e.target,r.target)&&ut(e.targetHandleId??null,r.targetHandleId??null)&&ut(e.targetPosition,r.targetPosition)&&zk(e.sourceX,r.sourceX)&&zk(e.sourceY,r.sourceY)&&zk(e.targetX,r.targetX)&&zk(e.targetY,r.targetY)&&ut(e.data,r.data);function IA(e){return E.memo(e,jWe)}const BWe=["Controls","ReadOnly","FocusMode","NavigateTo","ElementDetails","RelationshipDetails","RelationshipBrowser","Search","NavigationButtons","Notations","DynamicViewWalkthrough","EdgeEditing","FitView","Vscode","ElementTags"],HJ=E1(BWe,e=>[`enable${e}`,!1]),zA=E.createContext(HJ),FWe=e=>{let{enableReadOnly:r,enableEdgeEditing:n,...o}=e;return r&&(n=!1),{enableReadOnly:r,enableEdgeEditing:n,...o}};function fh({children:e,features:r,overrides:n}){const o=E.useContext(zA),[a,i]=E.useState(o);return E.useEffect(()=>{i(s=>{const l=FWe({...o,...r,...n});return Xn(s,l)
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const sXe=[["path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11",key:"svg-0"}]],lXe=yt("outline","bolt","Bolt",sXe),cXe=Uo({position:"absolute",zIndex:1,justifyContent:"center",alignItems:"center",_smallZoom:{display:"none"}}),uXe=Uo({gap:"1.5",justifyContent:"center",alignItems:"center"});function Hk({selected:e=!1,data:{hovered:r=!1},buttons:n}){const o=Ta();return n.length?b.jsx(Vr,{className:cXe,style:{top:"calc(100% - 30px)",transform:"translateX(-50%)",left:"50%",width:"auto",minHeight:30},children:b.jsx(Qr,{layoutRoot:!0,initial:!1,style:{originY:0},animate:{opacity:r||e?1:.75,scale:r?1.1:e?.9:.8,y:r||e?6:0},"data-likec4-hovered":r,className:Je("nodrag nopan",uXe),children:n.map((a,i)=>b.jsx(or,{component:ps,className:Ek({}),initial:!1,whileTap:{scale:1},whileHover:{scale:1.3},onClick:a.onClick,onDoubleClick:cn,children:a.icon||b.jsx(lXe,{})},`${o}-${a.key??i}`))},`${o}-action-buttons`)}):null}/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const dXe=[["path",{d:"M3 6a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M21 11v-3a2 2 0 0 0 -2 -2h-6l3 3m0 -6l-3 3",key:"svg-1"}],["path",{d:"M3 13v3a2 2 0 0 0 2 2h6l-3 -3m0 6l3 -3",key:"svg-2"}],["path",{d:"M15 18a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-3"}]],Ry=yt("outline","transform","Transform",dXe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const hXe=[["path",{d:"M4 21v-4a3 3 0 0 1 3 -3h5",key:"svg-0"}],["path",{d:"M9 17l3 -3l-3 -3",key:"svg-1"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-2"}],["path",{d:"M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5",key:"svg-3"}]],pm=yt("outline","file-symlink","FileSymlink",hXe),fXe=e=>{const{enableNavigateTo:r,enableVscode:n}=wr(),o=Wt(),a=Fk(),i=Sy(),s=Ok(d=>d.context.subject),l=[],{navigateTo:c,fqn:u}=e.data;return c&&r&&a!==c&&l.push({key:"navigate",icon:b.jsx(gi,{}),onClick:d=>{d.stopPropagation(),o.navigateTo(c)}}),u!==s&&l.push({key:"relationships",icon:b.jsx(Ry,{}),onClick:d=>{d.stopPropagation(),i.navigateTo(u,e.id)}}),n&&l.push({key:"goToSource",icon:b.jsx(pm,{}),onClick:d=>{d.stopPropagation(),o.openSource({element:u})}}),b.jsx(Hk,{buttons:l,...e})};function $y({nodeProps:{data:{hovered:e=!1,dimmed:r=!1,...n}},className:o,children:a,style:i,...s}){let l=Ki(n.style.opacity??100,{min:0,max:100});const c=l<99,u=65,d=u+Ki((100-u)*(l/100),{min:0,max:100-u}),h=_qe({isTransparent:c,inverseColor:l<60,borderStyle:n.style.border??(c?"dashed":"none")}),p=Ki(n.depth??1,{min:1,max:5});return b.jsx(Qr,{className:Je(h,o),initial:!1,"data-likec4-hovered":e,"data-likec4-color":n.color,"data-compound-depth":p,...r!==!1&&{"data-likec4-dimmed":r},style:{...i,"--_border-transparency":`${d}%`,"--_compound-transparency":`${l}%`},...s,children:a})}function Py({data:e}){const r=Vx({element:e,className:"likec4-compound-icon"});return b.jsxs("div",{className:"likec4-compound-title-container",children:[r,b.jsx(wt,{component:"h3",className:"likec4-compound-title",truncate:"end",children:e.title})]})}const YJ=J0({base:{transitionDuration:"normal"},variants:{delay:{true:{transitionDelay:{base:"0.2s",_hover:"0s"}}}}});/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const pXe=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M15 8l2 0",key:"svg-2"}],["path",{d:"M15 12l2 0",key:"svg-3"}],["path",{d:"M7 16l10 0",key:"svg-4"}]],BA=yt("outline","id","Id",pXe);function WJ({data:{hovered:e=!1},icon:r,onClick:n}){const o=tC(e,e?130:0)[0]&&e;return b.jsx(Qr,{initial:!1,animate:{scale:o?1.2:1},whileHover:{scale:1.4},whileTap:{scale:1},className:"likec4-compound-details details-button",children:b.jsx(or,{className:Je("nodrag nopan",YJ({delay:e&&!o}),Ek({variant:"transparent"})),onClick:n,onDoubleClick:cn,children:r??b.jsx(BA,{stroke:1.8,style:{width:"75%"}})})})}const mXe=ye({position:"relative",width:"100%",height:"100%",padding:"0",margin:"0",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",_before:{content:'" "',position:"absolute",top:"[calc(100% - 4px)]",left:"0",width:"100%",height:"24px",background:"[transparent]",pointerEvents:"all"},_focusVisible:{outline:"none"},_reduceGraphicsOnPan:{_before:{display:"none"}},":where(.react-flow__node.selectable:not(.dragging)) &":{cursor:"pointer"}}),mm=E.forwardRef(({nodeProps:{selected:e=!1,selectable:r=!1,data:{hovered:n=!1,dimmed:o=!1,...a}},className:i,style:s,children:l,...c},u)=>{let d=1;switch(!0){case n:d=1.05;break;case e:d=1.02;break}const{size:h,padding:p,textSize:g}=ex(a.style??{});return b.jsx(Qr,{ref:u,className:Je(mXe,"group","likec4-element-node",i),initial:!1,...r&&{animate:{scale:d},whileTap:{scale:.98}},"data-likec4-hovered":n,"data-likec4-color":a.color,"data-likec4-shape":a.shape,"data-likec4-shape-size":h,"data-likec4-spacing":p,"data-likec4-text-size":g,...o!==!1&&{"data-likec4-dimmed":o},style:{...s},...c,children:l})});mm.displayName="ElementNodeContainer";function XJ(e,r,n=.065){const o=Math.round(e/2),a=o,i=yi(n*o),s=r-2*i;return{path:` M ${e},${i}
a ${a},${i} 0,0,0 ${-e} 0
l 0,${s}
a ${a},${i} 0,0,0 ${e} 0
l 0,${-s}
z
`.replace(/\s+/g," ").trim(),ry:i,rx:a}}function GJ(e,r,n=.185){const o=r,a=Math.round(o/2),i=yi(o/2*n),s=e-2*i;return{path:`
M ${i},0
a ${i},${a} 0,0,0 0 ${o}
l ${s},0
a ${i},${a} 0,0,0 0 ${-o}
z`.replace(/\s+/g," ").trim(),ry:a,rx:i}}const ph={width:115,height:120,path:"M57.9197 0C10.9124 0 33.5766 54.75 33.5766 54.75C38.6131 62.25 45.3285 60.75 45.3285 66C45.3285 70.5 39.4526 72 33.5766 72.75C24.3431 72.75 15.9489 71.25 7.55474 84.75C2.51825 93 0 120 0 120H115C115 120 112.482 93 108.285 84.75C99.8905 70.5 91.4963 72.75 82.2628 72C76.3869 71.25 70.5109 69.75 70.5109 65.25C70.5109 60.75 77.2263 62.25 82.2628 54C82.2628 54.75 104.927 0 57.9197 0V0Z"};function KJ({shape:e,w:r,h:n}){switch(e){case"mobile":return b.jsxs(b.Fragment,{children:[b.jsx("rect",{width:r,height:n,rx:6,"data-likec4-fill":"mix-stroke",strokeWidth:0}),b.jsxs("g",{"data-likec4-fill":"fill",strokeWidth:0,children:[b.jsx("circle",{cx:17,cy:n/2,r:12}),b.jsx("rect",{x:33,y:12,width:r-44,height:n-24,rx:5})]})]});case"browser":return b.jsxs(b.Fragment,{children:[b.jsx("rect",{width:r,height:n,rx:6,"data-likec4-fill":"mix-stroke",strokeWidth:0}),b.jsxs("g",{"data-likec4-fill":"fill",strokeWidth:0,children:[b.jsx("circle",{cx:16,cy:17,r:7}),b.jsx("circle",{cx:36,cy:17,r:7}),b.jsx("circle",{cx:56,cy:17,r:7}),b.jsx("rect",{x:70,y:8,width:r-80,height:17,rx:4}),b.jsx("rect",{x:10,y:32,width:r-20,height:n-42,rx:4})]})]});case"person":return b.jsxs(b.Fragment,{children:[b.jsx("rect",{width:r,height:n,rx:6,strokeWidth:0}),b.jsx("svg",{x:r-ph.width-6,y:n-ph.height,width:ph.width,height:ph.height,viewBox:`0 0 ${ph.width} ${ph.height}`,"data-likec4-fill":"mix-stroke",children:b.jsx("path",{strokeWidth:0,d:ph.path})})]});case"queue":{const{path:o,rx:a,ry:i}=GJ(r,n);return b.jsxs(b.Fragment,{children:[b.jsx("path",{d:o,strokeWidth:2}),b.jsx("ellipse",{cx:a,cy:i,ry:i-.75,rx:a,"data-likec4-fill":"mix-stroke",strokeWidth:2})]})}case"storage":case"cylinder":{const{path:o,rx:a,ry:i}=XJ(r,n);return b.jsxs(b.Fragment,{children:[b.jsx("path",{d:o,strokeWidth:2}),b.jsx("ellipse",{cx:a,cy:i,ry:i,rx:a-.75,"data-likec4-fill":"mix-stroke",strokeWidth:2})]})}default:return Ga(e)}}function gXe({shape:e,w:r,h:n}){let o;switch(e){case"queue":o=b.jsx("path",{d:GJ(r,n).path});break;case"storage":case"cylinder":{o=b.jsx("path",{d:XJ(r,n).path});break}default:{o=b.jsx("rect",{x:-1,y:-1,width:r+2,height:n+2,rx:6});break}}return b.jsx("g",{className:"likec4-shape-outline",children:o})}function yXe({multiple:e,withOutLine:r}){return b.jsxs("div",{className:lQ({shapetype:"html"}),children:[e&&b.jsx("div",{className:"likec4-shape-multiple"}),r&&b.jsx("div",{className:"likec4-shape-outline"})]})}function gm({data:e,width:r,height:n,showSeletionOutline:o=!0}){let a=r&&r>10?r:e.width,i=n&&n>10?n:e.height;const s=e.style?.multiple??!1;if(e.shape==="rectangle")return b.jsx(yXe,{multiple:s,withOutLine:o});const l=lQ({shapetype:"svg"});return b.jsxs(b.Fragment,{children:[s&&b.jsx("svg",{className:l,"data-likec4-shape-multiple":"true",viewBox:`0 0 ${a} ${i}`,children:b.jsx(KJ,{shape:e.shape,w:a,h:i})}),b.jsxs("svg",{className:l,viewBox:`0 0 ${a} ${i}`,children:[o&&b.jsx(gXe,{shape:e.shape,w:a,h:i}),b.jsx(KJ,{shape:e.shape,w:a,h:i})]})]})}const mh=E.forwardRef(({value:e,textScale:r=1,uselikec4palette:n=!1,hideIfEmpty:o=!1,emptyText:a="no content",className:i,style:s,fontSize:l,...c},u)=>{if(e.isEmpty&&o)return null;const d=e.nonEmpty?e.isMarkdown?{dangerouslySetInnerHTML:{__html:e.html}}:{children:b.jsx("p",{children:e.text})}:{children:b.jsx(wt,{component:"span",fz:"xs",c:"dimmed",style:{userSelect:"none"},children:a})};return b.jsx(Vr,{ref:u,...c,className:Je(Tqe({uselikec4palette:n,value:e.isMarkdown?"markdown":"plaintext"}),i),style:{...s,...l&&{"--text-fz":`var(--font-sizes-${l}, var(--font-sizes-md))`},"--mantine-scale":r},...d})});mh.displayName="Markdown";const ZJ=E.forwardRef(({className:e,...r},n)=>b.jsx("div",{...r,ref:n,className:Je(e,Sqe(),"likec4-element")})),QJ=({data:e,...r})=>b.jsx(Vx,{element:e,...r}),JJ=E.forwardRef(({className:e,...r},n)=>b.jsx("div",{...r,className:Je(e,"likec4-element-node-content"),ref:n})),eee=E.forwardRef(({data:{title:e,style:r},className:n,...o},a)=>{const{size:i}=ex(r),s=i==="sm"||i==="xs";return b.jsx(wt,{component:"div",...o,className:Je(n,"likec
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const EXe=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],nee=yt("outline","chevron-left","ChevronLeft",EXe),SXe={element:xXe,compound:wXe,empty:aXe},CXe={relationship:nXe};function oee({actorRef:e}){const r=E.useRef(null);return r.current==null&&(r.current={initialNodes:[],initialEdges:[]}),b.jsx(DQ.Provider,{value:e,children:b.jsx(Mw,{...r.current,children:b.jsx(dm,{id:e.sessionId,inherit:!1,children:b.jsx(Pa,{children:b.jsx(NXe,{})})})})})}const TXe=e=>({isActive:e.hasTag("active"),nodes:e.context.xynodes,edges:e.context.xyedges}),AXe=(e,r)=>e.isActive===r.isActive&&Xn(e.nodes,r.nodes)&&Xn(e.edges,r.edges),NXe=E.memo(()=>{const e=Sy(),{isActive:r,nodes:n,edges:o}=Ok(TXe,AXe);return b.jsx(U9,{id:e.rootElementId,nodes:n,edges:o,className:Je(r?"initialized":"not-initialized","relationships-browser"),nodeTypes:SXe,edgeTypes:CXe,fitView:!1,onNodeClick:it((a,i)=>{a.stopPropagation(),e.send({type:"xyflow.nodeClick",node:i})}),onEdgeClick:it((a,i)=>{a.stopPropagation(),e.send({type:"xyflow.edgeClick",edge:i})}),onPaneClick:it(a=>{a.stopPropagation(),e.send({type:"xyflow.paneClick"})}),onDoubleClick:it(a=>{e.send({type:"xyflow.paneDblClick"})}),onViewportResize:it(()=>{e.send({type:"xyflow.resized"})}),onNodesChange:it(a=>{e.send({type:"xyflow.applyNodeChanges",changes:a})}),onEdgesChange:it(a=>{e.send({type:"xyflow.applyEdgeChanges",changes:a})}),onEdgeMouseEnter:it((a,i)=>{i.data.hovered||e.send({type:"xyflow.edgeMouseEnter",edge:i})}),onEdgeMouseLeave:it((a,i)=>{i.data.hovered&&e.send({type:"xyflow.edgeMouseLeave",edge:i})}),onSelectionChange:it(a=>{e.send({type:"xyflow.selectionChange",...a})}),nodesDraggable:!1,pannable:!0,zoomable:!0,children:b.jsx($Xe,{})})}),RXe=e=>({subjectId:e.context.subject,viewId:e.context.viewId,scope:e.context.scope,closeable:e.context.closeable}),$Xe=E.memo(()=>{const e=Sy(),{subjectId:r,viewId:n,scope:o,closeable:a}=Ok(RXe),i=pr(),s=up();E.useEffect(()=>{s.viewportInitialized&&e.send({type:"xyflow.init",instance:s,store:i})},[i,s.viewportInitialized,e]);const l=NWe(r,n,o),[c,u,{history:d,current:h}]=YV(r);E.useEffect(()=>{c!==r&&u.set(r)},[r]),E.useEffect(()=>{c!==r&&e.navigateTo(c)},[c,e]),HB(()=>{e.updateView(l)},[l,e]);const p=h>0,g=h+1<d.length;return b.jsxs(b.Fragment,{children:[b.jsx(PXe,{hasStepBack:p,hasStepForward:g,onStepBack:()=>u.back(),onStepForward:()=>u.forward()}),a&&b.jsx(ou,{position:"top-right",children:b.jsx(or,{variant:"default",color:"gray",onClick:y=>{y.stopPropagation(),e.close()},children:b.jsx(Hp,{})})})]})}),PXe=({hasStepBack:e,hasStepForward:r,onStepBack:n,onStepForward:o})=>b.jsx(ou,{position:"top-left",children:b.jsxs(Ur,{gap:4,wrap:"nowrap",children:[b.jsxs(Pa,{mode:"popLayout",children:[e&&b.jsx(cs.div,{layout:!0,initial:{opacity:.05,transform:"translateX(-5px)"},animate:{opacity:1,transform:"translateX(0)"},exit:{opacity:.05,transform:"translateX(-10px)"},children:b.jsx(or,{variant:"default",color:"gray",onClick:a=>{a.stopPropagation(),n()},children:b.jsx(nee,{})})},"back"),r&&b.jsx(cs.div,{layout:!0,initial:{opacity:.05,transform:"translateX(5px)"},animate:{opacity:1,transform:"translateX(0)"},exit:{opacity:0,transform:"translateX(5px)"},children:b.jsx(or,{variant:"default",color:"gray",onClick:a=>{a.stopPropagation(),o()},children:b.jsx(hh,{})})},"forward")]}),b.jsx(zWe,{})]})}),MXe=ye({display:"inline-block",fontSize:"sm",fontWeight:500,whiteSpace:"nowrap",padding:"[3px 6px]",borderRadius:3,background:"var(--likec4-palette-fill)/75",lineHeight:1.2,color:"var(--likec4-palette-hiContrast)"}),OXe=ye({_light:{background:"mantine.colors.gray[1]","&[data-missing":{}},"&[data-missing]":{color:"mantine.colors.orange[4]",background:"mantine.colors.orange[8]/15",borderColor:"mantine.colors.orange[5]/20",_light:{color:"mantine.colors.orange[8]"}}}),DXe=ye({flex:"1 1 100%",position:"relative",width:"100%",height:"100%",background:"mantine.colors.body",border:"1px solid {colors.mantine.colors.defaultBorder}",borderRadius:"sm",_light:{borderColor:"mantine.colors.gray[3]",background:"mantine.colors.gray[1]"}});ye({_before:{content:'"scope:"',position:"absolute",top:"0",lef
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const LXe=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]],ym=yt("outline","arrow-right","ArrowRight",LXe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const IXe=[["path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6",key:"svg-0"}],["path",{d:"M11 13l9 -9",key:"svg-1"}],["path",{d:"M15 4h5v5",key:"svg-2"}]],aee=yt("outline","external-link","ExternalLink",IXe),zXe=po.withProps({color:"dark",fz:"xs",openDelay:600,closeDelay:120,label:"",children:null,offset:8,withinPortal:!1});function jXe({node:e,element:r}){const n=VX(),o=kqe(),a=wn(o,d=>d.children[`${o.id}-relationships`]),i=[...r.incoming()].map(d=>d.id),s=[...r.outgoing()].map(d=>d.id),l=e?Y6([...e.incoming()].flatMap(d=>d.$edge.relations)):[],c=e?Y6([...e.outgoing()].flatMap(d=>d.$edge.relations)):[],u=[...i,...s].filter(d=>!l.includes(d)&&!c.includes(d)).length;return b.jsxs(ra,{gap:"xs",pos:"relative",w:"100%",h:"100%",children:[i.length+s.length>0&&b.jsxs(Ur,{gap:"xs",wrap:"nowrap",align:"center",children:[b.jsx(Se,{children:b.jsxs(Ur,{gap:8,mb:4,wrap:"nowrap",children:[b.jsx(iee,{title:"incoming",total:i.length,included:l.length}),b.jsx(ci,{size:"sm",variant:"transparent",c:"dimmed",children:b.jsx(ym,{style:{width:16}})}),b.jsx(wt,{className:MXe,children:g0(r.id)}),b.jsx(ci,{size:"sm",variant:"transparent",c:"dimmed",children:b.jsx(ym,{style:{width:16}})}),b.jsx(iee,{title:"outgoing",total:s.length,included:c.length})]})}),u>0&&b.jsx(zXe,{label:"Current view does not include some relationships",children:b.jsxs(Ur,{mt:"xs",gap:6,c:"orange",style:{cursor:"pointer"},children:[b.jsx(F9,{style:{width:14}}),b.jsxs(wt,{fz:"sm",children:[u," relationship",u>1?"s are":" is"," hidden"]})]})})]}),b.jsx(Se,{className:DXe,children:a&&b.jsxs(b.Fragment,{children:[b.jsx(oee,{actorRef:a}),b.jsx(Se,{pos:"absolute",top:12,right:12,children:b.jsx(or,{size:"md",variant:"default",radius:"sm",onClick:d=>{d.stopPropagation();const{subject:h,scope:p,viewId:g}=a.getSnapshot().context;n.send({type:"open.relationshipsBrowser",subject:h,scope:p,viewId:g})},children:b.jsx(aee,{stroke:1.6,style:{width:"70%"}})})})]})})]})}function iee({title:e,total:r,included:n}){return b.jsx(Rp,{withBorder:!0,shadow:"none",className:OXe,px:"md",py:"xs",radius:"md",mod:{zero:r===0,missing:r!==n},children:b.jsxs(ra,{gap:4,align:"flex-end",children:[b.jsx(wt,{component:"div",c:r!==n?"orange":"dimmed",tt:"uppercase",fw:600,fz:10,lh:1,children:e}),b.jsx(wt,{fw:600,fz:"xl",component:"div",lh:1,children:r!==n?b.jsxs(b.Fragment,{children:[n," / ",r]}):b.jsx(b.Fragment,{children:r})})]})})}const BXe=ye({marginTop:"sm",marginBottom:"sm"}),FXe=ye({display:"inline-flex",transition:"fast",border:"1px dashed",borderColor:"mantine.colors.defaultBorder",borderRadius:"sm",px:"md",py:"xs",alignItems:"center",cursor:"pointer",color:"mantine.colors.gray[7]",_dark:{color:"mantine.colors.dark[1]"},"& > *":{transition:"fast"},_hover:{transitionTimingFunction:"out",borderStyle:"solid",color:"mantine.colors.defaultColor",background:"mantine.colors.defaultHover","& > *":{transitionTimingFunction:"out",transform:"translateX(1px)"}}}),HA=({element:e})=>b.jsx(Se,{className:FXe,children:b.jsx(wt,{component:"div",fz:"sm",fw:"500",children:e.title})}),HXe=()=>{};function UXe({element:e}){const r=Y1({multiple:!1});r.setHoveredNode=HXe;const n=E.useMemo(()=>{let o=1;const a=s=>({label:s,value:`msg${o++}`,type:"message",children:[]}),i={label:b.jsx(HA,{type:"current",element:e}),value:e.id,element:e,type:"current",children:[...e.children()].map(s=>({label:b.jsx(HA,{type:"descedant",element:s}),value:s.id,element:s,type:"descedant",children:[]}))};return i.children.length===0&&i.children.push(a(b.jsx(U3,{radius:"sm",children:"no nested"}))),[[...e.ancestors()].reduce((s,l)=>({label:b.jsx(HA,{type:"ancestor",element:l}),value:l.id,element:l,type:"ancestor",children:[s]}),i)]},[e]);return E.useEffect(()=>{r.expandAllNodes()},[n]),b.jsxs(b.Fragment,{children:[b.jsxs(M3,{variant:"light",color:"orange",title:"In development",icon:b.jsx(F9,{}),children:["We need your feedback. Share your thoughts and ideas -"," ",b.jsx(rT,{fz:"sm",fw:500,underline:"hover",c:"orange",href:"https://github.com/likec4/likec4/discussions/",target:"_blank",children:"GitHub discussions"})]}),b.jsx
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const VXe=[["path",{d:"M12 4l-8 4l8 4l8 -4l-8 -4",key:"svg-0"}],["path",{d:"M4 12l8 4l8 -4",key:"svg-1"}],["path",{d:"M4 16l8 4l8 -4",key:"svg-2"}]],UA=yt("outline","stack-2","Stack2",VXe),see=Lp.withProps({mb:8,labelPosition:"left",variant:"dashed"}),lee=po.withProps({color:"dark",fz:"xs",openDelay:400,closeDelay:150,label:"",children:null,offset:4}),cee=wt.withProps({component:"div",fz:11,fw:500,c:"dimmed",lh:1}),My=wt.withProps({component:"div",fz:"xs",c:"dimmed",className:vYe}),bm=24,qXe=["Properties","Relationships","Views","Structure","Deployments"];function YXe({viewId:e,fromNode:r,rectFromNode:n,fqn:o,onClose:a}){const[i,s]=E.useState(!1),l=_Pe(),c=l.width||window.innerWidth||1200,u=l.height||window.innerHeight||800,[d,h]=bPe({key:"likec4:element-details:active-tab",defaultValue:"Properties"}),p=Wt(),g=NQ(),y=r?g.findNode(r):g.findNodeWithElement(o),x=g.$model.element(o),[w,k]=yn([...x.views()],Ao(Q=>Q.$view),sV(Q=>Q._type==="element"&&Q.viewOf===o));let C=y?.navigateTo?.$view??x.defaultView?.$view??null;C?.id===e&&(C=null);const _=zw(x.links),T=wqe(),A=(y?.$node.children?.length??0)>0,N=Math.min(700,c-bm*2),$=Math.min(650,u-bm*2),R=n?{x:n.x+(A?n.width-N/2:n.width/2),y:n.y+(A?0:n.height/2)}:{x:c/2,y:u/2},M=n?Math.min(n.width/N,n.height/$,.9):1,O=Math.round(Ki(R.x-N/2,{min:bm,max:c-N-bm})),B=Math.round(Ki(R.y-(A?0:60),{min:bm,max:u-$-bm})),I=Ki((R.x-O)/N,{min:.1,max:.9}),Y=Ki((R.y-B)/$,{min:.1,max:.9}),D=KZ(N),V=KZ($);$k(()=>{D.set(N),V.set($)},[N,$]);const L=E.useCallback((Q,z)=>{D.set(Math.max(D.get()+z.delta.x,320)),V.set(Math.max(V.get()+z.delta.y,300))},[]),U=E.useRef(null),q=Kf(a),X=qx(()=>{q.current()},[],50),F=y?.$node.notation??null,J=Vx({element:{id:o,title:x.title,icon:y?.icon??x.icon},className:dYe});return Wx(()=>{U.current?.open||U.current?.showModal()},20),Wx(()=>{s(!0)},220),b.jsx(cs.dialog,{ref:U,className:Je(sYe,S1.classNames.fullWidth),layout:!0,initial:{[Tk]:"0px",[Ak]:"5%"},animate:{[Tk]:"3px",[Ak]:"60%"},exit:{[Tk]:"0px",[Ak]:"0%",transition:{duration:.1}},onClick:Q=>{Q.stopPropagation(),Q.target?.nodeName?.toUpperCase()==="DIALOG"&&U.current?.close()},onDoubleClick:cn,onPointerDown:cn,onClose:Q=>{Q.stopPropagation(),X()},children:b.jsx(S1,{forwardProps:!0,removeScrollBar:!1,children:b.jsxs(cs.div,{layout:!0,layoutRoot:!0,drag:!0,dragControls:T,dragElastic:0,dragMomentum:!1,dragListener:!1,"data-likec4-color":y?.color??x.color,className:lYe,initial:{top:B,left:O,width:N,height:$,opacity:0,originX:I,originY:Y,scale:Math.max(M,.65)},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9,translateY:-10,transition:{duration:.1}},style:{width:D,height:V},children:[b.jsxs("div",{className:cYe,onPointerDown:Q=>T.start(Q),children:[b.jsxs(xn,{alignItems:"start",justify:"space-between",gap:"sm",mb:"sm",flexWrap:"nowrap",children:[b.jsxs(xn,{alignItems:"start",gap:"sm",style:{cursor:"default"},flexWrap:"nowrap",children:[J,b.jsxs("div",{children:[b.jsx(wt,{component:"div",className:uYe,children:x.title}),F&&b.jsx(wt,{component:"div",c:"dimmed",fz:"sm",fw:500,lh:1.3,lineClamp:1,children:F})]})]}),b.jsx(Kd,{size:"lg",onClick:Q=>{Q.stopPropagation(),X()}})]}),b.jsxs(xn,{alignItems:"baseline",gap:"sm",flexWrap:"nowrap",children:[b.jsxs("div",{children:[b.jsx(cee,{children:"kind"}),b.jsx(Gl,{radius:"sm",size:"sm",fw:600,color:"gray",style:{cursor:"pointer"},onClick:Q=>{Q.stopPropagation(),p.openSearch(`kind:${x.kind}`)},children:x.kind})]}),b.jsxs("div",{style:{flex:1},children:[b.jsx(cee,{children:"tags"}),b.jsxs(Op,{gap:4,flex:1,mt:6,wrap:"wrap",children:[x.tags.map(Q=>b.jsx(Ck,{tag:Q,cursor:"pointer",onClick:z=>{z.stopPropagation(),p.openSearch(`#${Q}`)}},Q)),x.tags.length===0&&b.jsx(Gl,{radius:"sm",size:"sm",fw:600,color:"gray",children:""})]})]}),b.jsxs(T3,{style:{alignSelf:"flex-start"},children:[_&&b.jsx(or,{component:"a",href:_.url,target:"_blank",size:"lg",variant:"default",radius:"sm",children:b.jsx(aee,{stroke:1.6,style:{width:"65%"}})}),b.jsx(HWe,{feature:"Vscode",children:b.jsx(lee,{label:"Open source",children:b.jsx(or,{size:"lg",variant:"default",radius:"sm",onClick:Q=>{Q.stopPropagation
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const sKe=[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],QA=yt("outline","search","Search",sKe);function Cee(e){return e.match(/^(k|ki|kin|kind|kind:)$/)!=null}const lKe=["#","kind:"],cKe=E.memo(()=>{const e=Su(),r=Ho(),n=E.useRef(null),{ref:o,focused:a}=$Pe(),[i,s]=RGe(),l=tW({scrollBehavior:"smooth",loop:!1});xp("keydown",d=>{try{!a&&(d.key==="Backspace"||d.key.startsWith("Arrow")||d.key.match(new RegExp("^\\p{L}$","u")))&&Dy(n.current)}catch(h){console.warn(h)}});let c=[],u=!1;switch(!0){case i.startsWith("#"):{const d=i.toLocaleLowerCase().slice(1),h=r.tags.filter(p=>p.toLocaleLowerCase().includes(d));h.length===0?(u=!1,c=[b.jsx(I1,{children:"No tags found"},"empty-tags")]):(u=r.tags.some(p=>p.toLocaleLowerCase()===d),c=h.map(p=>b.jsxs(z1,{value:`#${p}`,children:[b.jsx(wt,{component:"span",opacity:.5,mr:1,fz:"sm",children:"#"}),p]},p)));break}case i.startsWith("kind:"):case Cee(i):{const d=i.length>5?i.slice(5).toLocaleLowerCase():"";let h=q6(r.specification.elements);d&&(h=h.filter(p=>p.toLocaleLowerCase().includes(d))),h.length===0?(u=!1,c=[b.jsx(I1,{children:"No kinds found"},"empty-kinds")]):(u=h.some(p=>p.toLocaleLowerCase()===d),c=h.map(p=>b.jsxs(z1,{value:`kind:${p}`,children:[b.jsx(wt,{component:"span",opacity:.5,mr:1,fz:"sm",children:"kind:"}),p]},p)));break}}return b.jsxs(Kn,{onOptionSubmit:d=>{s(d),l.resetSelectedOption(),lKe.includes(d)||(l.closeDropdown(),setTimeout(()=>{Gk(n.current)},350))},width:"max-content",position:"bottom-start",shadow:"md",offset:{mainAxis:4,crossAxis:50},store:l,withinPortal:!1,children:[b.jsx(cT,{children:b.jsx(Ra,{ref:Rr(n,o),placeholder:"Search by title, description or start with # or kind:",autoFocus:!0,"data-autofocus":!0,"data-likec4-search-input":!0,tabIndex:0,classNames:{input:rKe},size:"lg",value:i,leftSection:b.jsx(QA,{style:{width:Ne(20)},stroke:2}),rightSection:b.jsx(Ra.ClearButton,{onClick:d=>{d.stopPropagation();const h=e.getSnapshot().context.openedWithSearch;i===""||i===h?e.send({type:"close"}):s("")}}),rightSectionPointerEvents:"auto",onChange:d=>{s(d.currentTarget.value),l.openDropdown(),l.updateSelectedOptionIndex()},onClick:()=>l.openDropdown(),onFocus:()=>l.openDropdown(),onBlur:()=>l.closeDropdown(),onKeyDownCapture:d=>{if(d.key==="Tab"){switch(!0){case l.getSelectedOptionIndex()>=0:return l.clickSelectedOption(),bi(d);case c.length===1:return l.selectFirstOption()&&l.clickSelectedOption(),bi(d);case Cee(i):return s("kind:"),bi(d)}return}if(d.key==="Backspace"&&l.dropdownOpened){if(i==="kind:")return s(""),l.resetSelectedOption(),bi(d);if(i.startsWith("kind:")&&u)return s("kind:"),l.resetSelectedOption(),bi(d);if(i.startsWith("#")&&u)return s("#"),l.resetSelectedOption(),bi(d)}if(d.key==="Escape"&&l.dropdownOpened&&c.length>0){bi(d),l.closeDropdown();return}if(d.key==="ArrowUp"&&l.dropdownOpened&&i===""&&l.getSelectedOptionIndex()===0){l.closeDropdown(),bi(d);return}if(d.key==="ArrowDown"&&(!l.dropdownOpened||c.length===0||u||i===""&&l.getSelectedOptionIndex()===c.length-1)){l.closeDropdown(),bi(d),Gk(n.current);return}}})}),b.jsx(O3,{hidden:c.length===0,style:{minWidth:300},children:b.jsx(D3,{children:b.jsx(ta,{mah:"min(322px, calc(100cqh - 50px))",type:"scroll",children:c})})})]})}),uKe=ye({backgroundColor:"[rgb(34 34 34 / var(--_opacity, 95%))]",_light:{backgroundColor:"[rgb(250 250 250 / var(--_opacity, 95%))]"},backdropFilter:"auto",backdropBlur:"var(--_blur, 10px)"}),dKe=ye({width:"100%",height:"100%",maxHeight:"100vh",overflow:"hidden",display:"flex",flexDirection:"column",justifyContent:"stretch",gap:"sm",paddingTop:"[20px]",paddingLeft:"md",paddingRight:"md",paddingBottom:"sm",background:"[transparent]"}),hKe=e=>!e.matches("inactive");function fKe({searchActorRef:e}){const r=wn(e,hKe),n=()=>{e.send({type:"open"})},o=it(()=>{e.send({type:"close"})});return APe([["mod+k",n,{preventDefault:!0}],["mod+f",n,{preventDefault:!0}]]),b.jsx(AGe,{value:e,children:b.jsx(fh.Overlays,{children:b.jsx(jT,{FallbackComponent:BT,onReset:o,children:b.jsx(Pa,{children:r&&b.jsx(Oy,{fullscreen:!0,withBa
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const PKe=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],MKe=yt("outline","arrow-left","ArrowLeft",PKe),OKe=()=>{const e=Wt(),{hasStepBack:r,hasStepForward:n}=$a(o=>({hasStepBack:o.navigationHistory.currentIndex>0,hasStepForward:o.navigationHistory.currentIndex<o.navigationHistory.history.length-1}));return b.jsxs(Qr,{layout:"position",className:Uo({gap:"0.5"}),children:[b.jsx(gh,{disabled:!r,onClick:o=>{o.stopPropagation(),e.navigate("back")},children:b.jsx(MKe,{size:14})}),b.jsx(gh,{disabled:!n,onClick:o=>{o.stopPropagation(),e.navigate("forward")},children:b.jsx(ym,{size:14})})]})};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const DKe=[["path",{d:"M9 15l6 -6",key:"svg-0"}],["path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464",key:"svg-1"}],["path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463",key:"svg-2"}]],LKe=yt("outline","link","Link",DKe),IKe=({context:e})=>{const r=e.viewModel;return{id:r.id,title:r.titleOrUntitled,description:r.description,tags:r.tags,links:r.links}},zKe=e=>{const[r,n]=E.useState(!1),o=Pee(IKe),a=wm();return b.jsxs(mr,{position:"bottom-end",shadow:"xl",clickOutsideEvents:["pointerdown","mousedown","click"],offset:{mainAxis:4},opened:r,onChange:n,...a,...e,children:[b.jsx(jKe,{linksCount:o.links.length,onOpen:()=>n(!0)}),r&&b.jsx(BKe,{data:o,onClose:()=>n(!1)})]})},jKe=({linksCount:e,onOpen:r})=>b.jsx(mr.Target,{children:b.jsxs(Pr,{component:ps,layout:"position",whileTap:{scale:.95,translateY:1},onClick:n=>{n.stopPropagation(),r()},className:Je("group",Uo({gap:"2",paddingInline:"2",paddingBlock:"1",rounded:"sm",userSelect:"none",cursor:"pointer",color:{base:"likec4.panel.action-icon.text",_hover:"likec4.panel.action-icon.text.hover"},backgroundColor:{_hover:"likec4.panel.action-icon.bg.hover"},display:{base:"none","@/xs":"flex"}}),""),children:[b.jsx(BA,{size:16,stroke:1.8}),e>0&&b.jsxs(xn,{gap:"[1px]",children:[b.jsx(LKe,{size:14,stroke:2}),b.jsx(Vr,{css:{fontSize:"11px",fontWeight:600,lineHeight:1,opacity:.8},children:e})]})]})}),Dee=Ql("div",{base:{fontSize:"xs",color:"mantine.colors.dimmed",fontWeight:500,userSelect:"none",mb:"xxs"}}),BKe=({data:{id:e,title:r,description:n,tags:o,links:a},onClose:i})=>{const s=Wt();return is("paneClick",i),is("nodeClick",i),b.jsxs(mr.Dropdown,{className:Je("nowheel nopan nodrag",X1({margin:"xs",layerStyle:"likec4.dropdown",gap:"md",padding:"md",paddingBottom:"lg",pointerEvents:"all",maxWidth:"calc(100cqw - 52px)",minWidth:"200px",maxHeight:"calc(100cqh - 100px)",width:"max-content",cursor:"default",overflow:"auto",overscrollBehavior:"contain","@/sm":{minWidth:400,maxWidth:550},"@/lg":{maxWidth:700}})),children:[b.jsxs("section",{children:[b.jsx(wt,{component:"div",fw:500,size:"xl",lh:"sm",children:r}),b.jsxs(xn,{alignItems:"flex-start",mt:"1",children:[b.jsx(FKe,{label:"id",value:e}),b.jsx(xn,{gap:"xs",flexWrap:"wrap",children:o.map(l=>b.jsx(Ck,{tag:l,cursor:"pointer",onClick:c=>{c.stopPropagation(),s.openSearch(`#${l}`)}},l))})]})]}),a.length>0&&b.jsxs("section",{className:Uo({alignItems:"baseline"}),children:[b.jsx(Dee,{children:"Links"}),b.jsx(xn,{gap:"xs",flexWrap:"wrap",children:a.map((l,c)=>b.jsx(j9,{value:l},`${c}-${l.url}`))})]}),n.isEmpty&&b.jsx(wt,{component:"div",fw:500,size:"xs",c:"dimmed",style:{userSelect:"none"},children:"No description"}),n.nonEmpty&&b.jsxs("section",{children:[b.jsx(Dee,{children:"Description"}),b.jsx(mh,{value:n,fontSize:"sm",emptyText:"No description",className:ye({userSelect:"all"})})]})]})},FKe=({label:e,value:r})=>b.jsxs(xn,{gap:"0.5",children:[b.jsx(HKe,{children:e}),b.jsx(Gl,{size:"sm",radius:"sm",variant:"light",color:"gray",tt:"none",fw:500,classNames:{root:ye({width:"max-content",overflow:"visible",px:"1",color:{_dark:"mantine.colors.gray[4]",_light:"mantine.colors.gray[8]"}}),label:ye({overflow:"visible"}),section:ye({opacity:.5,userSelect:"none",marginInlineEnd:"0.5"})},children:r})]}),HKe=Ql("div",{base:{color:"mantine.colors.dimmed",fontWeight:500,fontSize:"xxs",userSelect:"none"}}),UKe=()=>{const e=Fk(),{enableVscode:r}=wr(),{onOpenSource:n}=sc();return r?b.jsx(Mee,{label:"Open View Source",children:b.jsx(gh,{onClick:o=>{o.stopPropagation(),n?.({view:e})},children:b.jsx(pm,{style:{width:"60%",height:"60%"}})})}):null};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const VKe=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],qKe=yt("outline","lock","Lock",VKe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const YKe=[["path",{d:"M3 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M13 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],WKe=yt("outline","lock-open-2","LockOpen2",YKe),XKe=e=>({visible:e.features.enableReadOnly!==!0,isReadOnly:e.toggledFeatures.enableReadOnly??e.features.enableReadOnly}),GKe=()=>{const{visible:e,isReadOnly:r}=$a(XKe),n=Wt();return e?b.jsxs(Pr,{component:ps,layout:"position",onClick:o=>{o.stopPropagation(),n.toggleFeature("ReadOnly")},whileTap:{translateY:1},className:Je("group",Uo({gap:"0.5",paddingInline:"xxs",paddingBlock:"xxs",rounded:"sm",userSelect:"none",cursor:"pointer",color:{base:"likec4.panel.action-icon.text",_hover:"likec4.panel.action-icon.text.hover"},backgroundColor:{_hover:"likec4.panel.action-icon.bg.hover"}})),children:[r?b.jsx(qKe,{size:14,stroke:2}):b.jsx(WKe,{size:14,stroke:2}),r&&b.jsx(Qr,{className:ye({fontSize:"11px",fontWeight:600,lineHeight:1,opacity:.8}),children:"Unlock"})]}):null};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const KKe=[["path",{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z",key:"svg-0"}]],ZKe=yt("filled","player-play-filled","PlayerPlayFilled",KKe),Lee=E.forwardRef((e,r)=>b.jsx(Zn,{variant:"filled",size:"xs",fw:"500",...e,ref:r,component:ps,layoutId:"trigger-dynamic-walkthrough",className:ye({flexShrink:0})}));function QKe(){const e=Wt(),r=Ly();return b.jsx(Mee,{label:"Start Dynamic View Walkthrough",children:b.jsx(Lee,{onClick:n=>{n.stopPropagation(),r.closeDropdown(),e.startWalkthrough()},size:"compact-xs",h:26,classNames:{label:ye({display:{base:"none","@/md":"[inherit]"}}),section:ye({marginInlineStart:{base:"0","@/md":"2"}})},rightSection:b.jsx(ZKe,{size:10}),children:"Start"})})}function JKe({value:e,onChange:r}){return b.jsx(Qr,{layout:"position",children:b.jsx(U1,{size:"xs",value:e,component:Qr,onChange:n=>{nt(n==="diagram"||n==="sequence","Invalid dynamic view variant"),r(n)},classNames:{label:ye({fontSize:"xxs"})},data:[{value:"diagram",label:"Diagram"},{value:"sequence",label:"Sequence"}]})})}function eZe(){const e=$a(n=>n.dynamicViewVariant),r=Wt();return b.jsxs(b.Fragment,{children:[b.jsx(JKe,{value:e,onChange:n=>{r.switchDynamicViewVariant(n)}},"dynamic-view-mode-switcher"),b.jsx(QKe,{},"trigger-dynamic-walkthrough")]})}function tZe(){const e=Wt(),r=ap();return b.jsxs(Pr,{component:ps,layout:"position",onClick:n=>{n.stopPropagation(),e.openSearch()},whileTap:{scale:.95,translateY:1},className:Je("group",Uo({gap:"xxs",paddingInline:"sm",paddingBlock:"xxs",rounded:"sm",userSelect:"none",cursor:"pointer",color:{base:"likec4.panel.action-icon.text",_hover:"likec4.panel.action-icon.text.hover"},backgroundColor:{base:"likec4.panel.action-icon.bg",_hover:"likec4.panel.action-icon.bg.hover"},display:{base:"none","@/md":"flex"}})),children:[b.jsx(QA,{size:14,stroke:2.5}),b.jsx(Vr,{css:{fontSize:"11px",fontWeight:600,lineHeight:1,opacity:.8,whiteSpace:"nowrap"},children:r?" + K":"Ctrl + K"})]})}const rZe=({context:e})=>{const r=e.viewModel.folder;return{folders:r.isRoot?[]:r.breadcrumbs.map(n=>({folderPath:n.path,title:n.title})),viewId:e.viewModel.id,viewTitle:e.viewModel.titleOrUntitled,isDynamicView:e.viewModel.isDynamicView()}},nZe=()=>{const e=Ly(),{enableSearch:r,enableNavigationButtons:n,enableDynamicViewWalkthrough:o}=wr(),{folders:a,viewTitle:i,isDynamicView:s}=wn(e.actorRef,rZe,ut),l=a.flatMap(({folderPath:u,title:d},h)=>[b.jsx(Pr,{component:ps,className:Je(Qk({dimmed:!0,truncate:!0}),"mantine-active",ye({userSelect:"none",maxWidth:"200px",display:{base:"none","@/md":"block"}})),title:d,onMouseEnter:()=>e.send({type:"breadcrumbs.mouseEnter.folder",folderPath:u}),onMouseLeave:()=>e.send({type:"breadcrumbs.mouseLeave.folder",folderPath:u}),onClick:p=>{p.stopPropagation(),e.send({type:"breadcrumbs.click.folder",folderPath:u})},children:d},u),b.jsx(Oee,{},`separator-${h}`)]),c=b.jsx(Pr,{component:ps,className:Je("mantine-active",Qk({truncate:!0}),ye({userSelect:"none"})),title:i,onMouseEnter:()=>e.send({type:"breadcrumbs.mouseEnter.viewtitle"}),onMouseLeave:()=>e.send({type:"breadcrumbs.mouseLeave.viewtitle"}),onClick:u=>{u.stopPropagation(),e.send({type:"breadcrumbs.click.viewtitle"})},children:i},"view-title");return b.jsxs(Pa,{propagate:!0,children:[b.jsx($Ke,{},"burger-button"),n&&b.jsx(OKe,{},"nav-buttons"),b.jsxs(Qr,{layout:"position",className:Uo({gap:"1",flexShrink:1,flexGrow:1,overflow:"hidden"}),children:[l,c]},"breadcrumbs"),b.jsxs(Qr,{layout:"position",className:Uo({gap:"0.5",flexGrow:0,_empty:{display:"none"}}),children:[b.jsx(zKe,{onOpen:()=>e.closeDropdown()}),b.jsx(UKe,{}),b.jsx(GKe,{})]},"actions"),o&&s&&b.jsx(eZe,{},"dynamic-view-controls"),r&&b.jsx(tZe,{},"search-control")]})},n7=E.forwardRef(({className:e,truncateLabel:r=!0,...n},o)=>b.jsx(ST,{...n,component:"button",classNames:Fqe({truncateLabel:r}),className:Je("group","mantine-active",e),ref:o}));n7.displayName="NavigationLink";const oZe=E.createContext(null),aZe=[],iZe=()=>{},sZe={projects:aZe,onProjectChange:iZe};function lZe(){return E.useContext(oZe)??sZe}function cZe(){const e=E.useContext(
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const uZe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],dZe=yt("outline","chevron-down","ChevronDown",uZe);function hZe(e){const{projects:r,onProjectChange:n}=lZe(),o=cZe();return r.length<=1?null:b.jsxs(xn,{gap:"0.5",alignItems:"baseline",children:[b.jsx(Vr,{css:{fontWeight:"400",fontSize:"xxs",color:"mantine.colors.dimmed",userSelect:"none"},children:"Project"}),b.jsxs(fo,{withinPortal:!1,shadow:"md",position:"bottom-start",offset:{mainAxis:2},children:[b.jsx(F3,{children:b.jsx(Zn,{tabIndex:-1,autoFocus:!1,variant:"subtle",size:"compact-xs",color:"gray",classNames:{root:ye({fontWeight:"400",fontSize:"xxs",height:"auto",lineHeight:1.1,color:{_light:"mantine.colors.gray[9]"}}),section:ye({'&:is([data-position="right"])':{marginInlineStart:"1"}})},rightSection:b.jsx(dZe,{opacity:.5,size:12,stroke:1.5}),...e,children:o})}),b.jsx(F1,{children:r.map(({id:a,title:i})=>b.jsx(H1,{onClick:s=>{if(o===a){s.stopPropagation();return}n(a)},children:i??a},a))})]})]})}/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const fZe=[["path",{d:"M10.52 2.614a2.095 2.095 0 0 1 2.835 -.117l.126 .117l7.905 7.905c.777 .777 .816 2.013 .117 2.836l-.117 .126l-7.905 7.905a2.094 2.094 0 0 1 -2.836 .117l-.126 -.117l-7.907 -7.906a2.096 2.096 0 0 1 -.115 -2.835l.117 -.126l7.905 -7.905zm5.969 9.535l.01 -.116l-.003 -.12l-.016 -.114l-.03 -.11l-.044 -.112l-.052 -.098l-.076 -.105l-.07 -.081l-3.5 -3.5l-.095 -.083a1 1 0 0 0 -1.226 0l-.094 .083l-.083 .094a1 1 0 0 0 0 1.226l.083 .094l1.792 1.793h-5.085l-.117 .007a1 1 0 0 0 0 1.986l.117 .007h5.085l-1.792 1.793l-.083 .094a1 1 0 0 0 1.403 1.403l.094 -.083l3.5 -3.5l.097 -.112l.05 -.074l.037 -.067l.05 -.112l.023 -.076l.025 -.117z",key:"svg-0"}]],pZe=yt("filled","direction-sign-filled","DirectionSignFilled",fZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const mZe=[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]],gZe=yt("filled","star-filled","StarFilled",mZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const yZe=[["path",{d:"M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z",key:"svg-0"}]],bZe=yt("filled","folder-filled","FolderFilled",yZe),Iee=T1({siblingSelector:"[data-likec4-focusable]",parentSelector:"[data-likec4-breadcrumbs-dropdown]",activateOnFocus:!1,loop:!0,orientation:"vertical"});function vZe(){const e=Ly(),r=wn(e.actorRef,a=>a.context.searchQuery);is("paneClick",()=>{e.closeDropdown()}),is("nodeClick",()=>{e.closeDropdown()});const n=OPe(a=>{e.send({type:"searchQuery.change",value:a})},250),o=r.trim().length>=2;return b.jsxs(Xl,{className:Je("nowheel",X1({layerStyle:"likec4.dropdown",gap:"xs",pointerEvents:"all"})),"data-likec4-breadcrumbs-dropdown":!0,onMouseLeave:()=>e.send({type:"dropdown.mouseLeave"}),onMouseEnter:()=>e.send({type:"dropdown.mouseEnter"}),children:[b.jsx(hZe,{}),b.jsx(xn,{gap:"xs",children:b.jsx(RZe,{value:r,onChange:n,"data-likec4-focusable":!0,onKeyDown:Iee})}),b.jsx(ta,{scrollbars:"x",type:"auto",offsetScrollbars:"present",classNames:{root:ye({maxWidth:["calc(100vw - 50px)","calc(100cqw - 50px)"]})},styles:{viewport:{overscrollBehavior:"none"}},children:o?b.jsx(wZe,{searchQuery:Fx(r).toLowerCase()}):b.jsx(TZe,{})})]})}const xZe=RL(ka);function wZe({searchQuery:e}){const r=Ho(),n=Ly(),o=e.includes(ka),a=yn(r.views(),Rd(s=>o&&s.$view.title?Fx(s.$view.title).toLowerCase().includes(e):s.id.toLowerCase().includes(e)||!!s.title?.toLowerCase().includes(e)),z4e(20),K0(),r$e((s,l)=>xZe(s.folder.path,l.folder.path)));if(a.length===0)return b.jsx("div",{children:"no results"});const i=o?e.split(ka):e;return b.jsx(ta,{scrollbars:"xy",offsetScrollbars:!1,className:ye({width:"100%",maxWidth:["calc(100vw - 250px)","calc(100cqw - 250px)"],maxHeight:["calc(100vh - 200px)","calc(100cqh - 200px)"]}),children:b.jsx(Fp,{gap:"0.5",children:a.map(s=>b.jsx(_Ze,{view:s,highlight:i,onClick:l=>{l.stopPropagation(),n.selectView(s.id)},"data-likec4-focusable":!0,onKeyDown:Iee},s.id))})})}const kZe=Uo({gap:"xxs",rounded:"sm",px:"xs",py:"xxs",_hover:{backgroundColor:{base:"mantine.colors.gray[1]",_dark:"mantine.colors.dark[5]"}},_focus:{outline:"none",color:"mantine.colors.primary.lightColor!",backgroundColor:"mantine.colors.primary.lightHover!"}}),zee=ye({_groupFocus:{color:"[inherit!]",transition:"none"}});function _Ze({view:e,highlight:r,...n}){const o=e.folder,a=Bee[e.id==="index"?"index":e._type],i=b.jsx(Kl,{component:"div",className:Je(zee,Qk({truncate:!0}),ye({"& > mark":{backgroundColor:{base:"mantine.colors.yellow[2]/90",_dark:"mantine.colors.yellow[5]/80",_groupFocus:"[transparent]"},color:{_groupFocus:"[inherit!]"}}})),maw:350,highlight:r,children:e.title??e.id},e.id),s=Je(n.className,"group",kZe);if(o.isRoot)return b.jsxs(Pr,{...n,className:s,children:[a,i]});const l=o.breadcrumbs.map(c=>b.jsx(Kl,{component:"div",className:Je(ye({_groupHover:{color:"mantine.colors.dimmed"}}),zee,Qk({dimmed:!0,truncate:!0})),maw:170,highlight:F6(r)?r:[],children:c.title},c.path));return l.push(b.jsxs(xn,{gap:"[4px]",children:[a,i]})),b.jsxs(Pr,{...n,className:s,children:[jee,b.jsx(L3,{separator:b.jsx(hh,{size:12,stroke:1.5}),separatorMargin:3,children:l})]})}const EZe=b.jsx(hh,{size:12,stroke:1.5,className:"mantine-rotate-rtl"}),jee=b.jsx(bZe,{size:16,className:ye({opacity:{base:.3,_groupHover:.5,_groupActive:.5,_groupFocus:.5}})}),Jk=ye({opacity:{base:.3,_dark:.5,_groupHover:.8,_groupActive:.8,_groupFocus:.8}}),Bee={index:b.jsx(gZe,{size:16,className:Jk}),element:b.jsx(gi,{size:18,stroke:2,className:Jk}),deployment:b.jsx(UA,{size:16,stroke:1.5,className:Jk}),dynamic:b.jsx(pZe,{size:18,className:Jk})},SZe=ta.withProps({scrollbars:"y",className:ye({maxHeight:["calc(100vh - 160px)","calc(100cqh - 160px)"]})});function Fee(e,r){return{folderPath:e.path,items:[...e.folders.map(n=>({type:"folder",folderPath:n.path,title:n.title,selected:r.selectedFolder.startsWith(n.path)})),...e.views.map(n=>({type:"view",viewType:n.id==="index"?"index":n._type,viewId:n.id,title:n.title??n
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const OZe=[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-1"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-2"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-3"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-4"}]],DZe=yt("outline","focus-centered","FocusCentered",OZe),LZe=()=>{const e=Wt();return b.jsx(e_,{label:"Center camera",children:b.jsx(gh,{onClick:()=>e.fitDiagram(),children:b.jsx(DZe,{})})})};ye({gap:"xxs",_empty:{display:"none"}}),ye({top:"md",left:"md",margin:"0",pointerEvents:"none","& :where(button, .action-icon, [role='dialog'])":{pointerEvents:"all"},"& .action-icon":{"--ai-size":"2rem"},"& .tabler-icon":{width:"65%",height:"65%"},_reduceGraphics:{"& .action-icon":{"--ai-radius":"0px"}}}),ye({shadow:{base:"md",_whenPanning:"none"}}),ye({"& .tabler-icon":{width:"65%",height:"65%"}});const t_=ye({flex:"1 1 40%",textAlign:"center",fontWeight:500,padding:"[4px 6px]",fontSize:"11px",zIndex:1}),IZe=ye({background:"mantine.colors.gray[2]",borderRadius:"sm",border:"1px solid",borderColor:"mantine.colors.gray[4]",_dark:{background:"mantine.colors.dark[5]",borderColor:"mantine.colors.dark[4]"}}),zZe=ye({position:"relative",borderRadius:"sm",background:"mantine.colors.gray[3]",boxShadow:"inset 1px 1px 3px 0px #00000024",_dark:{background:"mantine.colors.dark[7]"}}),jZe=ye({position:"absolute",width:8,height:8,border:"2px solid",borderColor:"mantine.colors.gray[5]",borderRadius:3,transform:"translate(-50%, -50%)"});/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const BZe=[["path",{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-1"}],["path",{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-2"}],["path",{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-3"}]],FZe=yt("outline","layout-dashboard","LayoutDashboard",BZe),HZe=e=>({viewId:e.view.id,autoLayout:e.view.autoLayout}),UZe=()=>{const{onChange:e}=sc(),r=Wt(),[n,o]=E.useState(null),[a,i]=E.useState({}),{autoLayout:s,viewId:l}=$a(HZe),{ref:c,hovered:u}=aC(),d=g=>y=>{a[g]=y,i(a)},h=g=>y=>{y.stopPropagation(),e?.({change:{op:"change-autolayout",layout:{...s,direction:g}}})},p=(g,y)=>{r.fitDiagram(),e?.({change:{op:"change-autolayout",layout:{...s,nodeSep:g,rankSep:y}}})};return b.jsxs(mr,{position:"right-start",clickOutsideEvents:["pointerdown"],radius:"xs",shadow:"lg",offset:{mainAxis:10},children:[b.jsx(pu,{children:b.jsx(e_,{label:"Change Auto Layout",children:b.jsx(gh,{children:b.jsx(FZe,{})})})}),b.jsx(Xl,{className:"likec4-top-left-panel",p:8,pt:6,opacity:u?.6:1,children:b.jsxs(Se,{pos:"relative",ref:o,children:[b.jsx(P3,{target:a[s.direction],parent:n,className:IZe}),b.jsx(Se,{mb:10,children:b.jsx(wt,{inline:!0,fz:"xs",c:"dimmed",fw:500,children:"Auto layout:"})}),b.jsxs(Op,{gap:2,wrap:"wrap",justify:"stretch",maw:160,children:[b.jsx(Pr,{className:t_,ref:d("TB"),onClick:h("TB"),children:"Top-Bottom"}),b.jsx(Pr,{className:t_,ref:d("BT"),onClick:h("BT"),children:"Bottom-Top"}),b.jsx(Pr,{className:t_,ref:d("LR"),onClick:h("LR"),children:"Left-Right"}),b.jsx(Pr,{className:t_,ref:d("RL"),onClick:h("RL"),children:"Right-Left"})]}),b.jsx(Se,{my:10,children:b.jsx(wt,{inline:!0,fz:"xs",c:"dimmed",fw:500,children:"Spacing:"})}),b.jsx(VZe,{ref:c,isVertical:s.direction==="TB"||s.direction==="BT",nodeSep:s.nodeSep,rankSep:s.rankSep,onChange:p},l)]})})]})},km=400,VZe=E.forwardRef(({isVertical:e,nodeSep:r,rankSep:n,onChange:o},a)=>{e||([r,n]=[n,r]);const i=qx(({x:p,y:g})=>{e||([p,g]=[g,p]),o(Math.round(p*km),Math.round(g*km))},[o,e],250,2e3),[s,l]=Vl({defaultValue:vPe({x:(r??100)/km,y:(n??120)/km}),onChange:i}),{ref:c}=BV(l);let u=Math.round(s.x*km),d=Math.round(s.y*km);e||([u,d]=[d,u]);const h=Rr(c,a);return b.jsxs(Se,{ref:h,className:zZe,pt:"100%",children:[b.jsx(Se,{className:jZe,style:{left:`${s.x*100}%`,top:`${s.y*100}%`}}),b.jsx(Se,{pos:"absolute",left:2,bottom:2,children:b.jsxs(wt,{component:"div",fz:8,c:"dimmed",fw:500,children:[d,", ",u]})})]})});/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const qZe=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Hee=yt("outline","alert-triangle","AlertTriangle",qZe),YZe=()=>{const e=wm();return $a(r=>r.view.hasLayoutDrift??!1)?b.jsxs(Ip,{position:"right-start",openDelay:200,closeDelay:100,...e,children:[b.jsx(vT,{children:b.jsx(or,{color:"orange",c:"orange",className:ye({bg:"mantine.colors.orange.light"}),children:b.jsx(Hee,{})})}),b.jsx(yT,{p:"0",children:b.jsxs(V3,{color:"orange",withBorder:!1,withCloseButton:!1,title:"Manual layout issues",children:[b.jsxs(wt,{mt:2,size:"sm",lh:"xs",children:["View contains new elements or their sizes have changed,",b.jsx("br",{}),"last manual layout can not be applied."]}),b.jsxs(wt,{mt:"xs",size:"sm",lh:"xs",children:["Update view predicates or remove ",b.jsx(j3,{children:"@likec4-generated"})]})]})})]}):null};/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const WZe=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M10 4l4 16",key:"svg-1"}],["path",{d:"M12 12l-8 2",key:"svg-2"}]],XZe=yt("outline","layout-collage","LayoutCollage",WZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const GZe=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M4 12h8",key:"svg-1"}],["path",{d:"M12 15h8",key:"svg-2"}],["path",{d:"M12 9h8",key:"svg-3"}],["path",{d:"M12 4v16",key:"svg-4"}]],Uee=yt("outline","layout-board-split","LayoutBoardSplit",GZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const KZe=[["path",{d:"M4 4l0 16",key:"svg-0"}],["path",{d:"M8 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]],ZZe=yt("outline","layout-align-left","LayoutAlignLeft",KZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const QZe=[["path",{d:"M12 4l0 5",key:"svg-0"}],["path",{d:"M12 15l0 5",key:"svg-1"}],["path",{d:"M6 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-2"}]],JZe=yt("outline","layout-align-center","LayoutAlignCenter",QZe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const eQe=[["path",{d:"M20 4l0 16",key:"svg-0"}],["path",{d:"M4 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-1"}]],tQe=yt("outline","layout-align-right","LayoutAlignRight",eQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const rQe=[["path",{d:"M4 4l16 0",key:"svg-0"}],["path",{d:"M9 8m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}]],nQe=yt("outline","layout-align-top","LayoutAlignTop",rQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const oQe=[["path",{d:"M4 12l5 0",key:"svg-0"}],["path",{d:"M15 12l5 0",key:"svg-1"}],["path",{d:"M9 6m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-2"}]],aQe=yt("outline","layout-align-middle","LayoutAlignMiddle",oQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const iQe=[["path",{d:"M4 20l16 0",key:"svg-0"}],["path",{d:"M9 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}]],sQe=yt("outline","layout-align-bottom","LayoutAlignBottom",iQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const lQe=[["path",{d:"M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M18 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M12 19h4.5c.71 0 1.372 -.212 1.924 -.576m1.545 -2.459a3.5 3.5 0 0 0 -3.469 -3.965h-.499m-4 0h-3.501a3.5 3.5 0 0 1 -2.477 -5.972m2.477 -1.028h3.5",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]],cQe=yt("outline","route-off","RouteOff",lQe),lc=({label:e,icon:r,onClick:n})=>b.jsx(e_,{label:e,withinPortal:!1,position:"top",children:b.jsx(gh,{classNames:{root:"action-icon",icon:ye({"& > svg":{width:"70%",height:"70%"}})},onClick:n,children:r})}),uQe=e=>{const r=Wt(),n=wm();return b.jsxs(mr,{position:"right",offset:{mainAxis:12},clickOutsideEvents:["pointerdown"],...n,...e,children:[b.jsx(pu,{children:b.jsx(e_,{label:"Manual layouting tools",children:b.jsx(gh,{children:b.jsx(XZe,{})})})}),b.jsx(Xl,{className:Uo({gap:"0.5",layerStyle:"likec4.panel",padding:"1",pointerEvents:"all"}),children:b.jsxs(Qd,{children:[b.jsx(lc,{label:"Align in columns",icon:b.jsx(Uee,{}),onClick:o=>{o.stopPropagation(),r.align("Column")}}),b.jsx(lc,{label:"Align left",icon:b.jsx(ZZe,{}),onClick:o=>{o.stopPropagation(),r.align("Left")}}),b.jsx(lc,{label:"Align center",icon:b.jsx(JZe,{}),onClick:o=>{o.stopPropagation(),r.align("Center")}}),b.jsx(lc,{label:"Align right",icon:b.jsx(tQe,{}),onClick:o=>{o.stopPropagation(),r.align("Right")}}),b.jsx(lc,{label:"Align in rows",icon:b.jsx(Uee,{style:{transform:"rotate(90deg)"}}),onClick:o=>{o.stopPropagation(),r.align("Row")}}),b.jsx(lc,{label:"Align top",icon:b.jsx(nQe,{}),onClick:o=>{o.stopPropagation(),r.align("Top")}}),b.jsx(lc,{label:"Align middle",icon:b.jsx(aQe,{}),onClick:o=>{o.stopPropagation(),r.align("Middle")}}),b.jsx(lc,{label:"Align bottom",icon:b.jsx(sQe,{}),onClick:o=>{o.stopPropagation(),r.align("Bottom")}}),b.jsx(lc,{label:"Reset all control points",icon:b.jsx(cQe,{}),onClick:o=>{o.stopPropagation(),r.resetEdgeControlPoints()}})]})})]})};function dQe(){const{enableReadOnly:e}=wr();return b.jsx(Pa,{children:!e&&b.jsx(Qr,{layout:"position",className:X1({gap:"xs",layerStyle:"likec4.panel",position:"relative",cursor:"pointer",padding:"xxs",pointerEvents:"all"}),initial:{opacity:0,translateX:-20},animate:{opacity:1,translateX:0},exit:{opacity:0,translateX:-20},children:b.jsxs(Qd,{openDelay:600,closeDelay:120,children:[b.jsx(UZe,{}),b.jsx(uQe,{}),b.jsx(YZe,{}),b.jsx(LZe,{})]})})})}/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const hQe=[["path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",key:"svg-0"}]],fQe=yt("filled","player-stop-filled","PlayerStopFilled",hQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const pQe=[["path",{d:"M19.496 4.136l-12 7a1 1 0 0 0 0 1.728l12 7a1 1 0 0 0 1.504 -.864v-14a1 1 0 0 0 -1.504 -.864z",key:"svg-0"}],["path",{d:"M4 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z",key:"svg-1"}]],mQe=yt("filled","player-skip-back-filled","PlayerSkipBackFilled",pQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const gQe=[["path",{d:"M3 5v14a1 1 0 0 0 1.504 .864l12 -7a1 1 0 0 0 0 -1.728l-12 -7a1 1 0 0 0 -1.504 .864z",key:"svg-0"}],["path",{d:"M20 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z",key:"svg-1"}]],yQe=yt("filled","player-skip-forward-filled","PlayerSkipForwardFilled",gQe),Vee=Zn.withProps({component:ps,variant:"light",size:"xs",fw:"500"}),bQe=()=>{const{portalProps:e}=wm();return b.jsx(D1,{...e,children:b.jsx(Vr,{css:{position:"absolute",margin:"0",padding:"0",top:"0",left:"0",width:"100%",height:"100%",border:"2px solid",borderColor:"mantine.colors.orange[6]",pointerEvents:"none",md:{borderWidth:4}}})})};function vQe(){const e=Wt(),{isParallel:r,hasNext:n,hasPrevious:o,currentStep:a,totalSteps:i}=$a(s=>{const l=s.xyedges.findIndex(c=>c.id===s.activeWalkthrough?.stepId);return{isParallel:Sa(s.activeWalkthrough?.parallelPrefix),hasNext:l<s.xyedges.length-1,hasPrevious:l>0,currentStep:l+1,totalSteps:s.xyedges.length}});return b.jsxs(Pa,{propagate:!0,children:[b.jsx(Lee,{variant:"light",size:"xs",color:"orange",mr:"sm",onClick:s=>{s.stopPropagation(),e.stopWalkthrough()},rightSection:b.jsx(fQe,{size:10}),children:"Stop"},"stop-walkthrough"),b.jsx(Vee,{disabled:!o,onClick:()=>e.walkthroughStep("previous"),leftSection:b.jsx(mQe,{size:10}),children:"Previous"},"prev"),b.jsx(Gl,{component:Qr,size:"md",radius:"sm",variant:r?"gradient":"transparent",gradient:{from:"red",to:"orange",deg:90},rightSection:b.jsx(Qr,{className:ye({fontSize:"xxs",display:r?"block":"none"}),children:"parallel"}),className:ye({alignItems:"baseline"}),children:b.jsxs(UWe,{children:[a," / ",i]})},"step-badge"),b.jsx(Vee,{disabled:!n,onClick:()=>e.walkthroughStep("next"),rightSection:b.jsx(yQe,{size:10}),children:"Next"},"next"),r&&b.jsx(bQe,{},"parallel-frame")]})}const qee=E.memo(()=>{const e=Jp(),r=NQ(),n=n8(CKe,{input:{viewModel:r}});return E.useEffect(()=>{const o=n.on("navigateTo",a=>{e.getSnapshot().context.view.id!==a.viewId&&e.send({type:"navigate.to",viewId:a.viewId})});return()=>o.unsubscribe()},[n,e]),UB(()=>{n.send({type:"update.inputs",inputs:{viewModel:r}})},[r]),b.jsx(Fp,{css:{alignItems:"flex-start",pointerEvents:"none",position:"absolute",top:"0",left:"0",margin:"0",width:"100%",gap:"xxs",maxWidth:["calc(100vw)","calc(100cqw)"],"@/sm":{margin:"xs",gap:"xs",width:"max-content",maxWidth:["calc(100vw - 2 * {spacing.md})","calc(100cqw - 2 * {spacing.md})"]}},children:b.jsxs(TKe,{value:n,children:[b.jsx(xQe,{actor:n}),b.jsx(dQe,{}),b.jsx(MZe,{})]})})});qee.displayName="NavigationPanel";const xQe=({actor:e})=>{const r=wn(e,o=>o.hasTag("active")),n=wm();return b.jsxs(mr,{offset:{mainAxis:4},opened:r,position:"bottom-start",trapFocus:!0,...n,clickOutsideEvents:["pointerdown","mousedown","click"],onDismiss:()=>e.send({type:"dropdown.dismiss"}),children:[b.jsx(wQe,{actor:e}),r&&b.jsx(vZe,{})]})},wQe=({actor:e})=>{const r=$a(n=>n.activeWalkthrough!==null);return b.jsx(dm,{children:b.jsx(pu,{children:b.jsx(Qr,{layout:!0,className:Uo({layerStyle:"likec4.panel",position:"relative",gap:"xs",cursor:"pointer",paddingRight:"md",pointerEvents:"all",width:"100%"}),onMouseLeave:()=>e.send({type:"breadcrumbs.mouseLeave"}),children:b.jsx(Pa,{mode:"popLayout",children:r?b.jsx(vQe,{}):b.jsx(nZe,{})})})})})},o7=ye({position:"absolute",bottom:"0",right:"0",padding:"2",margin:"0",width:"min-content",height:"min-content"}),kQe=ye({"--ai-radius":"0px",_noReduceGraphics:{"--ai-radius":"{radii.md}"}}),_Qe=ye({cursor:"default",userSelect:"none",minWidth:200,maxWidth:"calc(100vw - 20px)",backgroundColor:"mantine.colors.body/80",sm:{minWidth:300,maxWidth:"65vw"},md:{maxWidth:"40vw"},_dark:{backgroundColor:"mantine.colors.dark[6]/80"}}),EQe=ye({padding:"xxs"}),SQe=ye({backgroundColor:"transparent",transition:"all 100ms ease-in",_hover:{transition:"all 120ms ease-out",backgroundColor:"mantine.colors.primary[2]/50"},_dark:{_hover:{backgroundColor:"mantine.colors.dark[3]/40"}}});ye({fill:"var(--likec4-palette-fill)",stroke:"var(--likec4-palette-stroke)",strokeWidth:1,overflow:"visible",width:"100%",height:"auto",filter:`
drop-shadow(0 2px 3px rgb(0 0 0 / 22%))
drop-shadow(0 1px 8px rgb(0 0 0 / 10%))
`});const CQe=ye({fontWeight:500,letterSpacing:"0.2px",paddingTop:"0",paddingBottom:"0",textTransform:"lowercase",transition:"all 150ms ease-in-out",cursor:"pointer","--badge-radius":"2px","--badge-fz":"9.5px","--badge-padding-x":"3px","--badge-height":"13.5px","--badge-lh":"1","--badge-bg":"var(--likec4-palette-fill)","--badge-color":"var(--likec4-palette-hiContrast)"});/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const TQe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 16v.01",key:"svg-1"}],["path",{d:"M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-2"}]],AQe=yt("outline","help-circle","HelpCircle",TQe);/**
* @license @tabler/icons-react v3.35.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/const NQe=[["path",{d:"M7 7l10 10",key:"svg-0"}],["path",{d:"M17 8l0 9l-9 0",key:"svg-1"}]],RQe=yt("outline","arrow-down-right","ArrowDownRight",NQe),$Qe=({value:e})=>{const{title:r,color:n="primary",shape:o="rectangle"}=e,[a,i]=E.useState(null),s=Wt(),l=300,c=200;return b.jsx(z3,{shadow:"none",px:"xs",py:"sm",className:Je(SQe),"data-likec4-color":n,onMouseEnter:()=>{i(null),s.highlightNotation(e)},onMouseLeave:()=>{i(null),s.unhighlightNotation()},children:b.jsxs(Ur,{gap:"sm",align:"stretch",wrap:"nowrap",children:[b.jsx(Se,{flex:"0 0 70px",style:{position:"relative",width:70,height:sRe(70*(c/l),0)},children:b.jsx(gm,{data:{shape:o,width:l,height:c}})}),b.jsxs(ra,{gap:4,flex:1,children:[b.jsx(Ur,{gap:4,flex:"0 0 auto",children:e.kinds.map(u=>b.jsx(Gl,{className:Je(CQe),onMouseEnter:()=>{i(u),s.highlightNotation(e,u)},onMouseLeave:()=>{i(null),s.highlightNotation(e)},opacity:tV(a)&&a!==u?.25:1,children:u},u))}),b.jsx(wt,{component:"div",fz:"sm",fw:500,lh:"1.25",style:{textWrap:"pretty"},children:r})]})]})})},PQe=e=>({id:e.view.id,notations:e.view.notation?.nodes??[],isVisible:!0}),MQe=E.memo(()=>{const e=D9(c=>c.height),{id:r,notations:n,isVisible:o}=$a(PQe),[a,i]=yPe({key:"notation-webview-collapsed",defaultValue:!0}),s=n.length>0,l=wm();return b.jsxs(Pa,{children:[!s&&o&&b.jsx(cs.div,{initial:{opacity:.75,translateX:"50%"},animate:{opacity:1,translateX:0},exit:{translateX:"100%",opacity:.6},className:o7,children:b.jsx(po,{label:"View has no notations",color:"orange",...l,children:b.jsx(ci,{size:"lg",variant:"light",color:"orange",radius:"md",children:b.jsx(Hee,{})})})},"empty"),s&&o&&a&&b.jsx(cs.div,{initial:{opacity:.75,translateX:"50%"},animate:{opacity:1,translateX:0},exit:{translateX:"100%",opacity:.6},className:o7,children:b.jsx(po,{label:"Show notation",color:"dark",fz:"xs",...l,children:b.jsx(or,{size:"lg",variant:"default",color:"gray",className:kQe,onClick:()=>i(!1),children:b.jsx(AQe,{stroke:1.5})})})},"collapsed"),s&&o&&!a&&b.jsx(cs.div,{initial:{opacity:.75,scale:.2},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.25},className:Je("react-flow__panel",o7),style:{transformOrigin:"bottom right"},children:b.jsx(Rp,{radius:"sm",withBorder:!0,shadow:"lg",className:_Qe,children:b.jsxs(Jd,{defaultValue:"first",radius:"xs",children:[b.jsxs(q1,{children:[b.jsx(or,{size:"md",variant:"subtle",color:"gray",ml:2,style:{alignSelf:"center"},onClick:()=>i(!0),children:b.jsx(RQe,{stroke:2})}),b.jsx(jp,{value:"first",fz:"xs",children:"Elements"}),b.jsx(jp,{value:"second",fz:"xs",disabled:!0,children:"Relationships"})]}),b.jsx(Zl,{value:"first",className:EQe,hidden:a,children:b.jsx(ta,{viewportProps:{style:{maxHeight:`min(40vh, ${Math.max(e-60,50)}px)`}},children:b.jsx(ra,{gap:0,children:n.map((c,u)=>b.jsx($Qe,{value:c},u))})})})]})})},r)]})}),Yee=E.memo(()=>{const{enableControls:e,enableNotations:r,enableSearch:n,enableRelationshipDetails:o}=wr(),a=v6e(),i=VX(),s=vBe();return b.jsxs(lX,{onReset:a,children:[e&&b.jsx(Tze,{children:b.jsx(qee,{})}),i&&b.jsx(TGe,{overlaysActorRef:i}),r&&b.jsx(MQe,{}),n&&s&&b.jsx(fKe,{searchActorRef:s}),o&&b.jsx(wKe,{})]})});Yee.displayName="DiagramUI";function _m(e){return function(){return e}}const Wee=1e-12,a7=Math.PI,i7=2*a7,yh=1e-6,OQe=i7-yh;function Xee(e){this._+=e[0];for(let r=1,n=e.length;r<n;++r)this._+=arguments[r]+e[r]}function DQe(e){let r=Math.floor(e);if(!(r>=0))throw new Error(`invalid digits: ${e}`);if(r>15)return Xee;const n=10**r;return function(o){this._+=o[0];for(let a=1,i=o.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+o[a]}}class LQe{constructor(r){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=r==null?Xee:DQe(r)}moveTo(r,n){this._append`M${this._x0=this._x1=+r},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(r,n){this._append`L${this._x1=+r},${this._y1=+n}`}quadraticCurveTo(r,n,o,a){this._append`Q${+r},${+n},${this._x1=+o},${this._y1=+a}`}bezierCurveTo(r,n,o,a,i,s){this._append`C${+r},${+n},${+o},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(r,n,o,a,i){if(r=+r,n=+n,o=+o,a=+a,i=+i,i<
${s} {
--likec4-palette-fill: ${i(n.elements.fill)};
--likec4-palette-stroke: ${i(n.elements.stroke)};
}
${$te} ${s} {
--likec4-palette-fill: ${a(n.elements.fill)};
--likec4-palette-stroke: ${a(n.elements.stroke)};
}
`.trim()};function wet(e,r,n){const{elements:o,relationships:a}=n,i=`:where(${e} [data-likec4-color=${r}])`;return[`
${i} {
--likec4-palette-fill: ${o.fill};
--likec4-palette-stroke: ${o.stroke};
--likec4-palette-hiContrast: ${o.hiContrast};
--likec4-palette-loContrast: ${o.loContrast};
--likec4-palette-relation-stroke: ${a.line};
--likec4-palette-relation-label: ${a.label};
--likec4-palette-relation-label-bg: ${a.labelBg};
}
${bet} ${i} {
--likec4-palette-relation-stroke-selected: ${Tte(Ate(a.line,"black",85))};
}
${$te} ${i} {
--likec4-palette-relation-stroke-selected: ${Tte(Ate(a.line,"white",70))};
}
`.trim(),...ZRe(1,vet+1).map(s=>xet(e,r,n,s))].join(`
`)}function ket(e,r){return yn(r.colors,B6(),Ao(([n,o])=>wet(e,n,o)),oV(`
`))}const _et=E.memo(({id:e})=>{const r=`#${e}`,n=Yd()?.(),{theme:o}=nte(),a=ket(r,o);return b.jsx("style",{type:"text/css","data-likec4-colors":e,dangerouslySetInnerHTML:{__html:a},nonce:n})});function Pte(e,r){if(e._type==="dynamic")try{if(r??=e.variant,r==="sequence")return e.sequenceLayout.bounds}catch{}return e.bounds}function Mte({children:e}){const r=E.useContext(Zw);return E.useEffect(()=>{r||console.warn("LikeC4Diagram must be a child of MantineProvider")},[]),r?b.jsx(b.Fragment,{children:e}):b.jsx(gC,{defaultColorScheme:"auto",children:e})}Mte.displayName="EnsureMantine";const m7=({reducedMotion:e="user",children:r})=>{const n=Yd()?.();return b.jsx(wUe,{features:yqe,strict:!0,children:b.jsx(EUe,{reducedMotion:e,...n&&{nonce:n},children:r})})};function Ote({onCanvasClick:e,onCanvasContextMenu:r,onCanvasDblClick:n,onEdgeClick:o,onChange:a,onEdgeContextMenu:i,onNavigateTo:s,onNodeClick:l,onNodeContextMenu:c,onOpenSource:u,onBurgerMenuClick:d,onInitialized:h,view:p,className:g,readonly:y=!0,controls:x=!y,fitView:w=!0,fitViewPadding:k=x?Mk.withControls:Mk.default,pannable:C=!0,zoomable:_=!0,background:T="dots",enableElementTags:A=!1,enableFocusMode:N=!1,enableElementDetails:$=!1,enableRelationshipDetails:R=!1,enableRelationshipBrowser:M=!1,nodesDraggable:O=!y,nodesSelectable:B=!y||N||!!s||!!l,showNotations:I=!0,showNavigationButtons:Y=!!s,enableDynamicViewWalkthrough:D=!1,dynamicViewVariant:V,enableSearch:L=!1,initialWidth:U,initialHeight:q,experimentalEdgeEditing:X=!y,reduceGraphics:F="auto",renderIcon:J,where:Q,reactFlowProps:z,renderNodes:W,children:G}){const Z=ZW(),oe=E.useRef(null),ee=Pte(p,V),re=Eet(k);oe.current==null&&(oe.current={defaultEdges:[],defaultNodes:[],initialWidth:U??ee.width,initialHeight:q??ee.height,initialFitViewOptions:{maxZoom:H9,minZoom:hs,padding:re},initialMaxZoom:H9,initialMinZoom:hs});const he=F==="auto"?C&&(ee.width??1)*(ee.height??1)>6e6&&p.nodes.some(Ce=>Ce.children?.length>0):F;return b.jsx(Mte,{children:b.jsx(m7,{...he&&{reducedMotion:"always"},children:b.jsx(u6e,{value:J??null,children:b.jsx(fh,{features:{enableFitView:w,enableReadOnly:y,enableFocusMode:N,enableNavigateTo:!!s,enableElementDetails:$,enableRelationshipDetails:R,enableRelationshipBrowser:M,enableSearch:L,enableNavigationButtons:Y&&!!s,enableDynamicViewWalkthrough:p._type==="dynamic"&&D,enableEdgeEditing:X,enableNotations:I,enableVscode:!!u,enableControls:x,enableElementTags:A},children:b.jsxs(gKe,{handlers:{onCanvasClick:e,onCanvasContextMenu:r,onCanvasDblClick:n,onEdgeClick:o,onChange:a,onEdgeContextMenu:i,onNavigateTo:s,onNodeClick:l,onNodeContextMenu:c,onOpenSource:u,onBurgerMenuClick:d,onInitialized:h},children:[b.jsx(_et,{id:Z}),b.jsx(Mze,{rootSelector:`#${Z}`,children:b.jsx(Cze,{id:Z,className:g,reduceGraphics:he,children:b.jsx(Mw,{fitView:w,...oe.current,children:b.jsxs(set,{view:p,zoomable:_,pannable:C,fitViewPadding:re,nodesSelectable:B,where:Q??null,dynamicViewVariant:V,children:[b.jsx(EJe,{nodesDraggable:O,nodesSelectable:B,background:T,reactFlowProps:z,renderNodes:W,children:G}),b.jsx(Yee,{})]})})})})]})})})})})}const Dte=e=>typeof e=="number"?`${e}px`:e;function Eet(e){return VB(()=>U6(e)?URe(e,Dte):Dte(e),[e],ut)}function Cet({children:e,likec4model:r}){return b.jsx(W1.Provider,{value:r,children:e})}const g7=({children:e})=>b.jsx("div",{style:{margin:"1rem 0"},children:b.jsx("div",{style:{margin:"0 auto",display:"inline-block",padding:"2rem",background:"rgba(250,82,82,.15)",color:"#ffa8a8"},children:e})}),Tet=({viewId:e})=>b.jsxs(g7,{children:["View ",b.jsx("code",{children:e})," not found"]}),Aet=e=>{throw new Error("LikeC4View is not available SSR")};var Lte={exports:{}},y7,Ite;function Net(){if(Ite)return y7;Ite=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return y7=e,y7}var b7,zte;function Ret(){if(zte)return b7;zte=1;var e=Net();function r(){}function n(){}return n.resetWarningCache=r,b7=function(){function o(s,l,c,u,d,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},jet=function(e,r){return Det(e)||Let(e,r)||Iet(e,r)||zet()},Hte=Bte((function(e){function r(){return e.exports=r=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var a=arguments[o];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])}return n},r.apply(this,arguments)}e.exports=r})),Bet=function(e,r){if(e==null)return{};var n,o,a={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],r.indexOf(n)>=0||(a[n]=e[n]);return a},Ute=function(e,r){if(e==null)return{};var n,o,a=Bet(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],r.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},Fet=E.createContext(null);function Vte(e){var r=e.children,n=r===void 0?"":r,o=Ute(e,["children"]);return typeof n!="string"&&(n=Aet()),Gr.createElement("template",Hte({},o,{dangerouslySetInnerHTML:{__html:n}}))}function qte(e){var r=e.root,n=e.children;return ji.createPortal(n===void 0?null:n,r)}function Het(e){var r=E.forwardRef((function(n,o){var a,i,s=n.mode,l=s===void 0?"open":s,c=n.delegatesFocus,u=c!==void 0&&c,d=n.styleSheets,h=d===void 0?[]:d,p=n.ssr,g=p!==void 0&&p,y=n.children,x=Ute(n,["mode","delegatesFocus","styleSheets","ssr","children"]),w=(i=E.useRef((a=o)&&a.current),E.useEffect((function(){a&&(a.current=i.current)}),[a]),i),k=E.useState(null),C=jet(k,2),_=C[0],T=C[1],A="node_".concat(l).concat(u);return E.useLayoutEffect((function(){if(w.current)try{if(typeof o=="function"&&o(w.current),g){var N=w.current.shadowRoot;return void T(N)}var $=w.current.attachShadow({mode:l,delegatesFocus:u});h.length>0&&($.adoptedStyleSheets=h),T($)}catch(R){(function(M){var O=M.error,B=M.styleSheets,I=M.root;switch(O.name){case"NotSupportedError":B.length>0&&(I.adoptedStyleSheets=B);break;default:throw O}})({error:R,styleSheets:h,root:_})}}),[o,w,h]),Gr.createElement(Gr.Fragment,null,Gr.createElement(e.tag,Hte({key:A,ref:w},x),(_||g)&&Gr.createElement(Fet.Provider,{value:_},g?Gr.createElement(Vte,{shadowroot:l,shadowrootmode:l},e.render({root:_,ssr:g,children:y})):Gr.createElement(qte,{root:_},e.render({root:_,ssr:g,children:y})))))}));return r.propTypes={mode:bs.oneOf(["open","closed"]),delegatesFocus:bs.bool,styleSheets:bs.arrayOf(bs.instanceOf(globalThis.CSSStyleSheet)),ssr:bs.bool,children:bs.node},r}Vte.propTypes={children:bs.oneOfType([bs.string,bs.node])},qte.propTypes={root:bs.object.isRequired,children:bs.node};var v7=new Map;function Uet(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"core",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(o){return o.children};return new Proxy(e,{get:function(o,a){var i=Oet(a,{separator:"-"}),s="".concat(r,"-").concat(i);return v7.has(s)||v7.set(s,Het({tag:i,render:n})),v7.get(s)}})}var Vet=Uet();const qet='@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:400;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-400-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-400-normal.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:500;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-500-normal.woff2) format("woff2"),url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-500-normal.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Sans;font-style:normal;font-display:swap;font-weight:600;src:url(https://cdn.jsdelivr.net/fontsource/fonts/ibm-plex-sans@latest/latin-600-normal.woff2) format
:where([data-likec4-instance="${e}"]) {
display: block;
box-sizing: border-box;
border: 0 solid transparent;
background: transparent;
padding: 0;
margin: 0;
overflow: hidden;
width: 100%;
height: 100%;
min-width: 80px;
min-height: 80px;
}
`.trim();const{width:n,height:o}=r,a=n>o;return`
:where([data-likec4-instance="${e}"]) {
display: block;
box-sizing: border-box;
border: 0 solid transparent;
background: transparent;
padding: 0;
overflow: hidden;
aspect-ratio: ${Math.ceil(n)} / ${Math.ceil(o)};
${a?"":`
max-width: min(100%, var(--likec4-view-max-width, ${Math.ceil(n)}px));
margin-left: auto;
margin-right: auto;`}
width: ${a?"100%":"auto"};
height: ${a?"auto":"100%"};
${a?"min-width: 80px;":"min-height: 80px;"}
max-height: min(100%, var(--likec4-view-max-height, ${Math.ceil(o)}px));
}
`.trim()}const Ket=Vet.div;function Zet({children:e,theme:r=Yet,injectFontCss:n=!0,styleNonce:o,colorScheme:a,keepAspectRatio:i=!1,...s}){const l=Xet(a),c=ZW(),u=Get(c,i),d=E.useRef(null),h=Wet(n,o),p=E.useCallback(()=>d.current??void 0,[d]);let g,y;return H6(o)&&(typeof o=="string"?(y=o,g=()=>o):typeof o=="function"&&(y=o(),g=o)),b.jsxs(b.Fragment,{children:[b.jsx("style",{type:"text/css",nonce:y,dangerouslySetInnerHTML:{__html:u}}),b.jsx(Ket,{ssr:!1,...s,styleSheets:h,"data-likec4-instance":c,children:b.jsx("div",{ref:d,"data-mantine-color-scheme":l,className:"likec4-shadow-root",children:b.jsx(gC,{...a&&{forceColorScheme:a},defaultColorScheme:l,getRootElement:p,...g&&{getStyleNonce:g},cssVariablesSelector:".likec4-shadow-root",theme:r,children:b.jsx(m7,{children:e})})})})]})}const Qet=ye({cursor:"pointer","--mantine-cursor-pointer":"pointer","& :where(.likec4-diagram, .likec4-compound-node, .likec4-element-node)":{cursor:"pointer"}});function Jet({viewId:e,className:r,pannable:n=!1,zoomable:o=!1,keepAspectRatio:a=!0,colorScheme:i,injectFontCss:s=!0,controls:l=!1,background:c="transparent",browser:u=!0,showNavigationButtons:d=!1,showNotations:h,enableFocusMode:p=!1,enableDynamicViewWalkthrough:g=!1,enableElementDetails:y=!1,enableRelationshipDetails:x=!1,enableRelationshipBrowser:w=x,reduceGraphics:k="auto",mantineTheme:C,styleNonce:_,style:T,reactFlowProps:A,renderNodes:N,children:$,...R}){const M=Aze(),[O,B]=E.useState(null),I=it(()=>{B(e)});if(!M)return b.jsx(g7,{children:"LikeC4Model not found. Make sure you provided LikeC4ModelProvider."});const Y=M.findView(e)?.$view;if(!Y)return b.jsx(Tet,{viewId:e});if(Y._stage!=="layouted")return b.jsxs(g7,{children:['LikeC4 View "$',e,'" is not layouted. Make sure you have LikeC4ModelProvider with layouted model.']});const D=O?M.findView(O)?.$view:null,V=(Y.notation?.nodes??[]).length>0;h??=V;const L=u!==!1,U=eV(u)?{}:u,q=Pte(Y,R.dynamicViewVariant);return b.jsx(Zet,{injectFontCss:s,theme:C,colorScheme:i,styleNonce:_,keepAspectRatio:a?q:!1,className:Je("likec4-view",r),style:T,children:b.jsxs(m7,{children:[b.jsx(Ote,{view:Y,readonly:!0,pannable:n,zoomable:o,background:c,fitView:!0,fitViewPadding:Mk.default,showNotations:h,enableDynamicViewWalkthrough:g,showNavigationButtons:d,experimentalEdgeEditing:!1,enableFocusMode:p,enableRelationshipDetails:x,enableElementDetails:y,enableRelationshipBrowser:w,enableElementTags:!1,controls:l,nodesDraggable:!1,reduceGraphics:k,className:Je("likec4-static-view",L&&Qet),enableSearch:!1,...L&&{onCanvasClick:I,onNodeClick:I},reactFlowProps:A,renderNodes:N,children:$,...R}),D&&b.jsxs(Oy,{openDelay:0,onClose:()=>B(null),children:[b.jsx(Ote,{view:D,pannable:!0,zoomable:!0,background:"dots",onNavigateTo:B,showNavigationButtons:!0,enableDynamicViewWalkthrough:!0,enableFocusMode:!0,enableRelationshipBrowser:!0,enableElementDetails:!0,enableRelationshipDetails:!0,enableSearch:!0,enableElementTags:!0,controls:!0,readonly:!0,fitView:!0,...R,fitViewPadding:Mk.withControls,...U,showNotations:U.showNotations??h,renderNodes:N}),b.jsx(Se,{pos:"absolute",top:"1rem",right:"1rem",children:b.jsx(or,{variant:"default",color:"gray",onClick:X=>{X.stopPropagation(),B(null)},children:b.jsx(Hp,{})})})]})]})})}const ett={};function ttt(e){const r=ett[e.node.icon??""];return r?b.jsx(r,e):null}function rtt(e,r,n){let o=a=>e(a,...r);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:r})}function Xte(e,r,n){let o=e.length-r.length;if(o===0)return e(...r);if(o===1)return rtt(e,r,n);throw Error("Wrong number of arguments")}function ntt(...e){return Xte(ott,e)}function ott(e,r){let n={};for(let[o,a]of Object.entries(e))n[o]=r(a,o,e);return n}function Gte(...e){return Xte(By,e)}function By(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return!1;if(Array.isArray(e))return att(e,r);if(e instanceof Map)return itt(e,r);if(e instanceof Set)return stt(e,r);if(e instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp)return e.toString()===r.toString();if(Obje
* @license React
* scheduler.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Jte;function vtt(){return Jte||(Jte=1,(function(e){function r(L,U){var q=L.length;L.push(U);e:for(;0<q;){var X=q-1>>>1,F=L[X];if(0<a(F,U))L[X]=U,L[q]=F,q=X;else break e}}function n(L){return L.length===0?null:L[0]}function o(L){if(L.length===0)return null;var U=L[0],q=L.pop();if(q!==U){L[0]=q;e:for(var X=0,F=L.length,J=F>>>1;X<J;){var Q=2*(X+1)-1,z=L[Q],W=Q+1,G=L[W];if(0>a(z,q))W<F&&0>a(G,z)?(L[X]=G,L[W]=q,X=W):(L[X]=z,L[Q]=q,X=Q);else if(W<F&&0>a(G,q))L[X]=G,L[W]=q,X=W;else break e}}return U}function a(L,U){var q=L.sortIndex-U.sortIndex;return q!==0?q:L.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,p=3,g=!1,y=!1,x=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function T(L){for(var U=n(u);U!==null;){if(U.callback===null)o(u);else if(U.startTime<=L)o(u),U.sortIndex=U.expirationTime,r(c,U);else break;U=n(u)}}function A(L){if(x=!1,T(L),!y)if(n(c)!==null)y=!0,N||(N=!0,I());else{var U=n(u);U!==null&&V(A,U.startTime-L)}}var N=!1,$=-1,R=5,M=-1;function O(){return w?!0:!(e.unstable_now()-M<R)}function B(){if(w=!1,N){var L=e.unstable_now();M=L;var U=!0;try{e:{y=!1,x&&(x=!1,C($),$=-1),g=!0;var q=p;try{t:{for(T(L),h=n(c);h!==null&&!(h.expirationTime>L&&O());){var X=h.callback;if(typeof X=="function"){h.callback=null,p=h.priorityLevel;var F=X(h.expirationTime<=L);if(L=e.unstable_now(),typeof F=="function"){h.callback=F,T(L),U=!0;break t}h===n(c)&&o(c),T(L)}else o(c);h=n(c)}if(h!==null)U=!0;else{var J=n(u);J!==null&&V(A,J.startTime-L),U=!1}}break e}finally{h=null,p=q,g=!1}U=void 0}}finally{U?I():N=!1}}}var I;if(typeof _=="function")I=function(){_(B)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,D=Y.port2;Y.port1.onmessage=B,I=function(){D.postMessage(null)}}else I=function(){k(B,0)};function V(L,U){$=k(function(){L(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(L){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var q=p;p=U;try{return L()}finally{p=q}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(L,U){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var q=p;p=L;try{return U()}finally{p=q}},e.unstable_scheduleCallback=function(L,U,q){var X=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?X+q:X):q=X,L){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=q+F,L={id:d++,callback:U,priorityLevel:L,startTime:q,expirationTime:F,sortIndex:-1},q>X?(L.sortIndex=q,r(u,L),n(c)===null&&L===n(u)&&(x?(C($),$=-1):x=!0,V(A,q-X))):(L.sortIndex=F,r(c,L),y||g||(y=!0,N||(N=!0,I()))),L},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(L){var U=p;return function(){var q=p;p=U;try{return L.apply(this,arguments)}finally{p=q}}}})(_7)),_7}var ere;function xtt(){return ere||(ere=1,k7.exports=vtt()),k7.exports}/**
* @license React
* react-dom-client.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var tre;function wtt(){if(tre)return Fy;tre=1;var e=xtt(),r=V2(),n=CD();function o(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)m+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function i(f){var m=f,v=f;if(f.alternate)for(;m.return;)m=m.return;else{f=m;do m=f,(m.flags&4098)!==0&&(v=m.return),f=m.return;while(f)}return m.tag===3?v:null}function s(f){if(f.tag===13){var m=f.memoizedState;if(m===null&&(f=f.alternate,f!==null&&(m=f.memoizedState)),m!==null)return m.dehydrated}return null}function l(f){if(i(f)!==f)throw Error(o(188))}function c(f){var m=f.alternate;if(!m){if(m=i(f),m===null)throw Error(o(188));return m!==f?null:f}for(var v=f,S=m;;){var P=v.return;if(P===null)break;var j=P.alternate;if(j===null){if(S=P.return,S!==null){v=S;continue}break}if(P.child===j.child){for(j=P.child;j;){if(j===v)return l(P),f;if(j===S)return l(P),m;j=j.sibling}throw Error(o(188))}if(v.return!==S.return)v=P,S=j;else{for(var K=!1,te=P.child;te;){if(te===v){K=!0,v=P,S=j;break}if(te===S){K=!0,S=P,v=j;break}te=te.sibling}if(!K){for(te=j.child;te;){if(te===v){K=!0,v=j,S=P;break}if(te===S){K=!0,S=j,v=P;break}te=te.sibling}if(!K)throw Error(o(189))}}if(v.alternate!==S)throw Error(o(190))}if(v.tag!==3)throw Error(o(188));return v.stateNode.current===v?f:m}function u(f){var m=f.tag;if(m===5||m===26||m===27||m===6)return f;for(f=f.child;f!==null;){if(m=u(f),m!==null)return m;f=f.sibling}return null}var d=Object.assign,h=Symbol.for("react.element"),p=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),_=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function I(f){return f===null||typeof f!="object"?null:(f=B&&f[B]||f["@@iterator"],typeof f=="function"?f:null)}var Y=Symbol.for("react.client.reference");function D(f){if(f==null)return null;if(typeof f=="function")return f.$$typeof===Y?null:f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case y:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case A:return"Suspense";case N:return"SuspenseList";case M:return"Activity"}if(typeof f=="object")switch(f.$$typeof){case g:return"Portal";case _:return(f.displayName||"Context")+".Provider";case C:return(f._context.displayName||"Context")+".Consumer";case T:var m=f.render;return f=f.displayName,f||(f=m.displayName||m.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case $:return m=f.displayName||null,m!==null?m:D(f.type)||"Memo";case R:m=f._payload,f=f._init;try{return D(f(m))}catch{}}return null}var V=Array.isArray,L=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},X=[],F=-1;function J(f){return{current:f}}function Q(f){0>F||(f.current=X[F],X[F]=null,F--)}function z(f,m){F++,X[F]=f.current,f.current=m}var W=J(null),G=J(null),Z=J(null),oe=J(null);function ee(f,m){switch(z(Z,m),z(G,f),z(W,null),m.nodeType){case 9:case 11:f=(f=m.documentElement)&&(f=f.namespaceURI)?Xge(f):0;break;default:if(f=m.tagName,m=m.namespaceURI)m=Xge(m),f=Gge(m,f);else switch(f){case"svg":f=1;break;case"math":f=2;break;default:f=0}}Q(W),z(W,f)}function re(){Q(W),Q(G),Q(Z)}function he(f){f.memoizedState!==null&&z(oe,f);var m=W.current,v=Gge(m,f.type);m!==v&&(z(G,f),z(W,v))}function Ce(f){G.current===f&&(Q(W),Q(G)),oe.current===f&&(Q(oe),jv._currentValue=q)}var ce=Object.prototype.hasOwnProperty,de
at`)?" (<anonymous>)":-1<v.stack.indexOf("@")?"@unknown:0:0":""}return`
`+nf+f+$g}var of=!1;function af(f,m){if(!f||of)return"";of=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(m){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(ke){var ve=ke}Reflect.construct(f,[],Re)}else{try{Re.call()}catch(ke){ve=ke}f.call(Re.prototype)}}else{try{throw Error()}catch(ke){ve=ke}(Re=f())&&typeof Re.catch=="function"&&Re.catch(function(){})}}catch(ke){if(ke&&ve&&typeof ke.stack=="string")return[ke.stack,ve.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var P=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");P&&P.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=S.DetermineComponentFrameRoot(),K=j[0],te=j[1];if(K&&te){var le=K.split(`
`),ge=te.split(`
`);for(P=S=0;S<le.length&&!le[S].includes("DetermineComponentFrameRoot");)S++;for(;P<ge.length&&!ge[P].includes("DetermineComponentFrameRoot");)P++;if(S===le.length||P===ge.length)for(S=le.length-1,P=ge.length-1;1<=S&&0<=P&&le[S]!==ge[P];)P--;for(;1<=S&&0<=P;S--,P--)if(le[S]!==ge[P]){if(S!==1||P!==1)do if(S--,P--,0>P||le[S]!==ge[P]){var Te=`
`+le[S].replace(" at new "," at ");return f.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",f.displayName)),Te}while(1<=S&&0<=P);break}}}finally{of=!1,Error.prepareStackTrace=v}return(v=f?f.displayName||f.name:"")?Ri(v):""}function Gb(f){switch(f.tag){case 26:case 27:case 5:return Ri(f.type);case 16:return Ri("Lazy");case 13:return Ri("Suspense");case 19:return Ri("SuspenseList");case 0:case 15:return af(f.type,!1);case 11:return af(f.type.render,!1);case 1:return af(f.type,!0);case 31:return Ri("Activity");default:return""}}function Pg(f){try{var m="";do m+=Gb(f),f=f.return;while(f);return m}catch(v){return`
Error generating stack: `+v.message+`
`+v.stack}}function Io(f){switch(typeof f){case"bigint":case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function Mg(f){var m=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(m==="checkbox"||m==="radio")}function Kb(f){var m=Mg(f)?"checked":"value",v=Object.getOwnPropertyDescriptor(f.constructor.prototype,m),S=""+f[m];if(!f.hasOwnProperty(m)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var P=v.get,j=v.set;return Object.defineProperty(f,m,{configurable:!0,get:function(){return P.call(this)},set:function(K){S=""+K,j.call(this,K)}}),Object.defineProperty(f,m,{enumerable:v.enumerable}),{getValue:function(){return S},setValue:function(K){S=""+K},stopTracking:function(){f._valueTracker=null,delete f[m]}}}}function Yu(f){f._valueTracker||(f._valueTracker=Kb(f))}function Wu(f){if(!f)return!1;var m=f._valueTracker;if(!m)return!0;var v=m.getValue(),S="";return f&&(S=Mg(f)?f.checked?"true":"false":f.value),f=S,f!==v?(m.setValue(f),!0):!1}function Xu(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}var Zb=/[\n"\\]/g;function zo(f){return f.replace(Zb,function(m){return"\\"+m.charCodeAt(0).toString(16)+" "})}function Bs(f,m,v,S,P,j,K,te){f.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?f.type=K:f.removeAttribute("type"),m!=null?K==="number"?(m===0&&f.value===""||f.value!=m)&&(f.value=""+Io(m)):f.value!==""+Io(m)&&(f.value=""+Io(m)):K!=="submit"&&K!=="reset"||f.removeAttribute("value"),m!=null?sf(f,K,Io(m)):v!=null?sf(f,K,Io(v)):S!=null&&f.removeAttribute("value"),P==null&&j!=null&&(f.defaultChecked=!!j),P!=null&&(f.checked=P&&typeof P!="function"&&typeof P!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?f.name=""+Io(te):f.removeAttribute("name")}function Og(f,m,v,S,P,j,K,te){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(f.type=j),m!=null||v!=null){if(!(j!=="submit"&&j!=="reset"||m!=null))return;v=v!=null?""+Io(v):"",m=m!=null?""+Io(m):v,te||m===f.value||(f.value=m),f.defaultValue=m}S=S??P,S=typeof S!="function"&&typeof S!="symbol"&&!!S,f.checked=te?f.checked:!!S,f.defaultChecked=!!S,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(f.name=K)}function sf(f,m,v){m==="number"&&Xu(f.ownerDocument)===f||f.defaultValue===""+v||(f.defaultValue=""+v)}function $i(f,m,v,S){if(f=f.options,m){m={};for(var P=0;P<v.length;P++)m["$"+v[P]]=!0;for(v=0;v<f.length;v++)P=m.hasOwnProperty("$"+f[v].value),f[v].selected!==P&&(f[v].selected=P),P&&S&&(f[v].defaultSelected=!0)}else{for(v=""+Io(v),m=null,P=0;P<f.length;P++){if(f[P].value===v){f[P].selected=!0,S&&(f[P].defaultSelected=!0);return}m!==null||f[P].disabled||(m=f[P])}m!==null&&(m.selected=!0)}}function Yfe(f,m,v){if(m!=null&&(m=""+Io(m),m!==f.value&&(f.value=m),v==null)){f.defaultValue!==m&&(f.defaultValue=m);return}f.defaultValue=v!=null?""+Io(v):""}function Wfe(f,m,v,S){if(m==null){if(S!=null){if(v!=null)throw Error(o(92));if(V(S)){if(1<S.length)throw Error(o(93));S=S[0]}v=S}v==null&&(v=""),m=v}v=Io(m),f.defaultValue=v,S=f.textContent,S===v&&S!==""&&S!==null&&(f.value=S)}function Dg(f,m){if(m){var v=f.firstChild;if(v&&v===f.lastChild&&v.nodeType===3){v.nodeValue=m;return}}f.textContent=m}var W_t=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msG
`).replace(b5t,"")}function Wge(f,m){return m=Yge(m),Yge(f)===m}function T2(){}function br(f,m,v,S,P,j){switch(v){case"children":typeof S=="string"?m==="body"||m==="textarea"&&S===""||Dg(f,S):(typeof S=="number"||typeof S=="bigint")&&m!=="body"&&Dg(f,""+S);break;case"className":qu(f,"class",S);break;case"tabIndex":qu(f,"tabindex",S);break;case"dir":case"role":case"viewBox":case"width":case"height":qu(f,v,S);break;case"style":Gfe(f,S,j);break;case"data":if(m!=="object"){qu(f,"data",S);break}case"src":case"href":if(S===""&&(m!=="a"||v!=="href")){f.removeAttribute(v);break}if(S==null||typeof S=="function"||typeof S=="symbol"||typeof S=="boolean"){f.removeAttribute(v);break}S=D5(""+S),f.setAttribute(v,S);break;case"action":case"formAction":if(typeof S=="function"){f.setAttribute(v,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(v==="formAction"?(m!=="input"&&br(f,m,"name",P.name,P,null),br(f,m,"formEncType",P.formEncType,P,null),br(f,m,"formMethod",P.formMethod,P,null),br(f,m,"formTarget",P.formTarget,P,null)):(br(f,m,"encType",P.encType,P,null),br(f,m,"method",P.method,P,null),br(f,m,"target",P.target,P,null)));if(S==null||typeof S=="symbol"||typeof S=="boolean"){f.removeAttribute(v);break}S=D5(""+S),f.setAttribute(v,S);break;case"onClick":S!=null&&(f.onclick=T2);break;case"onScroll":S!=null&&Gt("scroll",f);break;case"onScrollEnd":S!=null&&Gt("scrollend",f);break;case"dangerouslySetInnerHTML":if(S!=null){if(typeof S!="object"||!("__html"in S))throw Error(o(61));if(v=S.__html,v!=null){if(P.children!=null)throw Error(o(60));f.innerHTML=v}}break;case"multiple":f.multiple=S&&typeof S!="function"&&typeof S!="symbol";break;case"muted":f.muted=S&&typeof S!="function"&&typeof S!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(S==null||typeof S=="function"||typeof S=="boolean"||typeof S=="symbol"){f.removeAttribute("xlink:href");break}v=D5(""+S),f.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",v);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":S!=null&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(v,""+S):f.removeAttribute(v);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":S&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(v,""):f.removeAttribute(v);break;case"capture":case"download":S===!0?f.setAttribute(v,""):S!==!1&&S!=null&&typeof S!="function"&&typeof S!="symbol"?f.setAttribute(v,S):f.removeAttribute(v);break;case"cols":case"rows":case"size":case"span":S!=null&&typeof S!="function"&&typeof S!="symbol"&&!isNaN(S)&&1<=S?f.setAttribute(v,S):f.removeAttribute(v);break;case"rowSpan":case"start":S==null||typeof S=="function"||typeof S=="symbol"||isNaN(S)?f.removeAttribute(v):f.setAttribute(v,S);break;case"popover":Gt("beforetoggle",f),Gt("toggle",f),Vu(f,"popover",S);break;case"xlinkActuate":Fa(f,"http://www.w3.org/1999/xlink","xlink:actuate",S);break;case"xlinkArcrole":Fa(f,"http://www.w3.org/1999/xlink","xlink:arcrole",S);break;case"xlinkRole":Fa(f,"http://www.w3.org/1999/xlink","xlink:role",S);break;case"xlinkShow":Fa(f,"http://www.w3.org/1999/xlink","xlink:show",S);break;case"xlinkTitle":Fa(f,"http://www.w3.org/1999/xlink","xlink:title",S);break;case"xlinkType":Fa(f,"http://www.w3.org/1999/xlink","xlink:type",S);break;case"xmlBase":Fa(f,"http://www.w3.org/XML/199
.`.concat(Ctt,` {
overflow: hidden `).concat(o,`;
padding-right: `).concat(l,"px ").concat(o,`;
}
body[`).concat(Tm,`] {
overflow: hidden `).concat(o,`;
overscroll-behavior: contain;
`).concat([r&&"position: relative ".concat(o,";"),n==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(l,"px ").concat(o,`;
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
}
.`).concat(y_,` {
right: `).concat(l,"px ").concat(o,`;
}
.`).concat(b_,` {
margin-right: `).concat(l,"px ").concat(o,`;
}
.`).concat(y_," .").concat(y_,` {
right: 0 `).concat(o,`;
}
.`).concat(b_," .").concat(b_,` {
margin-right: 0 `).concat(o,`;
}
body[`).concat(Tm,`] {
`).concat(Ttt,": ").concat(l,`px;
}
`)},lre=function(){var e=parseInt(document.body.getAttribute(Tm)||"0",10);return isFinite(e)?e:0},Ytt=function(){E.useEffect(function(){return document.body.setAttribute(Tm,(lre()+1).toString()),function(){var e=lre()-1;e<=0?document.body.removeAttribute(Tm):document.body.setAttribute(Tm,e.toString())}},[])},Wtt=function(e){var r=e.noRelative,n=e.noImportant,o=e.gapMode,a=o===void 0?"margin":o;Ytt();var i=E.useMemo(function(){return Utt(a)},[a]);return E.createElement(Vtt,{styles:qtt(i,!r,a,n?"":"!important")})},A7=!1;if(typeof window<"u")try{var x_=Object.defineProperty({},"passive",{get:function(){return A7=!0,!0}});window.addEventListener("test",x_,x_),window.removeEventListener("test",x_,x_)}catch{A7=!1}var Am=A7?{passive:!1}:!1,Xtt=function(e){return e.tagName==="TEXTAREA"},cre=function(e,r){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[r]!=="hidden"&&!(n.overflowY===n.overflowX&&!Xtt(e)&&n[r]==="visible")},Gtt=function(e){return cre(e,"overflowY")},Ktt=function(e){return cre(e,"overflowX")},ure=function(e,r){var n=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var a=dre(e,o);if(a){var i=hre(e,o),s=i[1],l=i[2];if(s>l)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Ztt=function(e){var r=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[r,n,o]},Qtt=function(e){var r=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[r,n,o]},dre=function(e,r){return e==="v"?Gtt(r):Ktt(r)},hre=function(e,r){return e==="v"?Ztt(r):Qtt(r)},Jtt=function(e,r){return e==="h"&&r==="rtl"?-1:1},ert=function(e,r,n,o,a){var i=Jtt(e,window.getComputedStyle(r).direction),s=i*o,l=n.target,c=r.contains(l),u=!1,d=s>0,h=0,p=0;do{if(!l)break;var g=hre(e,l),y=g[0],x=g[1],w=g[2],k=x-w-i*y;(y||k)&&dre(e,l)&&(h+=k,p+=y);var C=l.parentNode;l=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!c&&l!==document.body||c&&(r.contains(l)||r===l));return(d&&Math.abs(h)<1||!d&&Math.abs(p)<1)&&(u=!0),u},w_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fre=function(e){return[e.deltaX,e.deltaY]},pre=function(e){return e&&"current"in e?e.current:e},trt=function(e,r){return e[0]===r[0]&&e[1]===r[1]},rrt=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},nrt=0,Nm=[];function ort(e){var r=E.useRef([]),n=E.useRef([0,0]),o=E.useRef(),a=E.useState(nrt++)[0],i=E.useState(sre)[0],s=E.useRef(e);E.useEffect(function(){s.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=Stt([e.lockRef.current],(e.shards||[]).map(pre)).filter(Boolean);return x.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=E.useCallback(function(x,w){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var k=w_(x),C=n.current,_="deltaX"in x?x.deltaX:C[0]-k[0],T="deltaY"in x?x.deltaY:C[1]-k[1],A,N=x.target,$=Math.abs(_)>Math.abs(T)?"h":"v";if("touches"in x&&$==="h"&&N.type==="range")return!1;var R=ure($,N);if(!R)return!0;if(R?A=$:(A=$==="v"?"h":"v",R=ure($,N)),!R)return!1;if(!o.current&&"changedTouches"in x&&(_||T)&&(o.current=A),!A)return!0;var M=o.current||A;return ert(M,w,x,M==="h"?_:T)},[]),c=E.useCallback(function(x){var w=x;if(!(!Nm.length||Nm[Nm.length-1]!==i)){var k="deltaY"in w?fre(w):w_(w),C=r.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&trt(A.delta,k)})[0];if(C&&C.should){w.cancelable&&w.preventDefault();return}if(!C){var _=(s.current.shards||[]).map(pre).filter(Boolean).filter(function(A){return A.contains(w.target)}),T=_.length>0?l(w,_[0]):!s.current.noIsolation;T&&w.cancelable&&w.preventDefault()}}},[]),u=E.useCallback(function(x,w,k,C){var _={name:x,delta:w,target:k,should:C,shadowParent:art(k)};r.current.push(_),setTimeout(function(){r.current=r.current.filter(function(T){return T!==_})},1)},[]),d=E.useCallback(function(x){n.current=w_(x),o.current=void 0},[]),h=E.useCallback(function(x){u(x.type,fre(x),x.target,l(x,e.lockRef.current))},[]),p=E.useCallback(function(x){u(x.type,w_(x),x.target,l(x,e.lockRef.current))},[]);E.useEffect(function(){return Nm.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Am),document.addEventListener("touchmove",c,Am),document.addEventListener("touchstart",d,Am),function(){Nm=Nm.filter(function(x){return x!==i}),document.removeEventListener("wheel",c,Am),document.removeEventListener("touchmove",c,Am),document.removeEventListener("touchstart",d,Am)}},[]);var g=e.removeScrollBar,y=e.inert;return E.createElement(E.Fragment,null,y?E.createElement(i,{styles:rrt(a)}):null,g?E.createElement(Wtt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function art(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const irt=Ott(ire,ort);var mre=E.forwardRef(function(e,r){return E.createElement(v_,ll({},e,{ref:r,sideCar:irt}))});mre.classNames=v_.classNames;function Mo(e){return Object.keys(e)}function srt(e){return e.replace(/[A-Z]/g,r=>`-${r.toLowerCase()}`)}function lrt(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function k_(e){const r=lrt(e);return typeof r=="number"?r:typeof r=="string"?r.includes("calc")||r.includes("var")?r:r.includes("px")?Number(r.replace("px","")):r.includes("rem")?Number(r.replace("rem",""))*16:r.includes("em")?Number(r.replace("em",""))*16:Number(r):NaN}function gre(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function yre(e,{shouldScale:r=!1}={}){function n(o){if(o===0||o==="0")return`0${e}`;if(typeof o=="number"){const a=`${o/16}${e}`;return r?gre(a):a}if(typeof o=="string"){if(o===""||o.startsWith("calc(")||o.startsWith("clamp(")||o.includes("rgba("))return o;if(o.includes(","))return o.split(",").map(i=>n(i)).join(",");if(o.includes(" "))return o.split(" ").map(i=>n(i)).join(" ");const a=o.replace("px","");if(!Number.isNaN(Number(a))){const i=`${Number(a)/16}${e}`;return r?gre(i):i}}return o}return n}const Fe=yre("rem",{shouldScale:!0});
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mie;function mct(){if(mie)return vR;mie=1;var e=Gr;function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,o=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(h,p){var g=p(),y=o({inst:{value:g,getSnapshot:p}}),x=y[0].inst,w=y[1];return i(function(){x.value=g,x.getSnapshot=p,c(x)&&w({inst:x})},[h,g,p]),a(function(){return c(x)&&w({inst:x}),h(function(){c(x)&&w({inst:x})})},[h]),s(g),g}function c(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!n(h,g)}catch{return!0}}function u(h,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return vR.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,vR}var gie;function gct(){return gie||(gie=1,pie.exports=mct()),pie.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yie;function yct(){if(yie)return bR;yie=1;var e=Gr,r=gct();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,a=r.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return bR.useSyncExternalStoreWithSelector=function(u,d,h,p,g){var y=i(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=l(function(){function k(N){if(!C){if(C=!0,_=N,N=p(N),g!==void 0&&x.hasValue){var $=x.value;if(g($,N))return T=$}return T=N}if($=T,o(_,N))return $;var R=p(N);return g!==void 0&&g($,R)?(_=N,$):(_=N,T=R)}var C=!1,_,T,A=h===void 0?null:h;return[function(){return k(d())},A===null?void 0:function(){return k(A())}]},[d,h,p,g]);var w=a(u,y[0],y[1]);return s(function(){x.hasValue=!0,x.value=w},[w]),c(w),w},bR}var bie;function bct(){return bie||(bie=1,fie.exports=yct()),fie.exports}var vie=bct();const vct=lae(vie);function xct(e,r=n=>n){return vie.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,r,wct)}function wct(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[o,a]of e)if(!r.has(o)||!Object.is(a,r.get(o)))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const o of e)if(!r.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(r,n[o])||!Object.is(e[n[o]],r[n[o]]))return!1;return!0}const xR=E.createContext(null);function kct(){return typeof document>"u"?xR:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=xR,xR)}function Ph(e){const r=E.useContext(kct());return e?.warn,r}function Ns(e){const r=Ph({warn:e?.router===void 0}),n=e?.router||r,o=E.useRef(void 0);return xct(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=oie(o.current,e.select(a));return o.current=i,i}return e.select(a)}return a})}const xie=E.createContext(void 0);E.createContext(void 0);function _ct(e){const r=Ns({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(hie,{getResetKey:()=>r,onCatch:(n,o)=>{var a;if(kE(n))(a=e.onCatch)==null||a.call(e,n,o);else throw n},errorComponent:({error:n})=>{var o;if(kE(n))return(o=e.fallback)==null?void 0:o.call(e,n);throw n},children:e.children})}function Ect(){return b.jsx("p",{children:"Not Found"})}function wR(e){return b.jsx(b.Fragment,{children:e.children})}function wie(e,r,n){return r.options.notFoundComponent?b.jsx(r.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{data:n}):b.jsx(Ect,{})}var kR,kie;function Sct(){if(kie)return kR;kie=1;const e={},r=e.hasOwnProperty,n=(R,M)=>{for(const O in R)r.call(R,O)&&M(O,R[O])},o=(R,M)=>(M&&n(M,(O,B)=>{R[O]=B}),R),a=(R,M)=>{const O=R.length;let B=-1;for(;++B<O;)M(R[B])},i=R=>"\\u"+("0000"+R).slice(-4),s=(R,M)=>{let O=R.toString(16);return M?O:O.toUpperCase()},l=e.toString,c=Array.isArray,u=R=>typeof Buffer=="function"&&Buffer.isBuffer(R),d=R=>l.call(R)=="[object Object]",h=R=>typeof R=="string"||l.call(R)=="[object String]",p=R=>typeof R=="number"||l.call(R)=="[object Number]",g=R=>typeof R=="bigint",y=R=>typeof R=="function",x=R=>l.call(R)=="[object Map]",w=R=>l.call(R)=="[object Set]",k={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},C=/[\\\b\f\n\r\t]/,_=/[0-9]/,T=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,A=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,N=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,$=(R,M)=>{const O=()=>{U=L,++M.indentLevel,L=M.indent.repeat(M.indentLevel)},B={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},I=M&&M.json;I&&(B.quotes="double",B.wrap=!0),M=o(B,M),M.quot
`;let J,Q=!0;const z=M.numbers=="binary",W=M.numbers=="octal",G=M.numbers=="decimal",Z=M.numbers=="hexadecimal";if(I&&R&&y(R.toJSON)&&(R=R.toJSON()),!h(R)){if(x(R))return R.size==0?"new Map()":(D||(M.__inline1__=!0,M.__inline2__=!1),"new Map("+$(Array.from(R),M)+")");if(w(R))return R.size==0?"new Set()":"new Set("+$(Array.from(R),M)+")";if(u(R))return R.length==0?"Buffer.from([])":"Buffer.from("+$(Array.from(R),M)+")";if(c(R))return J=[],M.wrap=!0,q&&(M.__inline1__=!1,M.__inline2__=!0),X||O(),a(R,ee=>{Q=!1,X&&(M.__inline2__=!1),J.push((D||X?"":L)+$(ee,M))}),Q?"[]":X?"["+J.join(", ")+"]":"["+F+J.join(","+F)+F+(D?"":U)+"]";if(p(R)||g(R)){if(I)return JSON.stringify(Number(R));let ee;if(G)ee=String(R);else if(Z){let re=R.toString(16);V||(re=re.toUpperCase()),ee="0x"+re}else z?ee="0b"+R.toString(2):W&&(ee="0o"+R.toString(8));return g(R)?ee+"n":ee}else return g(R)?I?JSON.stringify(Number(R)):R+"n":d(R)?(J=[],M.wrap=!0,O(),n(R,(ee,re)=>{Q=!1,J.push((D?"":L)+$(ee,M)+":"+(D?"":" ")+$(re,M))}),Q?"{}":"{"+F+J.join(","+F)+F+(D?"":U)+"}"):I?JSON.stringify(R)||"null":String(R)}const oe=M.escapeEverything?A:N;return J=R.replace(oe,(ee,re,he,Ce,ce,de)=>{if(re){if(M.minimal)return re;const De=re.charCodeAt(0),Ge=re.charCodeAt(1);if(M.es6){const Xe=(De-55296)*1024+Ge-56320+65536;return"\\u{"+s(Xe,V)+"}"}return i(s(De,V))+i(s(Ge,V))}if(he)return i(s(he.charCodeAt(0),V));if(ee=="\0"&&!I&&!_.test(de.charAt(ce+1)))return"\\0";if(Ce)return Ce==Y||M.escapeEverything?"\\"+Ce:Ce;if(C.test(ee))return k[ee];if(M.minimal&&!T.test(ee))return ee;const be=s(ee.charCodeAt(0),V);return I||be.length>2?i(be):"\\x"+("00"+be).slice(-2)}),Y=="`"&&(J=J.replace(/\$\{/g,"\\${")),M.isScriptContext&&(J=J.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,I?"\\u003C!--":"\\x3C!--")),M.wrap&&(J=Y+J+Y),J};return $.version="3.0.2",kR=$,kR}Sct();function Cct({children:e,log:r}){return typeof document<"u"?null:b.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[e,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
`)}})}function Tct(){const e=Ph(),r=(e.options.getScrollRestorationKey||uie)(e.latestLocation),n=r!==uie(e.latestLocation)?r:null;return!e.isScrollRestoring||!e.isServer?null:b.jsx(Cct,{children:`(${uct.toString()})(${JSON.stringify(lie)},${JSON.stringify(n)}, undefined, true)`,log:!1})}const Act=E.memo(function({matchId:e}){var r,n;const o=Ph(),a=Ns({select:w=>{var k;return(k=w.matches.find(C=>C.id===e))==null?void 0:k.routeId}});vE(a);const i=o.routesById[a],s=i.options.pendingComponent??o.options.defaultPendingComponent,l=s?b.jsx(s,{}):null,c=i.options.errorComponent??o.options.defaultErrorComponent,u=i.options.onCatch??o.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??((r=o.options.notFoundRoute)==null?void 0:r.options.component):i.options.notFoundComponent,h=(!i.isRoot||i.options.wrapInSuspense)&&(i.options.wrapInSuspense??s??((n=i.options.errorComponent)==null?void 0:n.preload))?E.Suspense:wR,p=c?hie:wR,g=d?_ct:wR,y=Ns({select:w=>w.loadedAt}),x=Ns({select:w=>{var k;const C=w.matches.findIndex(_=>_.id===e);return(k=w.matches[C-1])==null?void 0:k.routeId}});return b.jsxs(b.Fragment,{children:[b.jsx(xie.Provider,{value:e,children:b.jsx(h,{fallback:l,children:b.jsx(p,{getResetKey:()=>y,errorComponent:c||yR,onCatch:(w,k)=>{if(kE(w))throw w;u?.(w,k)},children:b.jsx(g,{fallback:w=>{if(!d||w.routeId&&w.routeId!==a||!w.routeId&&!i.isRoot)throw w;return E.createElement(d,w)},children:b.jsx(Rct,{matchId:e})})})})}),x===die&&o.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(Nct,{}),b.jsx(Tct,{})]}):null]})});function Nct(){var e;const r=Ph(),n=E.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:o=>{var a;o&&(n.current===void 0||n.current.href!==((a=r.state.resolvedLocation)==null?void 0:a.href))&&(r.emit({type:"onRendered",...hct(r.state)}),n.current=r.state.resolvedLocation)}},(e=r.state.resolvedLocation)==null?void 0:e.state.key)}const Rct=E.memo(function({matchId:e}){var r,n,o;const a=Ph(),{match:i,key:s,routeId:l}=Ns({select:h=>{const p=h.matches.findIndex(k=>k.id===e),g=h.matches[p],y=g.routeId,x=a.routesById[y].options.remountDeps??a.options.defaultRemountDeps,w=x?.({routeId:y,loaderDeps:g.loaderDeps,params:g._strictParams,search:g._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:y,match:sct(g,["id","status","error"])}},structuralSharing:!0}),c=a.routesById[l],u=E.useMemo(()=>{const h=c.options.component??a.options.defaultComponent;return h?b.jsx(h,{},s):b.jsx($ct,{})},[s,c.options.component,a.options.defaultComponent]),d=(c.options.errorComponent??a.options.defaultErrorComponent)||yR;if(i.status==="notFound")return vE(kE(i.error)),wie(a,c,i.error);if(i.status==="redirected")throw vE(dct(i.error)),(r=a.getMatch(i.id))==null?void 0:r.loadPromise;if(i.status==="error"){if(a.isServer)return b.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}});throw i.error}if(i.status==="pending"){const h=c.options.pendingMinMs??a.options.defaultPendingMinMs;if(h&&!((n=a.getMatch(i.id))!=null&&n.minPendingPromise)&&!a.isServer){const p=lct();Promise.resolve().then(()=>{a.updateMatch(i.id,g=>({...g,minPendingPromise:p}))}),setTimeout(()=>{p.resolve(),a.updateMatch(i.id,g=>({...g,minPendingPromise:void 0}))},h)}throw(o=a.getMatch(i.id))==null?void 0:o.loadPromise}return u}),$ct=E.memo(function(){const e=Ph(),r=E.useContext(xie),n=Ns({select:c=>{var u;return(u=c.matches.find(d=>d.id===r))==null?void 0:u.routeId}}),o=e.routesById[n],a=Ns({select:c=>{const u=c.matches.find(d=>d.id===r);return vE(u),u.globalNotFound}}),i=Ns({select:c=>{var u;const d=c.matches,h=d.findIndex(p=>p.id===r);return(u=d[h+1])==null?void 0:u.id}});if(a)return wie(e,o,void 0);if(!i)return null;const s=b.jsx(Act,{matchId:i}),l=e.options.defaultPendingComponent?b.jsx(e.options.defaultPendingComponent,{}):null;return r===die?b.jsx(E.Suspense,{fallback:l,children:s}):s}),Pct=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Mct(e,r,n={},o={}){const a=E.useRef(typeof IntersectionObserver=="function"),i=E.useRef(null);return E.useEffect(()=>{if(!(!e.current||!a.current||o.disabled))return i.current=n
`).replace(`
`,`
+`).split(`
`)),u=c.reduce((d,h)=>d.concat(...h),[]);return[c,u]}return[[],[]]},[e]);return E.useEffect(()=>{const c=r?.target??gle,u=r?.actInsideInputWithModifier??!0;if(e!==null){const d=g=>{if(a.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!a.current||a.current&&!u)&&Mse(g))return!1;const y=ble(g.code,l);if(i.current.add(g[y]),yle(s,i.current,!1)){const x=g.composedPath?.()?.[0]||g.target,w=x?.nodeName==="BUTTON"||x?.nodeName==="A";r.preventDefault!==!1&&(a.current||!w)&&g.preventDefault(),o(!0)}},h=g=>{const y=ble(g.code,l);yle(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(g[y]),g.key==="Meta"&&i.current.clear(),a.current=!1},p=()=>{i.current.clear(),o(!1)};return c?.addEventListener("keydown",d),c?.addEventListener("keyup",h),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c?.removeEventListener("keydown",d),c?.removeEventListener("keyup",h),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function yle(e,r,n){return e.filter(o=>n||o.length===r.size).some(o=>o.every(a=>r.has(a)))}function ble(e,r){return r.includes(e)?"code":"key"}const Fpt=()=>{const e=zr();return E.useMemo(()=>({zoomIn:r=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomOut:r=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:r?.duration}):Promise.resolve(!1)},zoomTo:(r,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(r,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(r,n)=>{const{transform:[o,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:r.x??o,y:r.y??a,zoom:r.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[r,n,o]=e.getState().transform;return{x:r,y:n,zoom:o}},setCenter:async(r,n,o)=>e.getState().setCenter(r,n,o),fitBounds:async(r,n)=>{const{width:o,height:a,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),c=VR(r,o,a,i,s,n?.padding??.1);return l?(await l.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(r,n={})=>{const{transform:o,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return r;const{x:l,y:c}=s.getBoundingClientRect(),u={x:r.x-l,y:r.y-c},d=n.snapGrid??a,h=n.snapToGrid??i;return xb(u,o,h,d)},flowToScreenPosition:r=>{const{transform:n,domNode:o}=e.getState();if(!o)return r;const{x:a,y:i}=o.getBoundingClientRect(),s=GE(r,n);return{x:s.x+a,y:s.y+i}}}),[])};function vle(e,r){const n=[],o=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const s=o.get(i.id);s?s.push(i):o.set(i.id,[i])}for(const i of r){const s=o.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const c of s)Hpt(c,l);n.push(l)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function Hpt(e,r){switch(e.type){case"select":{r.selected=e.selected;break}case"position":{typeof e.position<"u"&&(r.position=e.position),typeof e.dragging<"u"&&(r.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(r.measured??={},r.measured.width=e.dimensions.width,r.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(r.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(r.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(r.resizing=e.resizing);break}}}function Upt(e,r){return vle(e,r)}function Vpt(e,r){return vle(e,r)}function jh(e,r){return{id:e,type:"select",selected:r}}function og(e,r=new Set,n=!1){const o=[];for(const[a,i]of e){const s=r.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),o.push(jh(i.id,s)))}return o}function xle({items:e=[],lookup:r}){const n=[],o=new Map(e.map(a=>[a.id,a]));for(const[a,i]of e.entries()){const s=r.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}sce.displayName="MiniMap",E.memo(sce);const $gt=e=>r=>e?`${Math.max(1/r.transform[2],1)}`:void 0,Pgt={[ng.Line]:"right",[ng.Handle]:"bottom-right"};function Mgt({nodeId:e,position:r,variant:n=ng.Handle,className:o,style:a=void 0,children:i,color:s,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:p,autoScale:g=!0,shouldResize:y,onResizeStart:x,onResize:w,onResizeEnd:k}){const C=Nle(),_=typeof e=="string"?e:C,T=zr(),A=E.useRef(null),N=n===ng.Handle,$=tr(E.useCallback($gt(N&&g),[N,g]),qr),R=E.useRef(null),M=r??Pgt[n];E.useEffect(()=>{if(!(!A.current||!_))return R.current||(R.current=gpt({domNode:A.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:B,transform:I,snapGrid:Y,snapToGrid:D,nodeOrigin:V,domNode:L}=T.getState();return{nodeLookup:B,transform:I,snapGrid:Y,snapToGrid:D,nodeOrigin:V,paneDomNode:L}},onChange:(B,I)=>{const{triggerNodeChanges:Y,nodeLookup:D,parentLookup:V,nodeOrigin:L}=T.getState(),U=[],q={x:B.x,y:B.y},X=D.get(_);if(X&&X.expandParent&&X.parentId){const F=X.origin??L,J=B.width??X.measured.width??0,Q=B.height??X.measured.height??0,z={id:X.id,parentId:X.parentId,rect:{width:J,height:Q,...Rse({x:B.x??X.position.x,y:B.y??X.position.y},{width:J,height:Q},X.parentId,D,F)}},W=QR([z],D,V,L);U.push(...W),q.x=B.x?Math.max(F[0]*J,B.x):void 0,q.y=B.y?Math.max(F[1]*Q,B.y):void 0}if(q.x!==void 0&&q.y!==void 0){const F={id:_,type:"position",position:{...q}};U.push(F)}if(B.width!==void 0&&B.height!==void 0){const F={id:_,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};U.push(F)}for(const F of I){const J={...F,type:"position"};U.push(J)}Y(U)},onEnd:({width:B,height:I})=>{const Y={id:_,type:"dimensions",resizing:!1,dimensions:{width:B,height:I}};T.getState().triggerNodeChanges([Y])}})),R.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:h,resizeDirection:p,onResizeStart:x,onResize:w,onResizeEnd:k,shouldResize:y}),()=>{R.current?.destroy()}},[M,l,c,u,d,h,x,w,k,y]);const O=M.split("-");return b.jsx("div",{className:Sn(["react-flow__resize-control","nodrag",...O,n,o]),ref:A,style:{...a,scale:$,...s&&{[N?"backgroundColor":"borderColor"]:s}},children:i})}E.memo(Mgt);var Ogt=Object.getOwnPropertyNames,Dgt=Object.getOwnPropertySymbols,Lgt=Object.prototype.hasOwnProperty;function lce(e,r){return function(n,o,a){return e(n,o,a)&&r(n,o,a)}}function s5(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);var a=o.cache,i=a.get(r),s=a.get(n);if(i&&s)return i===n&&s===r;a.set(r,n),a.set(n,r);var l=e(r,n,o);return a.delete(r),a.delete(n),l}}function cce(e){return Ogt(e).concat(Dgt(e))}var Igt=Object.hasOwn||(function(e,r){return Lgt.call(e,r)});function Bh(e,r){return e===r||!e&&!r&&e!==e&&r!==r}var zgt="__v",jgt="__o",Bgt="_owner",uce=Object.getOwnPropertyDescriptor,dce=Object.keys;function Fgt(e,r,n){var o=e.length;if(r.length!==o)return!1;for(;o-- >0;)if(!n.equals(e[o],r[o],o,o,e,r,n))return!1;return!0}function Hgt(e,r){return Bh(e.getTime(),r.getTime())}function Ugt(e,r){return e.name===r.name&&e.message===r.message&&e.cause===r.cause&&e.stack===r.stack}function Vgt(e,r){return e===r}function hce(e,r,n){var o=e.size;if(o!==r.size)return!1;if(!o)return!0;for(var a=new Array(o),i=e.entries(),s,l,c=0;(s=i.next())&&!s.done;){for(var u=r.entries(),d=!1,h=0;(l=u.next())&&!l.done;){if(a[h]){h++;continue}var p=s.value,g=l.value;if(n.equals(p[0],g[0],c,h,e,r,n)&&n.equals(p[1],g[1],p[0],g[0],e,r,n)){d=a[h]=!0;break}h++}if(!d)return!1;c++}return!0}var qgt=Bh;function Ygt(e,r,n){var o=dce(e),a=o.length;if(dce(r).length!==a)return!1;for(;a-- >0;)if(!pce(e,r,n,o[a]))return!1;return!0}function Sb(e,r,n){var o=cce(e),a=o.length;if(cce(r).length!==a)return!1;for(var i,s,l;a-- >0;)if(i=o[a],!pce(e,r,n,i)||(s=uce(e,i),l=uce(r,i),(s||l)&&(!s||!l||s.configurable!==l.configurable||s.enumerable!==l.enu
* @license
*
* The APCA contrast prediction algorithm is based of the formulas published
* in the APCA-1.0.98G specification by Myndex. The specification is available at:
* https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg
*
* Note that the APCA implementation is still beta, so please update to
* future versions of chroma.js when they become available.
*
* You can read more about the APCA Readability Criterion at
* https://readtech.org/ARC/
*/const Dce=.027,j1t=5e-4,B1t=.1,Lce=1.14,h5=.022,Ice=1.414,F1t=(e,r)=>{e=new Be(e),r=new Be(r),e.alpha()<1&&(e=sg(r,e,e.alpha(),"rgb"));const n=zce(...e.rgb()),o=zce(...r.rgb()),a=n>=h5?n:n+Math.pow(h5-n,Ice),i=o>=h5?o:o+Math.pow(h5-o,Ice),s=Math.pow(i,.56)-Math.pow(a,.57),l=Math.pow(i,.65)-Math.pow(a,.62),c=Math.abs(i-a)<j1t?0:a<i?s*Lce:l*Lce;return(Math.abs(c)<B1t?0:c>0?c-Dce:c+Dce)*100};function zce(e,r,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(r/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:wc,pow:Cn,min:H1t,max:U1t,atan2:jce,abs:Bce,cos:f5,sin:Fce,exp:V1t,PI:Hce}=Math;function q1t(e,r,n=1,o=1,a=1){var i=function(Q){return 360*Q/(2*Hce)},s=function(Q){return 2*Hce*Q/360};e=new Be(e),r=new Be(r);const[l,c,u]=Array.from(e.lab()),[d,h,p]=Array.from(r.lab()),g=(l+d)/2,y=wc(Cn(c,2)+Cn(u,2)),x=wc(Cn(h,2)+Cn(p,2)),w=(y+x)/2,k=.5*(1-wc(Cn(w,7)/(Cn(w,7)+Cn(25,7)))),C=c*(1+k),_=h*(1+k),T=wc(Cn(C,2)+Cn(u,2)),A=wc(Cn(_,2)+Cn(p,2)),N=(T+A)/2,$=i(jce(u,C)),R=i(jce(p,_)),M=$>=0?$:$+360,O=R>=0?R:R+360,B=Bce(M-O)>180?(M+O+360)/2:(M+O)/2,I=1-.17*f5(s(B-30))+.24*f5(s(2*B))+.32*f5(s(3*B+6))-.2*f5(s(4*B-63));let Y=O-M;Y=Bce(Y)<=180?Y:O<=M?Y+360:Y-360,Y=2*wc(T*A)*Fce(s(Y)/2);const D=d-l,V=A-T,L=1+.015*Cn(g-50,2)/wc(20+Cn(g-50,2)),U=1+.045*N,q=1+.015*N*I,X=30*V1t(-Cn((B-275)/25,2)),F=-(2*wc(Cn(N,7)/(Cn(N,7)+Cn(25,7))))*Fce(2*s(X)),J=wc(Cn(D/(n*L),2)+Cn(V/(o*U),2)+Cn(Y/(a*q),2)+F*(V/(o*U))*(Y/(a*q)));return U1t(0,H1t(100,J))}function Y1t(e,r,n="lab"){e=new Be(e),r=new Be(r);const o=e.get(n),a=r.get(n);let i=0;for(let s in o){const l=(o[s]||0)-(a[s]||0);i+=l*l}return Math.sqrt(i)}const W1t=(...e)=>{try{return new Be(...e),!0}catch{return!1}},X1t={cool(){return d5([Zt.hsl(180,1,.9),Zt.hsl(250,.7,.4)])},hot(){return d5(["#000","#f00","#ff0","#fff"]).mode("rgb")}},S$={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8
* @version 1.4.0
* @date 2015-10-26
* @stability 3 - Stable
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
* @license MIT License
*/var e=function(r,n){var o,a,i=1,s=0,l=0,c=String.alphabet;function u(d,h,p){if(p){for(o=h;p=u(d,o),p<76&&p>65;)++o;return+d.slice(h-1,o)}return p=c&&c.indexOf(d.charAt(h)),p>-1?p+76:(p=d.charCodeAt(h)||0,p<45||p>127?p:p<46?65:p<48?p-1:p<58?p+18:p<65?p-11:p<91?p+11:p<97?p-37:p<123?p+5:p-63)}if((r+="")!=(n+="")){for(;i;)if(a=u(r,s++),i=u(n,l++),a<76&&i<76&&a>66&&i>66&&(a=u(r,s,s),i=u(n,l,s=o),l=o),a!=i)return a<i?-1:1}return 0};try{R$.exports=e}catch{String.naturalCompare=e}return R$.exports}cyt();let Tb=class{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}};Tb.prototype.normal={},Tb.prototype.property={},Tb.prototype.space=void 0;function sue(e,r){const n={},o={};for(const a of e)Object.assign(n,a.property),Object.assign(o,a.normal);return new Tb(n,o,r)}function Ab(e){return e.toLowerCase()}let da=class{constructor(e,r){this.attribute=r,this.property=e}};da.prototype.attribute="",da.prototype.booleanish=!1,da.prototype.boolean=!1,da.prototype.commaOrSpaceSeparated=!1,da.prototype.commaSeparated=!1,da.prototype.defined=!1,da.prototype.mustUseProperty=!1,da.prototype.number=!1,da.prototype.overloadedBoolean=!1,da.prototype.property="",da.prototype.spaceSeparated=!1,da.prototype.space=void 0;let uyt=0;const It=Hh(),An=Hh(),lue=Hh(),Ve=Hh(),Sr=Hh(),pg=Hh(),Ia=Hh();function Hh(){return 2**++uyt}const $$=Object.freeze(Object.defineProperty({__proto__:null,boolean:It,booleanish:An,commaOrSpaceSeparated:Ia,commaSeparated:pg,number:Ve,overloadedBoolean:lue,spaceSeparated:Sr},Symbol.toStringTag,{value:"Module"})),P$=Object.keys($$);let M$=class extends da{constructor(e,r,n,o){let a=-1;if(super(e,r),cue(this,"space",o),typeof n=="number")for(;++a<P$.length;){const i=P$[a];cue(this,P$[a],(n&$$[i])===$$[i])}}};M$.prototype.defined=!0;function cue(e,r,n){n&&(e[r]=n)}function mg(e){const r={},n={};for(const[o,a]of Object.entries(e.properties)){const i=new M$(o,e.transform(e.attributes||{},o),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(i.mustUseProperty=!0),r[o]=i,n[Ab(o)]=o,n[Ab(i.attribute)]=o}return new Tb(r,n,e.space)}const uue=mg({properties:{ariaActiveDescendant:null,ariaAtomic:An,ariaAutoComplete:null,ariaBusy:An,ariaChecked:An,ariaColCount:Ve,ariaColIndex:Ve,ariaColSpan:Ve,ariaControls:Sr,ariaCurrent:null,ariaDescribedBy:Sr,ariaDetails:null,ariaDisabled:An,ariaDropEffect:Sr,ariaErrorMessage:null,ariaExpanded:An,ariaFlowTo:Sr,ariaGrabbed:An,ariaHasPopup:null,ariaHidden:An,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sr,ariaLevel:Ve,ariaLive:null,ariaModal:An,ariaMultiLine:An,ariaMultiSelectable:An,ariaOrientation:null,ariaOwns:Sr,ariaPlaceholder:null,ariaPosInSet:Ve,ariaPressed:An,ariaReadOnly:An,ariaRelevant:null,ariaRequired:An,ariaRoleDescription:Sr,ariaRowCount:Ve,ariaRowIndex:Ve,ariaRowSpan:Ve,ariaSelected:An,ariaSetSize:Ve,ariaSort:null,ariaValueMax:Ve,ariaValueMin:Ve,ariaValueNow:Ve,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function due(e,r){return r in e?e[r]:r}function hue(e,r){return due(e,r.toLowerCase())}const dyt=mg({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pg,acceptCharset:Sr,accessKey:Sr,action:null,allow:null,allowFullScreen:It,allowPaymentRequest:It,allowUserMedia:It,alt:null,as:null,async:It,autoCapitalize:null,autoComplete:Sr,autoFocus:It,autoPlay:It,blocking:Sr,capture:null,charSet:null,checked:It,cite:null,className:Sr,cols:Ve,colSpan:null,content:null,contentEditable:An,controls:It,controlsList:Sr,coords:Ve|pg,crossOrigin:null,data:null,dateTime:null,decoding:null,default:It,defer:It,dir:null,dirName:null,disabled:It,download:lue,draggable:An,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:It,formTarget:null,headers:Sr,height:Ve,hidden:It,high:Ve,href:null,hrefLang:null,htmlFor:Sr,httpEquiv:Sr,id:null,imageSizes:null,imageSrcSet:null,inert:It,inputMode:null,integrity:nu
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Wbt(e,r,n,o){const a=o.schema,i=a.space==="svg"?!1:o.settings.omitOptionalTags;let s=a.space==="svg"?o.settings.closeEmptyElements:o.settings.voids.includes(e.tagName.toLowerCase());const l=[];let c;a.space==="html"&&e.tagName==="svg"&&(o.schema=bue);const u=Xbt(o,e.properties),d=o.all(a.space==="html"&&e.tagName==="template"?e.content:e);return o.schema=a,d&&(s=!1),(u||!i||!Fbt(e,r,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(a.space==="svg"||o.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!o.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(d),!s&&(!i||!Y$(e,r,n))&&l.push("</"+e.tagName+">"),l.join("")}function Xbt(e,r){const n=[];let o=-1,a;if(r){for(a in r)if(r[a]!==null&&r[a]!==void 0){const i=Gbt(e,a,r[a]);i&&n.push(i)}}for(;++o<n.length;){const i=e.settings.tightAttributes?n[o].charAt(n[o].length-1):void 0;o!==n.length-1&&i!=='"'&&i!=="'"&&(n[o]+=" ")}return n.join("")}function Gbt(e,r,n){const o=yue(e.schema,r),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let s=e.quote,l;if(o.overloadedBoolean&&(n===o.attribute||n==="")?n=!0:(o.boolean||o.overloadedBoolean)&&(typeof n!="string"||n===o.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=vg(o.attribute,Object.assign({},e.settings.characterReferences,{subset:v5.name[a][i]}));return n===!0||(n=Array.isArray(n)?(o.commaSeparated?xue:_ue)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(l=vg(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:v5.unquoted[a][i]}))),l!==n&&(e.settings.quoteSmart&&Kue(n,s)>Kue(n,e.alternative)&&(s=e.alternative),l=s+vg(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?v5.single:v5.double)[a][i],attribute:!0}))+s),c+(l&&"="+l))}const Kbt=["<","&"];function nde(e,r,n,o){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:vg(e.value,Object.assign({},o.settings.characterReferences,{subset:Kbt}))}function Zbt(e,r,n,o){return o.settings.allowDangerousHtml?e.value:nde(e,r,n,o)}function Qbt(e,r,n,o){return o.all(e)}zue("type",{invalid:Jbt,unknown:evt,handlers:{comment:Ebt,doctype:Sbt,element:Wbt,raw:Zbt,root:Qbt,text:nde}});function Jbt(e){throw new Error("Expected node, not `"+e+"`")}function evt(e){const r=e;throw new Error("Cannot compile unknown node `"+r.type+"`")}const Rb=x5(/[A-Za-z]/),X$=x5(/[\dA-Za-z]/);function tvt(e){return e!==null&&(e<32||e===127)}function xg(e){return e!==null&&(e<0||e===32)}const ode=x5(new RegExp("\\p{P}|\\p{S}","u")),$b=x5(/\s/);function x5(e){return r;function r(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}Wue(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rvt(e,r,n,o){const a=e.length;let i=0,s;if(r<0?r=-r>a?0:a+r:r=r>a?a:r,n=n>0?n:0,o.length<1e4)s=Array.from(o),s.unshift(r,n),e.splice(...s);else for(n&&e.splice(r,n);i<o.length;)s=o.slice(i,i+1e4),s.unshift(r,0),e.splice(...s),i+=1e4,r+=1e4}const nvt={tokenize:lvt,partial:!0},ade={tokenize:cvt,partial:!0},ide={tokenize:uvt,partial:!0},sde={tokenize:dvt,partial:!0},ovt={tokenize:hvt,partial:!0},lde={name:"wwwAutolink",tokenize:ivt,previous:ude},cde={name:"protocolAutolink",tokenize:svt,previous:dde},_c={name:"emailAutolink",tokenize:avt,previous:hde},Ec={};let qh=48;for(;qh<123;)Ec[qh]=_c,qh++,qh===58?qh=65:qh===91&&(qh=97);Ec[43]=_c,Ec[45]=_c,Ec[46]=_c,Ec[95]=_c,Ec[72]=[_c,cde],Ec[104]=[_c,cde],Ec[87]=[_c,lde],Ec[119]=[_c,lde];function avt(e,r,n){const o=this;let a,i;return s;function s(h){return!G$(h)||!hde.call(o,o.previous)||K$(o.events)?n(h):(e.enter("literalAutolink"),e.ente
`).filter(i=>i),o=Math.min(...n.map(i=>i.length-i.trimStart().length)),a=n.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of a)this.content.push(i)}compile(){const r=Function,n=this?.args,o=[...(this?.content??[""]).map(a=>` ${a}`)];return new r(...n,o.join(`
`))}}const s3t={major:4,minor:0,patch:0},en=Pe("$ZodType",(e,r)=>{var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=s3t;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const a of o)for(const i of a._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(i,s,l)=>{let c=Bb(i),u;for(const d of s){if(d._zod.def.when){if(!d._zod.def.when(i))continue}else if(c)continue;const h=i.issues.length,p=d._zod.check(i);if(p instanceof Promise&&l?.async===!1)throw new Ib;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,i.issues.length!==h&&(c||(c=Bb(i,h)))});else{if(i.issues.length===h)continue;c||(c=Bb(i,h))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{const l=e._zod.parse(i,s);if(l instanceof Promise){if(s.async===!1)throw new Ib;return l.then(c=>a(c,o,s))}return a(l,o,s)}}e["~standard"]={validate:a=>{try{const i=_wt(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ewt(e,a).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),N5=Pe("$ZodString",(e,r)=>{en.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ywt(e._zod.bag),e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Br=Pe("$ZodStringFormat",(e,r)=>{A5.init(e,r),N5.init(e,r)}),l3t=Pe("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=Pwt),Br.init(e,r)}),c3t=Pe("$ZodUUID",(e,r)=>{if(r.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(n===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=pfe(n))}else r.pattern??(r.pattern=pfe());Br.init(e,r)}),u3t=Pe("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Mwt),Br.init(e,r)}),d3t=Pe("$ZodURL",(e,r)=>{Br.init(e,r),e._zod.check=n=>{try{const o=n.value,a=new URL(o),i=a.href;r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Fwt.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),!o.endsWith("/")&&i.endsWith("/")?n.value=i.slice(0,-1):n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),h3t=Pe("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Dwt()),Br.init(e,r)}),f3t=Pe("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=Rwt),Br.init(e,r)}),p3t=Pe("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Swt),Br.init(e,r)}),m3t=Pe("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Cwt),Br.init(e,r)}),g3t=Pe("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Twt),Br.init(e,r)}),y3t=Pe("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Awt),Br.init(e,r)}),b3t=Pe("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Nwt),Br.init(e,r)}),v3t=Pe("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=qwt(r)),Br.init(e,r)}),x3t=Pe("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Uwt),Br.init(e,r)}),w3t=Pe("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=Vwt(r)),Br.init(e,r)}),k3t=Pe("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=$wt),Br.init(e,r)}),_3t=Pe("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=Lwt),Br.init(e,r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format="ipv4"})}),E3t=Pe("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Iwt),Br.init(e,r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),S3t=Pe("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=zwt),Br.init(e,r)}),C3t=Pe("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=jwt),Br.init(e,r),e._zod.check=n=>{const[o,a]=n.value.split("/");try{if(!a)throw new Error;const i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Err
if (${C}.issues.length) {
if (input[${_}] === undefined) {
if (${_} in input) {
newResult[${_}] = undefined;
}
} else {
payload.issues = payload.issues.concat(
${C}.issues.map((iss) => ({
...iss,
path: iss.path ? [${_}, ...iss.path] : [${_}],
}))
);
}
} else if (${C}.value === undefined) {
if (${_} in input) newResult[${_}] = undefined;
} else {
newResult[${_}] = ${C}.value;
}
`)}else{const C=y[k];h.write(`const ${C} = ${g(k)};`),h.write(`
if (${C}.issues.length) payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
...iss,
path: iss.path ? [${zb(k)}, ...iss.path] : [${zb(k)}]
})));`),h.write(`newResult[${zb(k)}] = ${C}.value`)}h.write("payload.value = newResult;"),h.write("return payload;");const w=h.compile();return(k,C)=>w(d,k,C)};let a;const i=dM,s=!afe.jitless,l=s&&dwt.value,c=r.catchall;let u;e._zod.parse=(d,h)=>{u??(u=n.value);const p=d.value;if(!i(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;const g=[];if(s&&l&&h?.async===!1&&h.jitless!==!0)a||(a=o(r.shape)),d=a(d,h);else{d.value={};const C=u.shape;for(const _ of u.keys){const T=C[_],A=T._zod.run({value:p[_],issues:[]},h),N=T._zod.optin==="optional"&&T._zod.optout==="optional";A instanceof Promise?g.push(A.then($=>N?wfe($,d,_,p):R5($,d,_))):N?wfe(A,d,_,p):R5(A,d,_)}}if(!c)return g.length?Promise.all(g).then(()=>d):d;const y=[],x=u.keySet,w=c._zod,k=w.def.type;for(const C of Object.keys(p)){if(x.has(C))continue;if(k==="never"){y.push(C);continue}const _=w.run({value:p[C],issues:[]},h);_ instanceof Promise?g.push(_.then(T=>R5(T,d,C))):R5(_,d,C)}return y.length&&d.issues.push({code:"unrecognized_keys",keys:y,input:p,inst:e}),g.length?Promise.all(g).then(()=>d):d}});function kfe(e,r,n,o){for(const a of e)if(a.issues.length===0)return r.value=a.value,r;return r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(a=>a.issues.map(i=>Zh(i,o,Gh())))}),r}const I3t=Pe("$ZodUnion",(e,r)=>{en.init(e,r),jr(e._zod,"optin",()=>r.options.some(n=>n._zod.optin==="optional")?"optional":void 0),jr(e._zod,"optout",()=>r.options.some(n=>n._zod.optout==="optional")?"optional":void 0),jr(e._zod,"values",()=>{if(r.options.every(n=>n._zod.values))return new Set(r.options.flatMap(n=>Array.from(n._zod.values)))}),jr(e._zod,"pattern",()=>{if(r.options.every(n=>n._zod.pattern)){const n=r.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>cM(o.source)).join("|")})$`)}}),e._zod.parse=(n,o)=>{let a=!1;const i=[];for(const s of r.options){const l=s._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)i.push(l),a=!0;else{if(l.issues.length===0)return l;i.push(l)}}return a?Promise.all(i).then(s=>kfe(s,n,e,o)):kfe(i,n,e,o)}}),z3t=Pe("$ZodIntersection",(e,r)=>{en.init(e,r),e._zod.parse=(n,o)=>{const a=n.value,i=r.left._zod.run({value:a,issues:[]},o),s=r.right._zod.run({value:a,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>_fe(n,l,c)):_fe(n,i,s)}});function mM(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(hM(e)&&hM(r)){const n=Object.keys(r),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...r};for(const i of o){const s=mM(e[i],r[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};a[i]=s.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const a=e[o],i=r[o],s=mM(a,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function _fe(e,r,n){if(r.issues.length&&e.issues.push(...r.issues),n.issues.length&&e.issues.push(...n.issues),Bb(e))return e;const o=mM(r.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const j3t=Pe("$ZodEnum",(e,r)=>{en.init(e,r);const n=cwt(r.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(o=>hwt.has(typeof o)).map(o=>typeof o=="string"?jb(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const i=o.value;return e._zod.values.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),B3t=Pe("$ZodLiteral",(e,r)=>{en.init(e,r),e._zod.values=new Set(r.values),e._zod.pattern=new RegExp(`^(${r.values.map(n=>typeof n=="string"?jb(n):n?n.toString():String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const a=n.value;return e._zod.values.has(a)||n.issues.push({code:"invalid_value",values:r.values,input:a,inst:e}),n}}),Efe=Pe("$ZodTransform",(e,r)=>{en.init(e,r),e._zod.parse=(n,o)=>{const a=r.transform(n.value,n
:host {
display: block;
position: relative;
background-color: transparent;
width: 100%;
height: 100%;
box-sizing: border-box;
overflow: hidden;
border: 0px solid transparent;
padding: 0;
}`;r!==this.lastHostCss&&(this.hostCss?.replaceSync(r),this.lastHostCss=r)}connectedCallback(){this.lastHostCss="",this.hostCss=new CSSStyleSheet,this.updateHostCss(),this.shadow.adoptedStyleSheets=[this.hostCss],this.render()}disconnectedCallback(){this.root?.unmount(),this.root=void 0,this.shadow.adoptedStyleSheets.length=0,this.hostCss=void 0}static observedAttributes=["view-id","browser","dynamic-variant"];getProps(){const r=Y_t.safeParse({viewId:this.getAttribute("view-id"),browser:this.getAttribute("browser")??void 0,dynamicViewVariant:this.getAttribute("dynamic-variant")??void 0});return r.success?r.data:(console.error("Invalid props",dfe(r.error)),{viewId:"index"})}render(){const r=this.getProps();this.updateHostCss(),this.root??=_tt.createRoot(this.shadow),this.root.render(b.jsx(btt,{...r}))}attributeChangedCallback(r){this.root&&this.render()}}return customElements.define(Ett.View,qfe),F2.LikeC4View=qfe,Object.defineProperty(F2,Symbol.toStringTag,{value:"Module"}),F2})({});
/* prettier-ignore-end */